Skip to content

upgrade sdk-go - #503

Merged
clyang82 merged 1 commit into
openshift-online:mainfrom
skeeey:usdk
Mar 12, 2026
Merged

upgrade sdk-go#503
clyang82 merged 1 commit into
openshift-online:mainfrom
skeeey:usdk

Conversation

@skeeey

@skeeey skeeey commented Mar 11, 2026

Copy link
Copy Markdown

open-cluster-management-io/sdk-go#209 this pr to fix the flaky e2e test

@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown

Walkthrough

Bumps multiple dependencies in go.mod (Kubernetes ecosystem, gRPC, oauth2, etcd, CEL, controller-runtime, indirects) and adjusts an integration test to stop simulating Kubernetes work deletion, switching to REST-based verification of resource bundle deletion.

Changes

Cohort / File(s) Summary
Dependency Version Updates
go.mod
Updated numerous dependencies: oauth2 v0.32.0→v0.34.0, google.golang.org/grpc v1.78.0→v1.79.1; Kubernetes-related packages and Open Cluster Management modules bumped to v0.35.2+; cel.dev/expr and google/cel-go updated; etcd client packages v3.6.4→v3.6.5; sigs.k8s.io/controller-runtime v0.22.4→v0.23.3; several indirects added/updated (gojq, timefmt-go, protobufs, json-patch, etc.).
Integration test behavior
test/integration/resource_test.go
Removed simulation of Kubernetes work deletion and related status updates; deleted an unused import; replaced work-client deletion orchestration with a direct Maestro REST API check that the resource bundle is deleted within a timeout.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'upgrade sdk-go' directly matches the primary change of upgrading the sdk-go dependency and related Kubernetes ecosystem packages.
Description check ✅ Passed The description references the upstream fix (sdk-go PR #209) and clearly indicates the purpose is to upgrade sdk-go to fix a flaky e2e test.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
go.mod (1)

58-60: Note: Using pseudo-versions for Open Cluster Management packages.

The Open Cluster Management packages are using pseudo-versions (commit-based versions) rather than tagged releases. This is appropriate for incorporating the upstream fix mentioned in the PR description.

However, consider creating a follow-up task to upgrade to official tagged releases once they become available, as pseudo-versions can complicate dependency management and reproducibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` around lines 58 - 60, The go.mod currently pins Open Cluster
Management modules using pseudo-versions (open-cluster-management.io/api,
open-cluster-management.io/ocm, open-cluster-management.io/sdk-go); create a
follow-up task in the repo tracker to replace those pseudo-versions with
official tagged releases once available, and include steps in that task to
update the go.mod entries to the released versions, run `go get`/`go mod tidy`
to refresh go.sum, and run CI/tests (unit/integration) to validate compatibility
after the upgrade.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@go.mod`:
- Line 195: go.mod currently pins sigs.k8s.io/controller-runtime v0.23.3 while
other k8s.io modules are at v0.35.2, which is outside the officially tested
compatibility matrix; either downgrade the k8s.io/* modules (e.g.,
k8s.io/apimachinery, k8s.io/client-go, k8s.io/api) to v0.35.0 to match
sigs.k8s.io/controller-runtime v0.23.3, or upgrade
sigs.k8s.io/controller-runtime to a release that explicitly supports k8s.io
v0.35.2; update the matching module lines in go.mod and run go mod tidy to
ensure the dependency graph is consistent.

---

Nitpick comments:
In `@go.mod`:
- Around line 58-60: The go.mod currently pins Open Cluster Management modules
using pseudo-versions (open-cluster-management.io/api,
open-cluster-management.io/ocm, open-cluster-management.io/sdk-go); create a
follow-up task in the repo tracker to replace those pseudo-versions with
official tagged releases once available, and include steps in that task to
update the go.mod entries to the released versions, run `go get`/`go mod tidy`
to refresh go.sum, and run CI/tests (unit/integration) to validate compatibility
after the upgrade.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 08055c4f-80fd-46f4-954a-c554e69f7985

📥 Commits

Reviewing files that changed from the base of the PR and between c327376 and 5f62cae.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod

Comment thread go.mod
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
sigs.k8s.io/controller-runtime v0.22.4 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/controller-runtime v0.23.3 // indirect

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

controller-runtime v0.23.3 Kubernetes compatibility matrix

💡 Result:

controller-runtime v0.23.3 compatibility (tested/supported)

controller-runtime k8s.io/* + client-go it vendors Corresponding Kubernetes release line Minimum Go
v0.23.3 v0.35.0 Kubernetes v1.35.x (client-go v0.35.x matches Kubernetes v1.35.x) Go 1.25

Notes:

  • controller-runtime minor versions are tested against a specific client-go minor (others might work but are “by chance” and not supported/tested). [1]
  • v0.23.3’s go.mod pins k8s.io/api, k8s.io/apimachinery, k8s.io/client-go, etc. to v0.35.0 and sets go 1.25.0. [2]
  • client-go documents that for Kubernetes releases (>=1.17), v0.x.y tags are created to match each Kubernetes v1.x.y release (e.g., v0.17.0 == Kubernetes v1.17.0). [3]

Sources: [1] [2] [3]


🏁 Script executed:

grep -E "k8s.io/(api|apimachinery|client-go)" go.mod | head -20

Repository: openshift-online/maestro

Length of output: 297


Update controller-runtime to match officially tested Kubernetes API version.

controller-runtime v0.23.3 is officially tested and pinned to k8s.io v0.35.0, but the repository uses k8s.io v0.35.2. While v0.35.2 (a patch release) might work in practice, this combination is not officially supported or tested. Align the k8s.io packages to v0.35.0 to match the controller-runtime v0.23.3 compatibility matrix, or upgrade controller-runtime to a version that officially supports v0.35.2.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 195, go.mod currently pins sigs.k8s.io/controller-runtime
v0.23.3 while other k8s.io modules are at v0.35.2, which is outside the
officially tested compatibility matrix; either downgrade the k8s.io/* modules
(e.g., k8s.io/apimachinery, k8s.io/client-go, k8s.io/api) to v0.35.0 to match
sigs.k8s.io/controller-runtime v0.23.3, or upgrade
sigs.k8s.io/controller-runtime to a release that explicitly supports k8s.io
v0.35.2; update the matching module lines in go.mod and run go mod tidy to
ensure the dependency graph is consistent.

Signed-off-by: Wei Liu <liuweixa@redhat.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
go.mod (1)

199-199: Pseudo-version for structured-merge-diff - consider tracking for future update.

The structured-merge-diff/v6 dependency uses a pseudo-version pointing to a specific commit rather than an official release. This is likely pulled transitively by another dependency. Consider tracking upstream for when an official v6.3.2+ release becomes available to improve reproducibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@go.mod` at line 199, The go.mod currently pins
sigs.k8s.io/structured-merge-diff/v6 to a pseudo-version (d9cc6641c482) which is
transient; track the upstream project and, when an official v6.3.2+ tag is
published, replace the pseudo-version with the released semantic version (or add
a go.mod replace directive pointing to the released module) to improve
reproducibility and avoid pinning to a commit for
sigs.k8s.io/structured-merge-diff/v6.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@go.mod`:
- Line 199: The go.mod currently pins sigs.k8s.io/structured-merge-diff/v6 to a
pseudo-version (d9cc6641c482) which is transient; track the upstream project
and, when an official v6.3.2+ tag is published, replace the pseudo-version with
the released semantic version (or add a go.mod replace directive pointing to the
released module) to improve reproducibility and avoid pinning to a commit for
sigs.k8s.io/structured-merge-diff/v6.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2f17a476-f151-4aea-b640-45abcdc757ae

📥 Commits

Reviewing files that changed from the base of the PR and between 5f62cae and 5a19ab4.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod
  • test/integration/resource_test.go

@skeeey

skeeey commented Mar 11, 2026

Copy link
Copy Markdown
Author

/cc @clyang82

@clyang82 clyang82 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@clyang82
clyang82 merged commit b161323 into openshift-online:main Mar 12, 2026
13 checks passed
@skeeey
skeeey deleted the usdk branch March 12, 2026 08:57
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