Skip to content

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

Closed
wants to merge 10 commits into from
Closed

feat: add release channel tag to image #17287

wants to merge 10 commits into from

Conversation

Zoupers
Copy link

@Zoupers Zoupers commented Apr 8, 2025

fix #13771
I've tested it, the result is like this.
image

@cdr-bot cdr-bot bot added the community Pull Requests and issues created by the community. label Apr 8, 2025
@Zoupers
Copy link
Author

Zoupers commented Apr 8, 2025

I've made some modification to the release workflow on another branch to test it. The final action result is here.

Copy link
Contributor

@Copilot Copilot AI left a 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)

Zoupers and others added 5 commits April 9, 2025 23:22
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>
@Zoupers Zoupers requested a review from deansheather April 10, 2025 05:53
@@ -493,6 +493,11 @@ jobs:
else
echo "created_latest_tag=false" >> $GITHUB_OUTPUT
fi
# push image based on current channel
Copy link
Member

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

Copy link
Member

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)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the release history, and found there does exists this situation. For example, v2.14.4 is released after v2.15.3.

Copy link
Member

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)

Copy link
Author

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 ?

Copy link
Member

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.

Copy link
Author

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?

Copy link
Author

@Zoupers Zoupers Apr 11, 2025

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.

Copy link
Member

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.

@stirby

Copy link
Collaborator

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>
@deansheather
Copy link
Member

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.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2025
@coder coder unlocked this conversation Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Pull Requests and issues created by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

release: conflicting latest tags
3 participants