Mealie Docker Image V3.4.0 Bug: Shows 3.3.2 Version

by SLV Team 52 views
Mealie Docker Image v3.4.0 Bug: Shows 3.3.2 Version

Hey guys! We've got a bit of a situation on our hands with the Mealie Docker image. It seems like the v3.4.0 tag is actually packaging the 3.3.2 version internally. Let's dive into what's happening and how to reproduce this bug.

The Issue: Docker Image Tag v3.4.0 Contains Mealie 3.3.2

So, here's the deal. The Docker image tagged as v3.4.0 appears to be running the 3.3.2 codebase. This is a bit of a head-scratcher, and it can definitely cause some confusion and issues, especially if you're relying on the new features or fixes in v3.4.0. When you check the version inside the container using the pip show mealie command, it stubbornly reports version 3.3.2, even after pulling the v3.4.0 image. This suggests that the image was tagged as v3.4.0 without properly updating the source code or package version during the build process. It's like ordering a pizza and getting the one you ordered last week – not cool!

This issue was discovered while trying to configure the database backend using the POSTGRES_URL_OVERRIDE setting. Imagine trying to set up your database only to find out the application isn't even running the version you think it is. This can lead to a lot of debugging headaches and wasted time, which is something we definitely want to avoid. So, let's get into the nitty-gritty of how to reproduce this bug so we can get it squashed.

How to Reproduce the Bug

Okay, let's get our hands dirty and try to reproduce this bug ourselves. Here’s a step-by-step guide to see the issue in action:

Steps:

  1. Pull the Docker image:

    docker pull ghcr.io/mealie-recipes/mealie:v3.4.0
    

    This command tells Docker to grab the v3.4.0 image from the Mealie repository. It's like downloading the software package onto your computer. Once the pull is complete, you'll have the image ready to run.

  2. Run the Docker image and check the version:

    docker run --rm -it --entrypoint "" ghcr.io/mealie-recipes/mealie:v3.4.0 \
      sh -lc '. /opt/mealie/bin/activate && pip show mealie | grep Version'
    

    This command is a bit more involved, so let's break it down:

    • docker run --rm -it: This part starts a new container from the pulled image. The --rm flag ensures the container is automatically removed when it exits, keeping things tidy. The -it flags allow you to interact with the container's shell.
    • --entrypoint "": This overrides the default entry point of the container, which is usually the Mealie application itself. By setting it to an empty string, we can run our own commands inside the container.
    • ghcr.io/mealie-recipes/mealie:v3.4.0: This specifies the image we want to run – the one we just pulled.
    • sh -lc: This starts a new shell inside the container and tells it to execute the following command.
    • . /opt/mealie/bin/activate: This activates the Python virtual environment where Mealie is installed. Think of it as setting the stage for running Mealie-related commands.
    • pip show mealie | grep Version: This is the key part. pip show mealie displays information about the Mealie package installed in the virtual environment, and grep Version filters the output to show only the line containing the version number.

Expected vs. Actual Results

  • Expected result:

    Version: 3.4.0
    

    This is what we should see if the image was correctly built and tagged. We expect the version to match the tag.

  • Actual result:

    Version: 3.3.2
    

    This is the frustrating reality. Despite pulling the v3.4.0 image, we're seeing the 3.3.2 version. This confirms the bug: the image tag doesn't match the actual code inside.

Output Example

Here’s an example of what you might see when running the command:

 v3.4.0: Pulling from mealie-recipes/mealie
 Digest: sha256:545fb8af4287ad027e4f7eb8a0464fa2e21f157e88fda3d7a514ba1e6d3a86b0
 Status: Image is up to date for ghcr.io/mealie-recipes/mealie:v3.4.0
 ghcr.io/mealie-recipes/mealie:v3.4.0
 Version: 3.3.2

The Status: Image is up to date line indicates that Docker is using the image you've already downloaded (or pulling it if you haven't). The crucial line, Version: 3.3.2, confirms the bug.

Impact and Additional Information

This discrepancy between the image tag and the actual version can lead to significant issues. For example, users might try to use new features available in v3.4.0, only to find they don't exist because they're effectively running v3.3.2. This can cause confusion, wasted effort, and potential data inconsistencies. It's super important to have the correct version running to ensure everything works as expected.

Relevant Logs

In this particular case, there aren't any specific logs needed since the issue is evident from the version mismatch. However, in other scenarios, logs are crucial for debugging. If you encounter other problems, make sure to check your container logs for any error messages or clues.

Mealie Version Details

Let's nail down the specifics of the Mealie version we're dealing with:

  • Image: ghcr.io/mealie-recipes/mealie
  • Build tag: v3.4.0
  • Digest of the pulled image: sha256:545fb8af4287ad027e4f7eb8a0464fa2e21f157e88fda3d7a514ba1e6d3a86b0

The image digest is a unique identifier for the specific version of the image. If the digest changes, it means a new version has been pushed. This can be useful for verifying you have the correct image, especially if tags are reused or updated.

Deployment Environment

Knowing the deployment environment can sometimes provide clues about the cause of a bug. Here's the deployment information for this issue:

  • Deployment: Docker (Linux)
  • Deployment type: Self-hosted via Docker Compose
  • Host OS: Debian GNU/Linux 13 (trixie)
  • Docker Engine: 28.5.1
  • Compose version: 2.40.3
  • Architecture: x86_64
  • Database backend: PostgreSQL 16 (external container on the same Docker network)
  • Network mode: Custom bridge network
  • Volume mount: ./custom-data:/app/data/

Interestingly, this issue isn't tied to any specific configuration or environment variables. It can be reproduced with a clean docker run command using only the official image. This makes it even clearer that the problem lies within the image itself.

Additional Deployment Details

It's worth reiterating that the bug persists even without any custom configuration. This was confirmed by running the image with no external environment variables or volume mounts. This is a big clue that the issue is likely in the image build process, not in the user's setup. Knowing this helps narrow down the search for the root cause and makes it easier to fix.

Next Steps and Conclusion

So, where do we go from here? The most important thing is to raise awareness of this issue so the Mealie team can investigate and fix it. If you're affected by this bug, you might want to consider using a specific version tag that you know works correctly, or perhaps building your own image from the source code. This gives you more control over the version you're running.

In conclusion, the Docker image tagged v3.4.0 for Mealie is currently serving the 3.3.2 version internally. This is a significant bug that can cause confusion and issues for users. By following the steps outlined above, you can reproduce the bug and verify it for yourself. Let's hope the Mealie team gets this sorted out quickly so we can all enjoy the latest and greatest features! Stay tuned for updates, and happy cooking (with the correct version, hopefully!).

If you guys have any additional insights or experience with this issue, please feel free to share them! The more information we have, the better we can help resolve this. Let's keep the conversation going and work together to make Mealie even better.