Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Jun 10, 2025

Summary

This PR updates the feature tag workflow to prefer building on branches of a pull request. 👾

Notes

Requirements

@zimeg zimeg added this to the Next Release milestone Jun 10, 2025
@zimeg zimeg self-assigned this Jun 10, 2025
@zimeg zimeg added semver:patch Use on pull requests to describe the release version increment build M-T: Changes to compilation and CI processes labels Jun 10, 2025
@codecov
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.49%. Comparing base (50e8223) to head (4964546).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
+ Coverage   63.48%   63.49%   +0.01%     
==========================================
  Files         212      212              
  Lines       22344    22344              
==========================================
+ Hits        14184    14187       +3     
+ Misses       7078     7077       -1     
+ Partials     1082     1080       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

💌 Sharing thoughts with the kind reviewers but I might revisit something before marking this for review!

- run:
name: Output BUILD_VERSION env var based on recent git tag and type of build
command: |
BUILD_VERSION=$(git describe --tags --match 'v*.*.*' --exclude '*feature');
Copy link
Member Author

Choose a reason for hiding this comment

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

👁️‍🗨️ Accepting the -feature suffix matches the description of collecting the build version, and matches the tag that goreleaser expects:

description: "Exports a BUILD_VERSION env var based on the most recent git tag. The format of the string will be 'vX.X.X[-branch-name[-feature]]', unless the `sanitized` parameter is set to `true` which drops the `v` prefix."

Comment on lines -473 to -474
--arg ct "$CIRCLE_TAG" \
--arg cs "$CIRCLE_SHA1" \
Copy link
Member Author

Choose a reason for hiding this comment

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

🪓 These are unused in the upstream script!

Copy link
Member

Choose a reason for hiding this comment

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

Nice, thanks for removing them and simplifying the config!

sleep 1
FEATURE_TAG_NAME="${TAGS}-${REF}-feature"
echo "Identified feature-release tagname as 🔪: $FEATURE_TAG_NAME"
Copy link
Member Author

Choose a reason for hiding this comment

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

🪓 Here we attempt to delete feature releases after the corresponding PR merges into main with the feature branch deleted to prefer the "dev" build.

I'm not certain if we want to do this or if it should set RELEASE_FOUND to "0" 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I can see both sides of the question. On one side, the feature release might be useful to folks even if it's merged and released. For example, falling back on a working feature build that has a bug in the production release. On the other hand, cleaning up development work (including feature tags) would be nice.

@zimeg
Copy link
Member Author

zimeg commented Jun 10, 2025

🏁 Before pushing the feature tag, I will make sure tests of a PR pass with these changes. Then I will test the tag.

Then I'll push another commit to make sure nothing wild happens!

@zimeg
Copy link
Member Author

zimeg commented Jun 10, 2025

📣 From the runner logs of a feature build the revert above seems to still checkout these changes fine:

Note: switching to '125f35207543780f639d4c52abd9e7ad7fd37d09'.

I'm also finding both the prerelease and feature tag appear as we hope:

@zimeg
Copy link
Member Author

zimeg commented Jun 10, 2025

👻 Even with the preceding feature tag existing for 4964546 the prerelease uploads are still found on the branch release:

Edit: Added the commit with the preceding feature tag!

@zimeg zimeg marked this pull request as ready for review June 10, 2025 17:50
@zimeg zimeg requested a review from a team as a code owner June 10, 2025 17:50
Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

✅ Looking good and love the docs 📚

💬 Regarding your question around cleaning up the feature release, I think we can do either one. We may change our choice if we receive feedback from the community as well.

Comment on lines -473 to -474
--arg ct "$CIRCLE_TAG" \
--arg cs "$CIRCLE_SHA1" \
Copy link
Member

Choose a reason for hiding this comment

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

Nice, thanks for removing them and simplifying the config!

Comment on lines +684 to +686
```bash
curl -fsSL https://downloads.slack-edge.com/slack-cli/install-dev.sh | bash -s -- -v 3.4.5-feat-something-feature
```
Copy link
Member

Choose a reason for hiding this comment

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

Ahhhh, so nice to have this documented! ✨

sleep 1
FEATURE_TAG_NAME="${TAGS}-${REF}-feature"
echo "Identified feature-release tagname as 🔪: $FEATURE_TAG_NAME"
Copy link
Member

Choose a reason for hiding this comment

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

I can see both sides of the question. On one side, the feature release might be useful to folks even if it's merged and released. For example, falling back on a working feature build that has a bug in the production release. On the other hand, cleaning up development work (including feature tags) would be nice.

@zimeg
Copy link
Member Author

zimeg commented Jun 10, 2025

@mwbrooks Thanks for the review and unblocking downstream PRs! 🚀 ✨

On one side, the feature release might be useful to folks even if it's merged and released.

This was similar to what I was thinking about, in CI that might depend on certain features. We might lean into more more soon releases to bring those features to a stable version though, but I do understand how useful this might be 🙏

For now let's merge this - I'll keep watch on the feature tag linked above for proper deletion.

@zimeg zimeg merged commit c64e342 into main Jun 10, 2025
6 checks passed
@zimeg zimeg deleted the zimeg-build-feature-tag-pull-request branch June 10, 2025 19:15
@zimeg
Copy link
Member Author

zimeg commented Jun 10, 2025

📣 Sweet that's looking good too:

https://github.com/slackapi/slack-cli/actions/runs/15568258806/job/43837591542#step:2:81

Identified pre-release tagname to 🔪: v3.3.0-zimeg-build-feature-tag-pull-request
...
Successfully deleted v3.3.0-zimeg-build-feature-tag-pull-request
Identified feature-release tagname as 🔪: v3.3.0-zimeg-build-feature-tag-pull-request-feature
...
Successfully deleted v3.3.0-zimeg-build-feature-tag-pull-request-feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build M-T: Changes to compilation and CI processes semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants