-
Notifications
You must be signed in to change notification settings - Fork 896
feat: add release channel tag to image #17287
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
Conversation
Signed-off-by: Zoupers <qy@zouper.cn>
I've made some modification to the release workflow on another branch to test it. The final action result is here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
Files not reviewed (1)
- scripts/image_tag.sh: Language not supported
Comments suppressed due to low confidence (2)
.github/workflows/release.yaml:499
- [nitpick] Consider quoting the CODER_RELEASE_CHANNEL variable (e.g. "${CODER_RELEASE_CHANNEL}") when invoking the image_tag.sh script to safeguard against potential whitespace or unexpected characters.
--target "$(./scripts/image_tag.sh --channel ${CODER_RELEASE_CHANNEL})" \
.github/workflows/release.yaml:500
- [nitpick] The use of "$version" within the file name is ambiguous; consider using the more explicit syntax "${version}" for clearer variable expansion.
$(cat build/coder_"$version"_linux_{amd64,arm64,armv7}.tag)
Co-authored-by: Dean Sheather <dean@deansheather.com>
Co-authored-by: Dean Sheather <dean@deansheather.com>
Signed-off-by: Zoupers <qy@zouper.cn>
Signed-off-by: Zoupers <qy@zouper.cn>
@@ -493,6 +493,11 @@ jobs: | |||
else | |||
echo "created_latest_tag=false" >> $GITHUB_OUTPUT | |||
fi | |||
# push image based on current channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stirby This will break when you do a backport to an older version right? I thought I'd ping you since you know more about the channels than I do.
e.g. if the current stable
tag is v2.2.0
and you create v2.1.1
as "stable" then it will overwrite stable
with an older version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is the case then it severely complicates things and we'll need to do something like we do with the git tag
semver stuff above (but we can't just copy and paste that otherwise stable
won't work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, not sure how we even go about fixing these. When we do something like the git tag
thing above, it'd need to filter by the current channel (but that metadata isn't stored in Git AFAIK, only in github releases)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be better to have tag like v2.14
and leave stable
to the latest stable
version ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we did that there's still not an easy way to determine if there is a "higher" stable version. When releasing v2.14.4
, we would want it to detect v2.15.3
as a "higher" stable version. But if there are only mainline versions higher than the current version, we'd still want to update the stable
tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about introduce a new parameter to manage the stable and mainline tag in release.yml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can introduce a version file in the repo which tells if the version is stable. Then we can check the latest stable version.
It should be easy to manage, we just need to add version to it while we are running a stable release.
But the branches we need to commit to seems not that easy to determine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think we have another problem when we promote mainline
to stable
since we don't do anything in github/git other than changing the release notes I imagine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can verify the issues that @deansheather mentioned make it difficult to accept the current implementation. This is certainly something we want to fix but don't have the resources right now.
Down the road we can do our stable releases and promotion more intelligently to support this, but our workflow can't handle this change currently.
Co-authored-by: Dean Sheather <dean@deansheather.com>
I'm sorry but I don't think we can accept this PR for the reasons @stirby mentioned above, as we'll probably need to make some changes to our processes internally to enable this. Thank you for your contribution, though! I hope this doesn't discourage you from contributing in the future. |
fix #13771

I've tested it, the result is like this.