Skip to content

Conversation

zetxqx
Copy link
Contributor

@zetxqx zetxqx commented Jul 22, 2025

Currently, the conformance report is using hard-coded variable BundleVersion in version.go. This PR get the version from annotation BundleVersionAnnotation of installed CRDs.

Tested locally, the following is an example generated report, I installed v0.5.0 CRDs.

GatewayAPIInferenceExtensionVersion: v0.5.0
apiVersion: gateway.networking.k8s.io/v1
date: "2025-07-22T05:30:18Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.1
implementation:
  contact:
  - gke-gateway-dev@google.com
  organization: GKE
  project: gke-gateway
  url: https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api
  version: TBD
kind: ConformanceReport
mode: default
profiles:
- core:
    result: success
    statistics:
      Failed: 0
      Passed: 9
      Skipped: 0
  name: Gateway
  summary: Core tests succeeded.

A follow up PR is to change BundleVersion from v1.0.0-dev to main-dev.

Copy link

netlify bot commented Jul 22, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 4e3a39d
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/68b0a5736bd83e0008fa5b30
😎 Deploy Preview https://deploy-preview-1214--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 22, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 22, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @zetxqx. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 22, 2025
@zetxqx
Copy link
Contributor Author

zetxqx commented Jul 22, 2025

/assign @robscott
/assign @nirrozenbaum

@ahg-g
Copy link
Contributor

ahg-g commented Jul 23, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 23, 2025
@kfswain
Copy link
Collaborator

kfswain commented Jul 23, 2025

/approve

This looks good to me. Will let one of the manual assignees give final stamp

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kfswain, zetxqx

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 23, 2025
@robscott
Copy link
Member

Thanks @zetxqx!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 24, 2025
@zetxqx
Copy link
Contributor Author

zetxqx commented Jul 24, 2025

Thanks! @kfswain

/hold

Looks like the manifest in the latest release(https://github.com/kubernetes-sigs/gateway-api-inference-extension/releases/tag/v0.5.1) does not have the annotation yet. This should be submitted after a new release.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 24, 2025
@kfswain
Copy link
Collaborator

kfswain commented Jul 24, 2025

Sorry, what annotation is needed? We probably wont have a release for a bit, so trying to understand what's preventing this from merging

@zetxqx
Copy link
Contributor Author

zetxqx commented Jul 24, 2025

Sorry, what annotation is needed? We probably wont have a release for a bit, so trying to understand what's preventing this from merging

@kfswain the change here reads the annotation from inferencePool's CRD to populate the ConformanceReport GatewayAPIInferenceExtensionVersion. However, currently in the v0.5.0 release we don't have the annotation attached. It's because my change #1134 is not included in the released manfest.yaml. Then when other's generating the report they may get an early returned error because of:

if inferenceVersion == "" {
      return "", errors.New("no gateway api inference extension CRDs with the proper annotations found in the cluster")
}

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 2, 2025
@danehans
Copy link
Contributor

Holding until v1.0 is cut, which will include the "inference.networking.k8s.io/bundle-version" CRD annotation.

@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 28, 2025
require.NoError(t, err, "error initializing conformance suite")

installedCRDs := &apiextensionsv1.CustomResourceDefinitionList{}
err = opts.Client.List(context.TODO(), installedCRDs)
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed the use of context in conformance is not aligned with best practices.
I was hoping to see context created one time in "main" (e.g., in the entry point), and then ctx is propagated in the function calls (usually as first arg).
I've never ran the conformance test suite myself, but if it's a long running process (more than few minutes), it may make sense to use context with signal handling (listening to SIGTERM, SIGKILL).
see example in our main file where we use SetupSignalHandler():

if err := runner.NewRunner().Run(ctrl.SetupSignalHandler()); err != nil {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Really good call! I've replaced it by creating a context.Background() at the start of the test run and propagating it down. The conformance tests is executed by go test. Each test function serves as its own entry point. The overall process termination is managed by the go test --timeout flag, so setting up a custom signal handler here isn't necessary as it would be in a long-running service.

Ref:

func TestConformance(t *testing.T) {
is the entryPoint for conformance tests which is run by go test

@robscott
Copy link
Member

Holding until v1.0 is cut, which will include the "inference.networking.k8s.io/bundle-version" CRD annotation.

@danehans any concerns with merging this now that we have this annotation in place for CRDs?

@danehans
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2025
@robscott
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 28, 2025
@k8s-ci-robot k8s-ci-robot merged commit 0aa64e5 into kubernetes-sigs:main Aug 28, 2025
9 of 10 checks passed
kfswain pushed a commit that referenced this pull request Aug 28, 2025
…rt GatewayAPIInferenceExtensionVersion (#1214)

* Use CRD annotation to get the inferencePool BundleVersion for ConformanceReport.

* ctx best practices.
@zetxqx zetxqx deleted the codegn branch September 29, 2025 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants