Skip to content

[golang] bump to golang 1.24#462

Merged
openshift-merge-bot[bot] merged 3 commits into
openstack-k8s-operators:mainfrom
stuggi:golang_1.24
Sep 22, 2025
Merged

[golang] bump to golang 1.24#462
openshift-merge-bot[bot] merged 3 commits into
openstack-k8s-operators:mainfrom
stuggi:golang_1.24

Conversation

@stuggi

@stuggi stuggi commented Aug 20, 2025

Copy link
Copy Markdown
Contributor
  • bump in go.mod (base and api)
  • bump go-toolset in Dockerfile
  • bump golang version and custom_image in github jobs ('.github/workflows')
  • Bump the golangci-lint version in the .pre-commit-config.yaml to v2.4.0
  • Bump build_root_image in .ci-operator.yaml to ci-build-root-golang-1.24-sdk-1.31 (if set)

Also bump dependencies for OpenShift 4.18. Update controller-runtime, Kubernetes dependencies, and testing tools to support OpenShift Container Platform 4.18 (Kubernetes 1.31):

  • controller-runtime: v0.17.6 → v0.19.7
  • Kubernetes core dependencies: v0.29.15 → v0.31.12
    • k8s.io/api: v0.31.12
    • k8s.io/apimachinery: v0.31.12
    • k8s.io/client-go: v0.31.12
    • k8s.io/apiextensions-apiserver: v0.31.12
  • k8s.io/utils: v0.0.0-20240711033017 → v0.0.0-20250820121507
  • controller-gen: v0.14.0 → v0.18.0
  • envtest: 1.29 → 1.31.0, setup-envtest@latest

To test on existing env, or after landed:

  • update golang to 1.24
  • delete current go.work* files
  • init go work files go work init
  • Delete tools in bin/ subdir of the repo

Depends-On: openstack-k8s-operators/install_yamls#1082
Depends-On: openstack-k8s-operators/openstack-operator#1567

Jira: OSPRH-12935

@softwarefactory-project-zuul

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/477dd87e87f246f782eeaaeed05eef16

openstack-k8s-operators-content-provider TIMED_OUT in 31m 03s
⚠️ manila-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider (non-voting)
⚠️ manila-operator-tempest SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider (non-voting)

type: string
type: object
required:
- databaseInstance

@stuggi stuggi Aug 22, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

seems there was an issue with the older controller-tools version. the database Instance was required since beginning. In general I think it should not be a problem since envs with enabled manila must have a db instance. there may be an issue in an existing env where manila is set with enabled: false in the ctlplane cr, but the manila.template with content, but not having the databaseInstance.

+ /go/src/github.com/openstack-k8s-operators/operator/bin/crd-schema-checker check-manifests --disabled-validators NoMaps --disabled-validators NoBools --disabled-validators ListsMustHaveSSATags --existing-crd-filename=/tmp/tmp.ZAgdKMzOVd/config/crd/bases/manila.openstack.org_manilas.yaml --new-crd-filename=config/crd/bases/manila.openstack.org_manilas.yaml
ERROR: "NoNewRequiredFields": crd/manilas.manila.openstack.org version/v1beta1 field/^.spec.databaseInstance is new and may not be required

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It shouldn't be a problem and this field should be required for the CR itself. I think we saw an issue in the past due to these missing parameters when transitioning the service from enabled false to true. Maybe having this field as required in the CRD avoid us that issue at deployment time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just for the record, addressing this in #472 as a pre golang bump PR

stuggi added a commit to stuggi/architecture that referenced this pull request Sep 18, 2025
There seems to be a bug in the current controller-gen version used,
which resulted in the databaseInstance in manila not to be a
required paramater.
With the bump controller-gen happening as part of the golang-bump
work the databaseInstance gets added as a required parameter [1].
This adds it to the ctlplane template.

[1] openstack-k8s-operators/manila-operator#462 (comment)

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
softwarefactory-project-zuul Bot added a commit to openstack-k8s-operators/architecture that referenced this pull request Sep 18, 2025
Add databaseInstance for manila in ctlplane template

There seems to be a bug in the current controller-gen version used, which resulted in the databaseInstance in manila not to be a required paramater.
With the bump controller-gen happening as part of the golang-bump work the databaseInstance gets added as a required parameter [1]. This adds it to the ctlplane template.
[1] openstack-k8s-operators/manila-operator#462 (comment)

Reviewed-by: Francesco Pantano <fpantano@redhat.com>
Reviewed-by: Andrew Bays <andrew.bays@gmail.com>
* bump in go.mod (base and api)
* bump go-toolset in Dockerfile
* bump in github jobs ('.github/workflows')
* Bump the golangci-lint version in the .pre-commit-config.yaml to v2.4.0
* Bump build_root_image in .ci-operator.yaml to ci-build-root-golang-1.24-sdk-1.31

Also fixes golangci-lint reported issues for new v2.4.0 version.

Jira: OSPRH-12935
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
Co-authored-by: Claude (Anthropic) claude@anthropic.com
Update controller-runtime, Kubernetes dependencies, and testing tools
to support OpenShift Container Platform 4.18 (Kubernetes 1.31).

Changes:
- controller-runtime: v0.17.6 → v0.19.7
- Kubernetes core dependencies: v0.29.15 → v0.31.12
  * k8s.io/api: v0.31.12
  * k8s.io/apimachinery: v0.31.12
  * k8s.io/client-go: v0.31.12
  * k8s.io/apiextensions-apiserver: v0.31.12
- k8s.io/utils: v0.0.0-20240711033017 → v0.0.0-20250820121507
- controller-gen: v0.14.0 → v0.18.0
- envtest: 1.29 → 1.31, setup-envtest@latest

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>

@fmount fmount left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/lgtm

@fmount

fmount commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

/test manila-operator-build-deploy-kuttl

@openshift-ci

openshift-ci Bot commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprince, fmount, stuggi

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:
  • OWNERS [dprince,fmount,stuggi]

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 ea6202c into openstack-k8s-operators:main Sep 22, 2025
9 checks passed
skovili pushed a commit to skovili/architecture that referenced this pull request Oct 13, 2025
There seems to be a bug in the current controller-gen version used,
which resulted in the databaseInstance in manila not to be a
required paramater.
With the bump controller-gen happening as part of the golang-bump
work the databaseInstance gets added as a required parameter [1].
This adds it to the ctlplane template.

[1] openstack-k8s-operators/manila-operator#462 (comment)

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
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.

4 participants