Skip to content

Conversation

@gibizer
Copy link
Contributor

@gibizer gibizer commented Nov 11, 2024

Renovate cannot follow dep version based on branching. So this hack runs
make force-bump as a post update task in renovate run. That make target
ensures that dependencies from openstack-k8s-operator org are bumped
according to the current branch, 18.0-fr1.

Note that git reset --hard HEAD is needed before make force-bump as at
this point renovate already bumped all the dependencies based
pseudoversions and this could mean that transitively bumped the versions
of modules outside of openstack-k8s-operators, e.g. k8s.io. The make
force-bump only pulls the openstack-k8s-operators dependencies based on
the branch but it won't pull back other deps like k8s.io. So git reset
is used to create a clean slate.

Related: OSPRH-8355

@gibizer gibizer changed the base branch from main to 18.0-fr1 November 11, 2024 15:34
@gibizer gibizer changed the title 18.0 fr1 renovate [renovate]Run make force-dep Nov 11, 2024
"commands": ["make force-bump", "make gowork", "make tidy", "make manifests generate"],
"fileFilters": ["**/go.mod", "**/go.sum", "**/*.go", "**/*.yaml"],
"executionMode": "update"
"executionMode": "branch"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this means the post update task only runs one to all go.mod update separately.

@gibizer
Copy link
Contributor Author

gibizer commented Nov 11, 2024

/hold need the rest of the patches lined up

Comment on lines +7 to +8
"commitMessageExtra": "",
"prBodyColumns": ["Package"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are needed to hide the incorrect information renovate knows about the generated bump. Renovate does the bump to the latest version regardless the post update tasks and try to record that into the commit message. That bump is overwritten by the make force-dep post update task.

gibizer added a commit to gibizer/openstack-operator that referenced this pull request Nov 11, 2024
This enables renovate run on 18.0-fr1 branch. Please note that we have a
special config for 18.0-fr1 enabled in
openstack-k8s-operators#1178

Related: OSPRH-8355
{
"extends": [
"github>openstack-k8s-operators/renovate-config:default.json5"
"github>openstack-k8s-operators/renovate-config:stable.json5"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defined in openstack-k8s-operators/renovate-config#24 in a way that it only allows bump of deps within the openstack-k8s-operators org.

Renovate cannot follow dep version based on branching. So this hack runs
make force-bump as a post update task in renovate run. That make target
ensures that dependencies from openstack-k8s-operator org are bumped
according to the current branch, 18.0-fr1.
Note that git reset --hard HEAD is needed before make force-bump as at
this point renovate already bumped all the dependencies based
pseudoversions and this could mean that transitively bumped the versions
of modules outside of openstack-k8s-operators, e.g. k8s.io. The make
force-bump only pulls the openstack-k8s-operators dependencies based on
the branch but it won't pull back other deps like k8s.io. So git reset
is used to create a clean slate.

Related: OSPRH-8355
@gibizer
Copy link
Contributor Author

gibizer commented Nov 11, 2024

This is the example run from all the related changes gibizer#9 please check if this is the bump we want on 18.0-fr1.

],
"postUpgradeTasks": {
"commands": ["make gowork", "make tidy", "make manifests generate"],
"commands": ["git reset --hard HEAD","make force-bump", "make gowork", "make tidy", "make manifests generate"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • git reset is needed to avoid transitive dependencies leaking in from the bump renovate did.
  • make force-bump will pull the openstack-k8s-operators related deps from the 18.0-fr1 branch.

@stuggi
Copy link
Contributor

stuggi commented Nov 12, 2024

/test openstack-operator-build-deploy-kuttl

@stuggi
Copy link
Contributor

stuggi commented Nov 12, 2024

lgtm

@gibizer
Copy link
Contributor Author

gibizer commented Nov 12, 2024

/unhold necessary deps has been landed.

@gibizer
Copy link
Contributor Author

gibizer commented Nov 12, 2024

/unhold

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fao89, gibizer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 4eb08e1 into openstack-k8s-operators:18.0-fr1 Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants