Skip to content

Use opendatahub-io/kserve's latest ODH release as our kserve dependency#499

Closed
hdefazio wants to merge 8 commits intoopendatahub-io:incubatingfrom
hdefazio:odh_kserve_mod
Closed

Use opendatahub-io/kserve's latest ODH release as our kserve dependency#499
hdefazio wants to merge 8 commits intoopendatahub-io:incubatingfrom
hdefazio:odh_kserve_mod

Conversation

@hdefazio
Copy link
Copy Markdown
Contributor

@hdefazio hdefazio commented Aug 19, 2025

Description

RHOAIENG-31386
Replaces the kserve/kserve dependency in go.mod with the odh-v2.33 release of opendatahub-io/kserve

How Has This Been Tested?

I updated the odh-model-controller deployment to use the image quay.io/opendatahub/odh-model-controller:pr-498
Created the serving runtimes:

podman push kserve/sklearnserver:latest quay.io/hdefazio/sklearnserver

export SKLEARN_IMAGE=quay.io/hdefazio/sklearnserver:latest
export STORAGE_INITIALIZER_IMAGE=quay.io/opendatahub/kserve-storage-initializer:latest

kustomize build $PROJECT_ROOT/config/overlays/test/clusterresources |
  sed 's/ClusterServingRuntime/ServingRuntime/' |
  sed "s|kserve/sklearnserver:latest|${SKLEARN_IMAGE}|" |
  sed "s|kserve/storage-initializer:latest|${STORAGE_INITIALIZER_IMAGE}|" |
  oc apply -n rhoaieng-31386 -f -

then applied the following isvc:

apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
  annotations:
    serving.kserve.io/autoscalerClass: keda
    serving.kserve.io/deploymentMode: RawDeployment
  name: keda-test
  labels:
    networking.kserve.io/visibility: exposed
spec:
  predictor:
    autoScaling:
      metrics:
        - external:
            metric:
              backend: prometheus
              namespace: kserve-ci-e2e-test
              query: http_requests_per_second
              serverAddress: 'https://thanos-querier.openshift-monitoring.svc.cluster.local:9092'
            target:
              type: Value
              value: '50'
            authenticationRef:
              authModes: "bearer"
              authenticationRef:
                name: "inference-prometheus-auth"
          type: External
    maxReplicas: 5
    minReplicas: 1
    model:
      modelFormat:
        name: sklearn
      name: ''
      resources:
        limits:
          cpu: 100m
          memory: 256Mi
        requests:
          cpu: 50m
          memory: 128Mi
      storageUri: 'gs://kfserving-examples/models/sklearn/1.0/model'

The created keda-test ISVC was created successfully, with the authenticationRef field now reserved on the first oc apply. Without this change, authenticationRef was being removed from the ISVC because the kserve version defined in go.mod did not have the authenticationRef type defined.

Summary by CodeRabbit

  • Chores

    • Upgraded Go toolchain to 1.24 across development, build, and CI environments.
    • Refreshed container and dev environment images to Go 1.24.
    • Updated dependencies (including Kubernetes and telemetry libraries) for compatibility, stability, and security.
    • Added an optional development profile to use Go 1.22 for legacy setups.
  • Documentation

    • Updated prerequisites to require Go 1.24+.

Signed-off-by: Hannah DeFazio <h2defazio@gmail.com>
Signed-off-by: Hannah DeFazio <h2defazio@gmail.com>
Signed-off-by: Hannah DeFazio <h2defazio@gmail.com>
Signed-off-by: Hannah DeFazio <h2defazio@gmail.com>
Signed-off-by: Hannah DeFazio <h2defazio@gmail.com>
Signed-off-by: Hannah DeFazio <h2defazio@gmail.com>
Signed-off-by: Hannah DeFazio <h2defazio@gmail.com>
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hdefazio

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 19, 2025

Walkthrough

Project-wide upgrade to Go 1.24 across dev containers, CI workflows, container build, and documentation. go.mod updated to Go 1.24.6 with multiple dependency bumps, additions, removals, and a replace directive. Devspace image updated with a new profile for Go 1.22 fallback. No application code changes.

Changes

