OCP Branching Tasks
OCP Branching Tasks for the HyperShift Team
These are a set of tasks we need to perform on every OCP branching. We need to:
- Update the HyperShift Repository to add the latest supported OCP version - Update Supported Version
- Update the base images in our Dockerfiles (if they are available at branching) - Update Dockerfiles
- Update the Renovate configuration to include the new release branch - Update Renovate
- Update the OpenShift Release repository to fix the step registry configuration files - OpenShift/Release
- Update TestGrid to include the new OCP version tests - TestGrid
Danger
If test platform are testing new OCP releases before the release is cut the hypershift test will fail and block payloads until:
- There are at least two accepted nightly payloads for the new release.
- The supported versions in the HyperShift repository are updated.
HyperShift Repository
Update Supported Version
We need to add the latest supported version in the hypershift repository. We need to modify two files:
support/supportedversion/version.gowhich contains the variable calledLatestSupportedVersion. This one contains, as you can imagine, the Latest supported version. We need to put the new version here.support/supportedversion/version_test.gocontains the tests to validate the Latest version. It should comply with the established contract to support 2 versions prior to the Latest.
Example Supported Version Bump PR
Update Dockerfiles
We also need to bump the base images in our Dockerfiles.
Update Renovate Configuration
We need to add the new release branch to the Renovate configuration so that security updates are automatically applied to the release branch.
Update renovate.json to include the new release branch in two places:
- Add the new branch to the
baseBranchesarray at the top of the file - Add the new branch to the
matchBaseBranchesarray in the security-only Go updates package rule
Note
If any release branch has reached End of Life and is no longer supported, remove it from both locations in renovate.json to stop automated updates on that branch.
Example change for release-4.21:
{
"baseBranches": [
"main",
"release-4.16",
"release-4.17",
"release-4.18",
"release-4.19",
"release-4.20",
"release-4.21"
],
"packageRules": [
{
"description": "Enable security-only Go updates on release branches",
"matchManagers": ["gomod"],
"matchBaseBranches": [
"release-4.16",
"release-4.17",
"release-4.18",
"release-4.19",
"release-4.20",
"release-4.21"
],
"matchUpdateTypes": ["patch"]
}
]
}
Openshift/Release Repository
The Step registry config should be updated by Test Platform. However, the Test Platform is not aware of custom configurations of the different version for specific hypershift tests. So, we need to check over the Step registry config and make sure that the hypershift tests are correctly configured. Below is an example of the necessary changes to the Step registry config after test platform bumps:
We should also ensure that the latest release branch is using the Hypershift Operator and e2e from main.
Update TestGrid
We need to update TestGrid to include the new OCP version tests.
Here is an Example PR to do that.