Bug on version number? #328

Closed
opened 2022-06-09 15:28:43 +00:00 by kosssi · 2 comments
Contributor

Hello I use Garage with docker dxflrs/arm64_garage:v0.7.2 but when I check my Garage version I see 0.7.0 :

$ docker exec garage /garage --version
garage 0.7.0

$ docker inspect garage | grep "Image"
        "Image": "sha256:a7c0b945d1edfe9017ca704064be3b241f969d9768b731bb5108fb13be101ad1",
            "Image": "dxflrs/arm64_garage:v0.7.2",

Maybe a bug! Thanks for this awesome project ;)

Hello I use Garage with docker dxflrs/arm64_garage:v0.7.2 but when I check my Garage version I see 0.7.0 : ``` $ docker exec garage /garage --version garage 0.7.0 $ docker inspect garage | grep "Image" "Image": "sha256:a7c0b945d1edfe9017ca704064be3b241f969d9768b731bb5108fb13be101ad1", "Image": "dxflrs/arm64_garage:v0.7.2", ``` Maybe a bug! Thanks for this awesome project ;)
Owner

Ping @Lx for confirmation.

I think the problem comes from the facts that:

  1. We changed the version handling from the garage rust crate to the garage_rpc one. So now, the code is here: https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/rpc/system.rs#L315-L323
  2. We have multiple ways to inject the version
    1. Through a special GIT_VERSION environment variable
    2. If it fails, by looking at the current tag of the git repo
    3. If it fails, by looking at the current Rust crate version
    4. And finally, if everything fails, we set it to unknown
  3. We do not bump Rust crate versions on each release of Garage as this is a manual process
  4. Our CI injects the GIT_VERSION environment variable to a specific Rust crate, the linked commit shows that we some days ago LX fixed our script to inject the env variable to garage_rp instead of garage. b54a938724

Given all these facts, I think that the problem is that we were not injecting anymore the GIT_VERSION environment variable to the right package (crate) and thus our logic was falling back to the Rust crate that is indeed behind the current release of Garage. It should be already fixed if the last commit works as expected.

Ping @Lx for confirmation. I think the problem comes from the facts that: 1. We changed the version handling from the `garage` rust crate to the `garage_rpc` one. So now, the code is here: https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/rpc/system.rs#L315-L323 2. We have multiple ways to inject the version 1. Through a special `GIT_VERSION` environment variable 2. If it fails, by looking at the current tag of the git repo 3. If it fails, by looking at the current Rust crate version 4. And finally, if everything fails, we set it to `unknown` 3. We do not bump Rust crate versions on each release of Garage as this is a manual process 4. Our CI injects the `GIT_VERSION` environment variable to a specific Rust crate, the linked commit shows that we some days ago LX fixed our script to inject the env variable to `garage_rp` instead of `garage`. https://git.deuxfleurs.fr/Deuxfleurs/garage/commit/b54a938724e5551f6436f551cafec3d1324a6260 Given all these facts, I think that the problem is that we were not injecting anymore the `GIT_VERSION` environment variable to the right package (crate) and thus our logic was falling back to the Rust crate that is indeed behind the current release of Garage. It should be already fixed if the last commit works as expected.
quentin added the
Bug
label 2022-06-13 08:08:29 +00:00
Owner

This is fixed already in main (b54a938724)

This is fixed already in main (b54a938724)
lx closed this issue 2022-06-13 08:40:51 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#328
No description provided.