-
Notifications
You must be signed in to change notification settings - Fork 860
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
Fix ESR check to check for a newer remote branch instead of an increment #3314
Conversation
@amyblais This is a tooling fix to be cherry-picked over before the next dot release. Doesn't need QA testing and isn't required for the v5.11 release. |
@devinbinnie, is there some context you can share into how this "auto-updater" works? At first blush, I don't quite understand why we're doing this check at build time instead of at runtime, but I'm probably misunderstanding how it's all used. |
Sure, so it's all using the For this case, the YML file that describes the update and where its located is published to our releases.mattermost.com endpoint where the releases also exist. However, given that we only have one place to get automatic updates and potentially 2 branches that we might be releasing from at any given time (ie. the latest one and the ESR), we don't want to overwrite the YML file to put users back a version (or have the auto update stop working). So this change just prevents that. Happy to talk about it more, feel free to message me :) |
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.
Question about major version bumps and how that fits together.
scripts/patch_updater_yml.sh
Outdated
# If we are on a ESR branch, we don't want to generate the auto-updater yml if there is a newer version | ||
NEXT_VERSION="$(npx semver $STABLE_VERSION -i minor)" | ||
NEWER_VERSION_EXISTS="$(git ls-remote --tags origin v${NEXT_VERSION%.*}.0)" | ||
if [ -e .esr ] && [ ! -z "$NEWER_VERSION_EXISTS" ]; then |
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.
What happens when the "next version" is a major version, but NEXT_VERSION
doesn't exist as a minor increment?
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.
We haven't done a major version in a while, but yes that will likely break.
Will patch.
Cherry pick is scheduled. |
Summary
Something I realized with the ESR check is that we still might be doing dot releases before the next version is out, and the current check would stop those from being added to the auto-update line.
This PR changes the check to check for the presence of a tag for the final release of the next version of the app. If that exists, we can confirm that there is a newer minor version that we would rather release on the auto-update line and thus we shouldn't add the current ESR to the line.