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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tagged release versions not overwritten to app.Version. #2270

Closed
corverroos opened this issue Jun 2, 2023 · 0 comments
Closed

Tagged release versions not overwritten to app.Version. #2270

corverroos opened this issue Jun 2, 2023 · 0 comments
Assignees
Labels
bug Something isn't working protocol Protocol Team tickets

Comments

@corverroos
Copy link
Contributor

corverroos commented Jun 2, 2023

馃悶 Bug Report

Description

The v0.16.0-rc1 git taged docker image has incorrect app.Version. The build and publish step didn't overwrite the variable to v0.16.0-rc1 even though the the GO_BUILD_FLAGS was populated correctly, it didn't work. Wonder if a previous cached version with used or something 馃

https://github.com/ObolNetwork/charon/actions/runs/5145269628/jobs/9262690170

Suggest commiting fix directly to release branch, testing it works (can only test on release branch), then cherry picking final fix to main (reverse order).

@corverroos corverroos added the bug Something isn't working label Jun 2, 2023
@github-actions github-actions bot added the protocol Protocol Team tickets label Jun 2, 2023
@xenowits xenowits self-assigned this Jun 2, 2023
obol-bulldozer bot pushed a commit that referenced this issue Jun 5, 2023
Prints the built version inside the docker file to debug incorrect tagged versions.

category: misc
ticket: #2270
obol-bulldozer bot pushed a commit that referenced this issue Jun 5, 2023
Also use `-a` flag to force rebuild when setting `-ldflags` when overriding tagged versions. 

Since `-ldflags=-X path/to/package.Var=foo` contains a space inside the value, the only way I could get this to work is to provide it via an additional `GO_BUILD_FLAG_2` variable. The other option would be wrangling arrays and splitting using something like `IFS=' ' read -ra BUILD_ARGS <<< "$OPTIONAL_BUILD_ARGS"` but I feel this is more verbose but simpler to understand.

category: misc
ticket: #2270
obol-bulldozer bot pushed a commit that referenced this issue Jun 5, 2023
Convert build args into env vars.

category: misc
ticket: #2270
obol-bulldozer bot pushed a commit that referenced this issue Jun 5, 2023
Fixes the github action "build-push-deploys" `build-args` parameter. It is a [list parameter that is new line delimited](https://github.com/docker/build-push-action#inputs).

Also remove `-a` build arg since it isn't required. Make it explicit that `GO_BUILD_FLAG` only supports a single flag.

category: misc
ticket: #2270
obol-bulldozer bot pushed a commit that referenced this issue Jul 28, 2023
Fixes the github action "build-push-deploys" `build-args` parameter. It is a [list parameter that is new line delimited](https://github.com/docker/build-push-action#inputs).

Also remove `-a` build arg since it isn't required. Make it explicit that `GO_BUILD_FLAG` only supports a single flag.

This ports the fix from `main-v0.16` release branch to main.

category: misc
ticket: #2270
xenowits added a commit that referenced this issue Jul 28, 2023
Fixes the github action "build-push-deploys" `build-args` parameter. It is a [list parameter that is new line delimited](https://github.com/docker/build-push-action#inputs).

Also remove `-a` build arg since it isn't required. Make it explicit that `GO_BUILD_FLAG` only supports a single flag.

This ports the fix from `main-v0.16` release branch to main.

category: misc
ticket: #2270
obol-bulldozer bot pushed a commit that referenced this issue Jul 29, 2023
Fixes the github action "build-push-deploys" `build-args` parameter. It is a [list parameter that is new line delimited](https://github.com/docker/build-push-action#inputs).

Also remove `-a` build arg since it isn't required. Make it explicit that `GO_BUILD_FLAG` only supports a single flag.

This ports the fix from `main-v0.16` release branch to `main-v0.17`.

category: misc
ticket: #2270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working protocol Protocol Team tickets
Projects
None yet
Development

No branches or pull requests

2 participants