Cohort / File(s) Summary
Dev containers & build images
.devcontainer/devcontainer.json, Containerfile, dev_tools/devspace.yaml
Devcontainer image: golang 1.22 -> 1.24; Containerfile builder: UBI go-toolset 1.23.6 -> 1.24; Devspace devImage: 1.22-debug -> 1.24.2; added profile go1.22 to patch devImage back to 1.22.
CI workflows (Go toolchain & linter)
.github/workflows/lint.yml, .github/workflows/test.yml, .github/workflows/test-e2e.yml
Go setup: ~1.22 -> ~1.24 across workflows; golangci-lint-action: v1.61 -> v1.64.8 in lint workflow.
Module and dependencies
go.mod
go directive: 1.23.6 -> 1.24.6; multiple dependency bumps (k8s 0.32.3 -> 0.33.1, otel, golang.org/x/*, prometheus, etc.); additions (sigs.k8s.io/gateway-api, gateway-api-inference-extension); removals (govalidator, gofuzz); replace kserve -> opendatahub-io/kserve with pinned pseudo-version.
Documentation
README.md
Prerequisite Go version updated: v1.22.0+ -> v1.24.0+.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I nibbled the docs and bumped the Go,
From 1.22 to one-two-four—let’s roll! 🥕
Pipelines hop, containers glow,
Dependencies spring in tidy rows.
With ears up high, I ship this change—
Thump-thump: green fields within range! 🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@hdefazio hdefazio mentioned this pull request Aug 19, 2025
4 tasks
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 (8)
.github/workflows/test.yml (1)

15-19: Use go-version-file and enable module cache to avoid drift and speed up CI

Reading the version from go.mod keeps workflows in sync with the repo toolchain, and enabling cache speeds up builds/tests.

       - name: Setup Go
         uses: actions/setup-go@v5
         with:
-          go-version: '~1.24'
+          go-version-file: 'go.mod'
+          cache: true
.devcontainer/devcontainer.json (1)

3-3: Consider pinning the patch version for reproducibility

Using golang:1.24 floats to the latest 1.24.x. Pinning to the same patch as go.mod (e.g., 1.24.6) reduces drift between local dev and CI.

-  "image": "golang:1.24",
+  "image": "golang:1.24.6",
.github/workflows/lint.yml (1)

15-19: Read Go version from go.mod and enable cache

Keeps lint workflow synced to the repo toolchain and speeds up runs.

       - name: Setup Go
         uses: actions/setup-go@v5
         with:
-          go-version: '~1.24'
+          go-version-file: 'go.mod'
+          cache: true
.github/workflows/test-e2e.yml (1)

16-20: Use go-version-file and enable cache for E2E as well

This keeps E2E in lockstep with go.mod and speeds dependency resolution.

       - name: Setup Go
         uses: actions/setup-go@v5
         with:
-          go-version: '~1.24'
+          go-version-file: 'go.mod'
+          cache: true
Containerfile (1)

2-2: Pin builder image to exact patch (1.24.6) to match go.mod and improve reproducibility

Using a floating minor tag can drift over time. Given go.mod is set to go 1.24.6, pin the builder image to the same patch to keep builds reproducible and consistent with CI.

Apply this diff:

-FROM registry.access.redhat.com/ubi9/go-toolset:1.24 as builder
+FROM registry.access.redhat.com/ubi9/go-toolset:1.24.6 as builder

If 1.24.6 is unavailable in the registry, pin to the latest available 1.24.x tag or to a digest.

dev_tools/devspace.yaml (1)

58-58: Dev image version: consider pinning by digest or aligning to go 1.24.6

The base dev image is bumped to Go 1.24.2. To avoid toolchain drift between dev, CI, and the Containerfile’s builder, either:

  • align to 1.24.6 (to match go.mod), or
  • pin this tag by digest for reproducibility.
go.mod (2)

168-171: Replace to ODH KServe: verify commit aligns with odh-v2.33 release; prefer tag if available

The replace correctly switches to opendatahub-io/kserve. Please confirm the pinned commit f704774f7e6d corresponds to the intended odh-v2.33 release point. If the ODH repo exposes a tag for odh-v2.33, prefer pinning to that tag for clarity and discoverability.

Optionally (if a tag exists), switch to it:

-replace github.com/kserve/kserve => github.com/opendatahub-io/kserve v0.0.0-20250812054942-f704774f7e6d
+replace github.com/kserve/kserve => github.com/opendatahub-io/kserve odh-v2.33

167-167: Controller-runtime replace to v0.19.1: double-check compatibility with k8s 0.33.1 and your code

You require k8s.io/* v0.33.1 but override controller-runtime to v0.19.1 (to work around KEDA #6660). That downgrade can introduce version skew versus the Kubernetes libs and controller-runtime’s own compatibility matrix. Please ensure:

  • controller-runtime v0.19.1 is compatible with k8s v0.33.x used here, and
  • your code (and dependencies) don’t rely on APIs introduced in v0.20+.

If feasible, consider upgrading KEDA to a version that supports controller-runtime >= v0.20 to remove this global override.

I can help check controller-runtime/k8s compatibility guidance and propose options (e.g., bumping KEDA or isolating the dependency) if you share your target cluster versions and constraints.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3a670ac and 981b677.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (8)
  • .devcontainer/devcontainer.json (1 hunks)
  • .github/workflows/lint.yml (1 hunks)
  • .github/workflows/test-e2e.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • Containerfile (1 hunks)
  • README.md (1 hunks)
  • dev_tools/devspace.yaml (2 hunks)
  • go.mod (6 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
dev_tools/devspace.yaml

[error] 106-106: trailing spaces

(trailing-spaces)

🔇 Additional comments (6)
.github/workflows/test.yml (1)

18-18: All toolchain and kserve replace checks passed

  • go.mod specifies go 1.24.6
  • replace github.com/kserve/kserve => github.com/opendatahub-io/kserve … is present
  • No unintended Go 1.22 toolchain references (only indirect dependencies and devspace profile)
  • All CI workflows use actions/setup-go@v5 with go-version: '~1.24'
README.md (1)

20-20: LGTM: prerequisites aligned with toolchain upgrade

The Go prerequisite now matches the repo-wide upgrade.

.github/workflows/lint.yml (1)

23-24: LGTM: golangci-lint version bump

Pinned to v1.64.8, which aligns with Go 1.24 usage.

dev_tools/devspace.yaml (1)

105-105: Nice addition: go1.22 fallback profile

The selective patching via a profile is a clean way to preserve the legacy setup when needed.

Also applies to: 107-110

go.mod (2)

3-3: Go toolchain bumped to 1.24.6

LGTM. This matches the broader toolchain upgrade in the repo; just ensure all build surfaces (builder image, dev images, CI) are aligned to avoid patch-level drift.


27-31: Gateway API dependencies added but not used—only controller-runtime compatibility needs attention

  • Indirect deps found in go.mod:
    • sigs.k8s.io/gateway-api v1.2.1
    • sigs.k8s.io/gateway-api-inference-extension v0.3.0
  • No direct imports of these modules in code.
  • No Gateway API CRD kinds (Gateway, HTTPRoute, ReferenceGrant, BackendTLSPolicy, GRPCRoute, TLSRoute, UDPRoute, TCPRoute) in config/.

Action: verify your controller-runtime version (v0.19.1) is compatible with Kubernetes API v0.33.1.

Comment thread dev_tools/devspace.yaml
# path: ./ui # Path-based dependencies (for monorepos)

profiles:
- name: go1.22
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

Fix YAML lint error: trailing space on profile name

Yamllint flags a trailing space at Line 106. Remove it to satisfy linting.

Apply this diff:

-  - name: go1.22 
+  - name: go1.22
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: go1.22
- name: go1.22
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 106-106: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In dev_tools/devspace.yaml around line 106 the profile name has a trailing space
("go1.22 "), which triggers a yamllint trailing-space error; remove the trailing
space so the entry reads "go1.22" (no extra whitespace), save the file and
re-run the linter to confirm the error is resolved.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 19, 2025

@hdefazio: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/unit 981b677 link true /test unit

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@hdefazio
Copy link
Copy Markdown
Contributor Author

related threads from the previous pr:
#498 (comment)
#498 (comment)

@hdefazio
Copy link
Copy Markdown
Contributor Author

closing in favor of #501 to resolve rebasing issues

@hdefazio hdefazio closed this Aug 20, 2025
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.

1 participant