Skip to content

Skip pre-upgrade jobs for patch revisions and improve version comparison #139

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

Open
wants to merge 1 commit into
base: release/3.0
Choose a base branch
from

Conversation

anshumanks
Copy link
Contributor

Refactor upgrade logic to skip pre upgrade job in case of patch revisions

Description

This change prevents pre upgrade job from stopping pipelines in case of patch revisions.

Code change

  • Modified version_update.go, constants.go

Unit Tests

  • Modified version_update_test.go
  • Modified old tests to incorporate new return value from compareVersions function (-2 for patch revisions)
  • Added a new test to check for patch revisions

Tested

In case of patch revisions:
Screenshot 2025-02-13 at 7 39 57 AM

Patch revision with skip pre upgrade flag = false:
Screenshot 2025-02-13 at 7 58 26 AM
Screenshot 2025-02-13 at 8 53 20 AM

In other cases:
Screenshot 2025-02-13 at 6 59 30 AM

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