Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: jaegertracing/all-in-one:latest does not match the latest Docker versioned tag nor the latest git tag #5721

Closed
erezrokah opened this issue Jul 9, 2024 · 9 comments · Fixed by #5781 or #5783
Labels

Comments

@erezrokah
Copy link

erezrokah commented Jul 9, 2024

What happened?

More of a question to see if this is a bug.
Looking at the Docker versions, the latest version was published 19 hours ago, while 1,1.58,1.58.1 were published 17 days ago. Is that expected?
image

Also running the latest version hints that it was built from the 1.58.0 git tag but with a newer build time than 1.58.1 ⬇️

1.58 loads as 1.58.1:

docker run -e COLLECTOR_OTLP_ENABLED=true -p 16686:16686 -p 4318:4318 jaegertracing/all-in-one:1.58 
2024/07/09 13:00:37 maxprocs: Leaving GOMAXPROCS=10: CPU quota undefined
2024/07/09 13:00:37 application version: git-commit=36f2a31de3147231ca0adcd96a0a13e6ef55ea71, git-version=v1.58.1, build-date=2024-06-22T20:40:52Z

latest loads as 1.58.0 but newer build date

docker run -e COLLECTOR_OTLP_ENABLED=true -p 16686:16686 -p 4318:4318 jaegertracing/all-in-one:latest
2024/07/09 13:01:40 maxprocs: Leaving GOMAXPROCS=10: CPU quota undefined
2024/07/09 13:01:40 application version: git-commit=295293c53c68df4dbc896082a00a5bc3d532cfc9, git-version=v1.58.0, build-date=2024-07-08T18:00:50Z

Steps to reproduce

Run docker run -e COLLECTOR_OTLP_ENABLED=true -p 16686:16686 -p 4318:4318 jaegertracing/all-in-one:1.58 vs docker run -e COLLECTOR_OTLP_ENABLED=true -p 16686:16686 -p 4318:4318 jaegertracing/all-in-one:latest.

Expected behavior

latest Docker tag should have a matching versioned tag on Docker hub, and it should match a git tag.

Relevant log output

No response

Screenshot

No response

Additional context

Not sure if this is actually a bug or expected behavior. Please close if I missed anything

Jaeger backend version

No response

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

No response

Deployment model

No response

Deployment configs

No response

@erezrokah erezrokah added the bug label Jul 9, 2024
@erezrokah erezrokah changed the title [Bug]: jaegertracing/all-in-one:latest does not match the latest Docker tag nor the latest git tag [Bug]: jaegertracing/all-in-one:latest does not match the latest Docker versioned tag nor the latest git tag Jul 9, 2024
@erezrokah
Copy link
Author

Could be that latest represent the latest commit on main? If so not sure why the git-version points to v1.58.0

@yurishkuro
Copy link
Member

I think this is how we historically have the CI set up, where latest represents the HEAD commit of main.

