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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Fix: Preprocess release title in gha #7486

Merged

Conversation

garyschulte
Copy link
Contributor

@garyschulte garyschulte commented Aug 19, 2024

PR description

pre-process release title in release actions to ensure it conforms to a besu release version and trim any leading or trailing spaces

Tested on forked repo with a variety of whitespace and failure modes.

@garyschulte garyschulte force-pushed the fix/release-version-preprocess branch 5 times, most recently from eb94deb to c1dbeef Compare August 19, 2024 20:15
@garyschulte garyschulte force-pushed the fix/release-version-preprocess branch from c1dbeef to ff8e322 Compare August 19, 2024 20:39
@garyschulte garyschulte marked this pull request as ready for review August 19, 2024 21:02
Copy link
Contributor

@siladu siladu left a comment

Choose a reason for hiding this comment

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

Nice solution 👍

Think regex could be stricter but this is a clear improvement

# strip all whitespace
RELEASE_NAME="${RELEASE_NAME//[[:space:]]/}"
if [[ ! "$RELEASE_NAME" =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?(-.*)?$ ]]; then
echo "Release name does not conform to a valid besu release format YY.M.v[-suffix], e.g. 24.8.0-RC1."
Copy link
Contributor

Choose a reason for hiding this comment

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

Wonder if we should make this strictly full release since this workflow is triggered by the released type which doesn't include pre-releases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the flexibility is worth it, there is historical precedent for publishing -* releases, like for verkle or testnets etc

Copy link
Contributor

@siladu siladu Aug 20, 2024

Choose a reason for hiding this comment

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

In terms of github technicalities, would these be published as full releases rather than a pre-release then?

@garyschulte garyschulte merged commit c24dea8 into hyperledger:main Aug 19, 2024
40 checks passed
@garyschulte garyschulte deleted the fix/release-version-preprocess branch August 19, 2024 22:46
cloudspores pushed a commit to cloudspores/besu that referenced this pull request Aug 20, 2024
cloudspores pushed a commit to cloudspores/besu that referenced this pull request Aug 20, 2024
gconnect pushed a commit to gconnect/besu that referenced this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants