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

Add release version checker to GitHub Actions workflow #1061

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

gtroitsk
Copy link
Member

@gtroitsk gtroitsk commented Mar 7, 2024

Summary

Add release versioning check to GH Actions workflow. When user change project.yaml check-release-version job is triggered
If the new version is wrong, job fails with error message

Example PR and test runs. I add debug print to print from what version to what version FW bumps, for example (1.4.2.Beta8 -> 1.4.2.Beta10)

gtroitsk#1

Success: 1.4.2.Beta8 -> 1.4.2.Beta9
(https://github.com/gtroitsk/quarkus-test-framework/actions/runs/8185766438/job/22382750464?pr=1)
Success: 1.4.2.Final -> 1.4.3.Beta1
(https://github.com/gtroitsk/quarkus-test-framework/actions/runs/8185802974/job/22382862356?pr=1)
Failure: 1.4.2.Beta8 -> 1.4.2.Beta10
(https://github.com/gtroitsk/quarkus-test-framework/actions/runs/8185784491/job/22382806672?pr=1)
Failure: 1.4.2.Final -> 1.4.3.Beta2
(https://github.com/gtroitsk/quarkus-test-framework/actions/runs/8185818924/job/22382914371?pr=1)
Failure: 1.4.2.Final -> 1.4.4.Beta1
(https://github.com/gtroitsk/quarkus-test-framework/actions/runs/8185827502/job/22382941018?pr=1)

Please check the relevant options

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Dependency update
  • Refactoring
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • This change requires execution against OCP (use run tests phrase in comment)

Checklist:

  • Example scenarios has been updated / added
  • Methods and classes used in PR scenarios are meaningful
  • Commits are well encapsulated and follow the best practices

@gtroitsk gtroitsk changed the title Add release version checker Add release version checker to GitHub Actions workflow Mar 7, 2024
@gtroitsk
Copy link
Member Author

gtroitsk commented Mar 7, 2024

@michalvavrik I need to check new error messages. I will provide you with the links to gh actions runs

@gtroitsk
Copy link
Member Author

gtroitsk commented Mar 7, 2024

@michalvavrik I need to check new error messages. I will provide you with the links to gh actions runs

1.4.2.Final -> 1.4.3.Beta1
https://github.com/gtroitsk/quarkus-test-framework/actions/runs/8189115595/job/22393108493

1.4.2.Beta8 -> 1.4.2.Beta10
https://github.com/gtroitsk/quarkus-test-framework/actions/runs/8189193530/job/22393378927?pr=1

Copy link
Member

@michalvavrik michalvavrik left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@@ -0,0 +1,41 @@
name: Check release version
on:
push:
Copy link
Member

Choose a reason for hiding this comment

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

Isn't push a bit too late/early? This should ideally happen in PR, right? I am not sure if push actions are visualized in PRs

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, changed to trigger job only in PR

Copy link
Member

Choose a reason for hiding this comment

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

I don't agree it is too late. You want to run this when change on that file happens and that happens when push happens... You can see that in the PR actions. Anyway, reading https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request there is no practical difference as Georgii added condition on that file change. I am fine with change, just that I don't agree with previous comments.

Copy link
Member

Choose a reason for hiding this comment

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

If the push action is visible on PR, I have no issue with it being on push at all. I just wasn't sure

Copy link
Member

Choose a reason for hiding this comment

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

yeah, me neither, that's why asked Georgii for a proof, I probably asked him on the Slack and it's not recorded here, sorry. anyway, let's keep this.

@mjurc mjurc merged commit e3113f3 into quarkus-qe:main Mar 8, 2024
8 checks passed
@mjurc
Copy link
Member

mjurc commented Mar 8, 2024

Thanks a lot @gtroitsk

@gtroitsk gtroitsk deleted the release-version-checker branch March 8, 2024 16:18
@gtroitsk gtroitsk mentioned this pull request Mar 21, 2024
11 tasks
@fedinskiy
Copy link
Contributor

fedinskiy commented Jun 26, 2024

It looks like we missed the case, there we have two release streams (beta and release) in parallel.

I am trying to release 1.5.0.Beta7, but we have 1.4.7 release after 1.5.0.Beta6, and so there is this error:

Error: pre-release version should go one by one as sequence
After 1.4.7 should go 1.4.7.Beta1 or Final release

@gtroitsk
Copy link
Member Author

@fedinskiy I will create QQE, I have no time to fix it this week

@michalvavrik
Copy link
Member

Yeah, the point is that this scrip is using 'latest' tag and only releases are marked as latest, not pre-releases. it started failing when I unmarked all the prereleases as "not latest" and not "releases". +1 for na QQE task

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.

4 participants