I agree that this is not ideal. We have separate "snapshot" repositories (e.g. https://hub.docker.com/r/jaegertracing/all-in-one-snapshot) where that definition of latest would make more sense (but in fact latest is not used in those at all). For the main images it would make more sense for latest to point to the latest release.

@yurishkuro yurishkuro added help wanted Features that maintainers are willing to accept but do not have cycles to implement good first issue Good for beginners labels Jul 10, 2024
@yurishkuro
Copy link
Member

#5724 should fix the 2nd issue, the main issue (only include latest in the published releases) is open.

@yurishkuro
Copy link
Member

One challenge we may run into just removing latest tag from images not published via release workflow is that some integration tests may still use the same scripts to build containers for testing and referring to them as latest. It would be better if we used something like local for those, but that would likely be a much larger change that is difficult to test.

@erezrokah
Copy link
Author

Thanks for the quick response and fix. Maybe there's a place we can update the docs regarding the Docker latest tag referencing the latest commit? I think that would satisfy my issue

@vvs-personalstash
Copy link
Contributor

Hi I was attempting to solve the first issue and while still exploring the probable causes for the issue I noticed this on the docker hub
Screenshot 2024-07-27 at 1 30 19 AM
and apparently for the images with the version tags 1.58 and 1.58.1 have the same files and might be the cause of the issue and it seems instead of 1.58.0 and 1.58 having the same files there seems to be an issue in the tags.
On a side note I unfortunately due to being new to the code base even after a lot of time I couldn't figure out where the logger
logger.Info(version.Get().String())

cmd/tracegen/main.go::line:68

is getting the info that is being displayed above so could i know where to look at to understand it even better

@yurishkuro
Copy link
Member

@vvs-personalstash 1.58.1 is the real label that matters. 1.58 simply points to the latest patch, just like 1 points to the latest minor.

@yurishkuro yurishkuro removed help wanted Features that maintainers are willing to accept but do not have cycles to implement good first issue Good for beginners labels Jul 27, 2024
@vvs-personalstash
Copy link
Contributor

Oh sorry it seems i misunderstood that

yurishkuro added a commit that referenced this issue Jul 27, 2024
## Which problem is this PR solving?
- To address #5721, add unit tests first

## Description of the changes
- Add unit tests and call them from scripts linting workflow
- Minor refactoring of `scripts/compute-tags.sh` to make it easier to
read

## How was this change tested?
```
$ GREP=ggrep SHUNIT2=/Users/ysh/dev/shunit2 bash scripts/compute-tags.test.sh
testRequireImageName
testRequireBranch
testRequireGithubSha
testRandomBranch
   Actual: --tag docker.io/foo/bar --tag quay.io/foo/bar --tag docker.io/foo/bar:latest --tag quay.io/foo/bar:latest --tag docker.io/foo/bar-snapshot:sha --tag quay.io/foo/bar-snapshot:sha --tag docker.io/foo/bar-snapshot:latest --tag quay.io/foo/bar-snapshot:latest
   checking foo/bar
   checking foo/bar:latest
   checking foo/bar-snapshot:sha
   checking foo/bar-snapshot:latest
testMainBranch
   Actual: --tag docker.io/foo/bar --tag quay.io/foo/bar --tag docker.io/foo/bar:latest --tag quay.io/foo/bar:latest --tag docker.io/foo/bar-snapshot:sha --tag quay.io/foo/bar-snapshot:sha --tag docker.io/foo/bar-snapshot:latest --tag quay.io/foo/bar-snapshot:latest
   checking foo/bar
   checking foo/bar:latest
   checking foo/bar-snapshot:sha
   checking foo/bar-snapshot:latest
testSemVerBranch
   Actual: --tag docker.io/foo/bar --tag quay.io/foo/bar --tag docker.io/foo/bar:1.2.3 --tag quay.io/foo/bar:1.2.3 --tag docker.io/foo/bar:1.2 --tag quay.io/foo/bar:1.2 --tag docker.io/foo/bar:1 --tag quay.io/foo/bar:1 --tag docker.io/foo/bar-snapshot:sha --tag quay.io/foo/bar-snapshot:sha --tag docker.io/foo/bar-snapshot:latest --tag quay.io/foo/bar-snapshot:latest
   checking foo/bar
   checking foo/bar:1
   checking foo/bar:1.2
   checking foo/bar:1.2.3
   checking foo/bar-snapshot:sha
   checking foo/bar-snapshot:latest

Ran 6 tests.

OK
```

---------

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro
Copy link
Member

Doesn't look like #5781 worked, probably need to remove no-version tags altogether

@yurishkuro yurishkuro reopened this Jul 28, 2024
yurishkuro added a commit that referenced this issue Jul 28, 2024
## Which problem is this PR solving?
- Resolves #5721
- The previous PR #5781 didn't quite work because we were still applying
tags like `--tag docker.io/foo/bar` (without a version), which evidently
leads Docker to treat them as `:latest`, which is exactly what we are
trying to avoid for `main` branch

## Description of the changes
- Remove usage of no-version tags `--tag docker.io/foo/bar`  completely
- Fix unit tests, make them stricter

## How was this change tested?
- Unit tests

Signed-off-by: Yuri Shkuro <github@ysh.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants