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

Fixing bundle creation and verification #198

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

didierofrivia
Copy link
Member

This PR aims to fix the bundle creation and verification when the tag is SEMVER. Assigning VERSION from the GITHUB_REF_NAME:

The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, feature-branch-1.
...

Removing the leading v in order to pass the expected version to the Makefile target.

Currently it was passing:
Screenshot 2024-08-21 at 18 15 55

Failing the job and not pushing the images.

@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.78%. Comparing base (ef6c4ac) to head (0916b62).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #198   +/-   ##
=======================================
  Coverage   61.78%   61.78%           
=======================================
  Files           2        2           
  Lines         785      785           
=======================================
  Hits          485      485           
  Misses        249      249           
  Partials       51       51           
Flag Coverage Δ
unit 61.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -109,8 +109,9 @@ jobs:
- name: Set Operator version
id: operator-version
run: |
if [[ ${GITHUB_REF_NAME/\//-} =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]]; then
echo "VERSION=${GITHUB_REF_NAME/\//-}" >> $GITHUB_ENV
tag=${{GITHUB_REF_NAME}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

GITHUB_REF_NAME often contains slashes, such as in the case of branch names like docs/foo.

Copy link
Member Author

Choose a reason for hiding this comment

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

yup, but it would be the same for the if condition, no?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean when we set the version to it, we need to replace all slashes with another char, as the slash symbol is not allowed in the manifests, I recon.

Choose a reason for hiding this comment

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

so on 114 we need to add the string replace?
/\//- ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or add it on 112 and remove the leading "v" in the regex in 113.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd say it's not needed, since VERSION assignment happens within 2 branches of the conditional. First case matching the REGEX, SemVer with leading "v" and beta tags (as in v0.9.0-cr1) and the second when doesn't match it assigns the ref sha.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Understood, @didierofrivia. Thanks for clarifying.

@didierofrivia didierofrivia merged commit 7f29a12 into main Aug 26, 2024
11 checks passed
@didierofrivia didierofrivia deleted the fix-build-images branch August 26, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants