Skip to content

Conversation

@aamadeuss
Copy link
Contributor

@aamadeuss aamadeuss commented Nov 17, 2025

Description

Fixes ocp version validation for worker_pools so it does not fail for a newly released default version.
Added a data block look up to fetch the currently supported OCP versions so that versions added in the future will not need to be added separately in the validation.
Fixes #849

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content
  • Prevents validation failure when default ocp version is changed to a newer version, as well as when newer ocp versions are supported.

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@aamadeuss aamadeuss marked this pull request as ready for review November 19, 2025 09:13
Copy link
Contributor

@vkuma17 vkuma17 left a comment

Choose a reason for hiding this comment

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

looks good

@aamadeuss
Copy link
Contributor Author

/run pipeline

@vkuma17
Copy link
Contributor

vkuma17 commented Nov 20, 2025

just noticed that as per this logic 4.14 with rhcos will still work here which is not supported but since 4.14 is returned as a valid version from the list final contains condition will evaluate to true

Copy link
Contributor

@vkuma17 vkuma17 left a comment

Choose a reason for hiding this comment

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

Need some logic update, current logic will completely ignore OS checks

Copy link
Contributor

@vkuma17 vkuma17 left a comment

Choose a reason for hiding this comment

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

LGTM

@aamadeuss
Copy link
Contributor Author

/run pipeline

Copy link
Contributor

@vkuma17 vkuma17 left a comment

Choose a reason for hiding this comment

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

@aamadeuss one more small change is required. right now for version 4.20 and higher we only validate if its a valid version and no validations on OS.

starting 4.21 onwards, only RHCOS will be supported and in 4.20 RHCOS and RHEL 9 will both be supported, so for now can we just add another condition just for 4.20 similar to 4.19 and another condition checking all versions >= 4.21 and OS = "RHCOS"

vkuma17
vkuma17 previously approved these changes Nov 24, 2025
@aamadeuss
Copy link
Contributor Author

/run pipeline

@aamadeuss
Copy link
Contributor Author

Retrying pipeline as it seems to be working now

@aamadeuss
Copy link
Contributor Author

/run pipeline

@aamadeuss
Copy link
Contributor Author

/run pipeline

@aamadeuss
Copy link
Contributor Author

2025/11/25 08:20:53 �[1m�[31mThere was an internal Error. Please verify the resources and retry after some time.�[39m�[0m

Pipeline failed because of schematics test, retrying

@aamadeuss
Copy link
Contributor Author

/run pipeline

Copy link
Contributor

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

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

This does not really achieve what we want. Your still hard coding versions here (you just added 4.20 and 4.21 which don't even exist yet). The goal here is to see if we can have logic that does not require hard coding versions. Alternatively, I suggested that we actually test what happens if we remove the validation. Will the provider catch unsupported OS if tried? Does it fail at plan or apply?

Maybe if we know an OS is longer supports after a certain version, we check for that. For example we know RHEL8 does not work after a certain version. Lets validate that. And then as Operating system versions are deprecated in later versions, we add validation for those. But what we don’t want is validation failing on new versions for operating systems that are supported. Like what happened when we moved to 4.19

@vkuma17
Copy link
Contributor

vkuma17 commented Nov 26, 2025

This does not really achieve what we want. Your still hard coding versions here (you just added 4.20 and 4.21 which don't even exist yet). The goal here is to see if we can have logic that does not require hard coding versions. Alternatively, I suggested that we actually test what happens if we remove the validation. Will the provider catch unsupported OS if tried? Does it fail at plan or apply?

Maybe if we know an OS is longer supports after a certain version, we check for that. For example we know RHEL8 does not work after a certain version. Lets validate that. And then as Operating system versions are deprecated in later versions, we add validation for those. But what we don’t want is validation failing on new versions for operating systems that are supported. Like what happened when we moved to 4.19

@ocofaigh i agree that we are still hardcoding versions but this PR is future proof... we hardcoded 4.20 because, 4.20 is going to support both RHCOS and RHEL9 while from 4.21 onwards only RHCOS will be supported. With this change, we don't need to make any changes afterwards even with 4.22 and onward versions
Reference doc: https://cloud.ibm.com/docs/openshift?topic=openshift-rhel_migrate&interface=ui

@ocofaigh ocofaigh merged commit 794961f into main Nov 26, 2025
2 checks passed
@ocofaigh ocofaigh deleted the 16658_workerpools_validation branch November 26, 2025 13:55
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 3.73.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review the worker_pools validation in base OCP

5 participants