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

semver tags rebuild logic is broken when --without-tag-suffix is set #28

Open
errordeveloper opened this issue Nov 8, 2021 · 1 comment

Comments

@errordeveloper
Copy link
Owner

errordeveloper commented Nov 8, 2021

 [0] >> git init hubble-otel-test                         
Initialized empty Git repository in /Users/ilya/Code/otel/hubble-otel-test/.git/
 [0] >> cd hubble-otel-test 
 [0] >> git remote add origin https://github.com/cilium/hubble-otel
 [0] >> git config --local gc.auto 0
 [0] >> git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin '+refs/heads/*:refs/remotes/origin/*' '+refs/tags/*:refs/tags/*'
remote: Enumerating objects: 12347, done.
remote: Counting objects: 100% (12347/12347), done.
remote: Compressing objects: 100% (7815/7815), done.
remote: Total 12347 (delta 4075), reused 11806 (delta 3648), pack-reused 0
Receiving objects: 100% (12347/12347), 20.56 MiB | 8.24 MiB/s, done.
Resolving deltas: 100% (4075/4075), done.
From https://github.com/cilium/hubble-otel
 * [new branch]      main        -> origin/main
 * [new branch]      user-guides -> origin/user-guides
 * [new tag]         v0.1.0-rc.1 -> v0.1.0-rc.1
 [0] >> git checkout --progress --force refs/tags/v0.1.0-rc.1
Updating files: 100% (6730/6730), done.
Note: switching to 'refs/tags/v0.1.0-rc.1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 4a74e1c Do not run tests during image build
$ make images.otelcol
/Users/ilya/Code/otel/hubble-otel-test/.gopath/bin/imagine build \
		--builder=$(cat .buildx_builder) \
		--base ./ \
		--root \
		--dockerfile=./images/otelcol/Dockerfile \
		--upstream-branch=origin/main \
		--name=otelcol \
		--registry=ghcr.io/cilium/hubble-otel \
		--without-tag-suffix=false \
		--push=false
rebuilding as remote image "ghcr.io/cilium/hubble-otel/otelcol:v0.1.0-rc.1" is not present
...
^C
$ make images.otelcol WITHOUT_TAG_SUFFIX=true
/Users/ilya/Code/otel/hubble-otel-test/.gopath/bin/imagine build \
		--builder=$(cat .buildx_builder) \
		--base ./ \
		--root \
		--dockerfile=./images/otelcol/Dockerfile \
		--upstream-branch=origin/main \
		--name=otelcol \
		--registry=ghcr.io/cilium/hubble-otel \
		--without-tag-suffix=true \
		--push=false
no need to rebuild
/Users/ilya/Code/otel/hubble-otel-test/.gopath/bin/imagine image \
		--base=./ \
		--root \
		--upstream-branch=origin/main \
		--name=otelcol \
		--registry=ghcr.io/cilium/hubble-otel \
		--without-tag-suffix=true \
		> image-otelcol.tag
$
errordeveloper added a commit to cilium/hubble-otel that referenced this issue Nov 8, 2021
@errordeveloper
Copy link
Owner Author

This will need to be validated after work on build config is merged into main branch, doesn't make much sense to address it before that as quite a few things are being reworked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant