Skip to content

OCPMCP-290: add anthropic/gemini vertex jobs#81118

Open
grokspawn wants to merge 3 commits into
openshift:mainfrom
grokspawn:vertex-jobs
Open

OCPMCP-290: add anthropic/gemini vertex jobs#81118
grokspawn wants to merge 3 commits into
openshift:mainfrom
grokspawn:vertex-jobs

Conversation

@grokspawn

@grokspawn grokspawn commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Builds off #78018, but switches to a multi-step inline test instead of a container test to access mounted credentials.

Summary by CodeRabbit

This PR updates OpenShift CI configuration for the MCP server to add two optional Vertex-based evaluation steps (Google Gemini and Anthropic Claude). In practical terms, it switches to a multi-step inline mcpchecker workflow so the job can access mounted credentials during the test run.

What changed

  • Updated ci-operator/config/openshift/openshift-mcp-server/openshift-openshift-mcp-server-main.yaml to add two new optional MCP checker evaluation steps:
    • mcpchecker-eval-google
    • mcpchecker-eval-anthropic
  • Each step:
    • Mounts the ocp-mcp credential (from test-credentials) at /var/run/ocp-mcp
    • Runs an inline shell script with strict mode (set -euo pipefail)
    • Sets Vertex-related environment flags:
      • Google Gemini: GOOGLE_CLOUD_LOCATION=us-east1 and GEMINI_USE_VERTEX=1
      • Anthropic Claude: GOOGLE_CLOUD_LOCATION=us-east1 and ANTHROPIC_USE_VERTEX=1
    • Points credentials to /var/run/ocp-mcp/service-account.json
    • Derives GOOGLE_CLOUD_PROJECT by parsing the mounted service account JSON via an inline python3 -c command
    • Builds and prepares the server/tooling:
      • GOFLAGS='-mod=readonly' make build
      • GOFLAGS='' make mcpchecker
      • Starts the MCP server in the background (make run-server TOOLSETS=core,config)
      • Registers a best-effort shutdown handler (trap 'make stop-server || true' EXIT)
    • Executes _output/tools/bin/mcpchecker check in JSON mode (--output json) with --label-selector suite=core
    • Uses the provided eval YAML specific to the provider (below)
    • Sets grace_period: 1m0s and resources (cpu: 500m, memory: 200Mi)

Eval suites used

  • mcpchecker-eval-google: evals/core-eval-testing/builtin-google/eval-core.yaml
  • mcpchecker-eval-anthropic: evals/core-eval-testing/builtin-anthropic/eval-core.yaml

CI impact

  • Both steps are marked optional: true, so they can be exercised without necessarily blocking the overall MCP server CI run if they fail.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 25, 2026
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The CI config adds two optional MCP checker evaluation steps that mount ocp-mcp credentials, build and run the MCP server, and execute separate Google and Anthropic eval suites.

Changes

OpenShift MCP eval CI steps

Layer / File(s) Summary
Google eval step
ci-operator/config/openshift/openshift-mcp-server/openshift-openshift-mcp-server-main.yaml
Adds mcpchecker-eval-google, which mounts ocp-mcp, derives GOOGLE_CLOUD_PROJECT, builds and runs the MCP server, installs mcpchecker, and runs the Google eval YAML with JSON output.
Anthropic eval step
ci-operator/config/openshift/openshift-mcp-server/openshift-openshift-mcp-server-main.yaml
Adds mcpchecker-eval-anthropic, which mounts ocp-mcp, sets Anthropic Vertex usage, builds and runs the MCP server, installs mcpchecker, and runs the Anthropic eval YAML with JSON output.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning The new mcpchecker jobs call Vertex/GCP and Anthropic-backed evals, so they need external connectivity and won’t work in disconnected IPv6 CI. IPv6 and disconnected network compatibility notice: verify these jobs in the IPv6 disconnected payload job, or gate/skip them when external API access is unavailable.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed No changed Ginkgo specs contain It/Describe/Context/When titles; the only new job names in YAML are static strings.
Test Structure And Quality ✅ Passed Only CI YAML changed; no Ginkgo test code was added or modified, so the test-structure check is not applicable.
Microshift Test Compatibility ✅ Passed PR only adds CI config for mcpchecker eval jobs; no new in-repo Ginkgo tests or MicroShift-unsafe APIs/assumptions were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: The PR only adds CI job YAML for mcpchecker evals; no new Ginkgo/Describe/It tests or SNO-sensitive node assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only adds ci-operator test steps; no manifests, controllers, node selectors, affinities, replicas, or topology constraints.
Ote Binary Stdout Contract ✅ Passed Only a CI config YAML changed; no process-level binary code or stdout writes were added.
No-Weak-Crypto ✅ Passed The PR only adds CI YAML/shell steps; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token timing-prone comparisons were found.
Container-Privileges ✅ Passed The new ci-operator YAML only adds inline test steps with a creds mount; no privileged, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation fields are present.
No-Sensitive-Data-In-Logs ✅ Passed PASS: The new CI steps don’t echo or print secrets; the only print is a subshell extracting project_id into a variable, not a log.
Title check ✅ Passed The title clearly matches the main change: adding Anthropic and Gemini Vertex jobs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ci-operator/config/openshift/openshift-mcp-server/openshift-openshift-mcp-server-main.yaml`:
- Around line 67-74: The eval job is masking real failures by forcing mcpchecker
to succeed with “|| true”, so update the job to preserve the actual exit status
while keeping cleanup separate. In the affected check steps for mcpchecker,
replace the inline success override with a trap-based cleanup that always runs
make stop-server, and let mcpchecker return its real status so the optional jobs
still report failures correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 811f0b2c-ad67-458f-9213-c8216f02c0e5

📥 Commits

Reviewing files that changed from the base of the PR and between 6811336 and 0881c93.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/openshift/openshift-mcp-server/openshift-openshift-mcp-server-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (1)
  • ci-operator/config/openshift/openshift-mcp-server/openshift-openshift-mcp-server-main.yaml

@dlom

dlom commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@dlom: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@grokspawn

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@grokspawn: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@grokspawn

Copy link
Copy Markdown
Contributor Author

/hold
#81118 (comment) must be resolved before this merges.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2026
@grokspawn grokspawn force-pushed the vertex-jobs branch 2 times, most recently from 968d084 to f08c1ea Compare June 26, 2026 19:45
@grokspawn

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@grokspawn: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@grokspawn

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@grokspawn: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@grokspawn

Copy link
Copy Markdown
Contributor Author

/hold cancel
now bubbles up the exit status from mcpchecker

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2026
@grokspawn

Copy link
Copy Markdown
Contributor Author

containers/kubernetes-mcp-server#1241 merged, but needs to be downstreamed before this can be re-evaluated

@grokspawn

Copy link
Copy Markdown
Contributor Author

This appears sound, but cannot merge w/o the extra rehearsal jobs, so I'll switch this from draft but with a hold until those pass.

@grokspawn grokspawn marked this pull request as ready for review July 1, 2026 18:47
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 1, 2026
@grokspawn

Copy link
Copy Markdown
Contributor Author

/hold
until the new jobs rehearse cleanly

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2026
@openshift-ci openshift-ci Bot requested review from Cali0707 and matzew July 1, 2026 18:47
@grokspawn

grokspawn commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

openshift/openshift-mcp-server#369 merged (this was actually the wrong PR series to unblock this PR).

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@grokspawn: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@grokspawn

Copy link
Copy Markdown
Contributor Author

openshift/openshift-mcp-server#379 merged, re-trying rehearsals

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@grokspawn: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@grokspawn

Copy link
Copy Markdown
Contributor Author

mcpchecker/mcpchecker#322 merged to fix relative path references for judge config

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@grokspawn: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@Cali0707

Copy link
Copy Markdown
Contributor

@grokspawn looking at the logs from the google job which did run mcpchecker, I think we need to install kubectl in the job:

output: /go/src/github.com/openshift/openshift-mcp-server/evals/tasks/core/create-simple-rbac/setup.sh: line 2: kubectl: command not found
/go/src/github.com/openshift/openshift-mcp-server/evals/tasks/core/create-simple-rbac/setup.sh: line 3: kubectl: command not found
/go/src/github.com/openshift/openshift-mcp-server/evals/tasks/core/create-simple-rbac/setup.sh: line 4: kubectl: command not found

Many tasks rely on it being present

@grokspawn

Copy link
Copy Markdown
Contributor Author

Last rehearsal pulled mcpchecker v0.0.18 which didn't have the relative pathing corrected yet. v0.0.19 is out which does, so re-rehearsing.

/pj-rehearse

and also re-running failed CI

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@grokspawn: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@grokspawn

grokspawn commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

/retitle OCPMCP-290: add anthropic/gemini vertex jobs

@openshift-ci openshift-ci Bot changed the title add anthropic/gemini vertex jobs OCPMCP-290: add anthropic/gemini vertex jobs Jul 15, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 15, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@grokspawn: This pull request references OCPMCP-290 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Builds off #78018, but switches to a multi-step inline test instead of a container test to access mounted credentials.

Summary by CodeRabbit

This PR updates OpenShift CI configuration for the MCP server to add two optional Vertex-based evaluation steps (Google Gemini and Anthropic Claude). In practical terms, it switches to a multi-step inline mcpchecker workflow so the job can access mounted credentials during the test run.

What changed

  • Updated ci-operator/config/openshift/openshift-mcp-server/openshift-openshift-mcp-server-main.yaml to add two new optional MCP checker evaluation steps:
  • mcpchecker-eval-google
  • mcpchecker-eval-anthropic
  • Each step:
  • Mounts the ocp-mcp credential (from test-credentials) at /var/run/ocp-mcp
  • Runs an inline shell script with strict mode (set -euo pipefail)
  • Sets Vertex-related environment flags:
    • Google Gemini: GOOGLE_CLOUD_LOCATION=us-east1 and GEMINI_USE_VERTEX=1
    • Anthropic Claude: GOOGLE_CLOUD_LOCATION=us-east1 and ANTHROPIC_USE_VERTEX=1
  • Points credentials to /var/run/ocp-mcp/service-account.json
  • Derives GOOGLE_CLOUD_PROJECT by parsing the mounted service account JSON via an inline python3 -c command
  • Builds and prepares the server/tooling:
    • GOFLAGS='-mod=readonly' make build
    • GOFLAGS='' make mcpchecker
    • Starts the MCP server in the background (make run-server TOOLSETS=core,config)
    • Registers a best-effort shutdown handler (trap 'make stop-server || true' EXIT)
  • Executes _output/tools/bin/mcpchecker check in JSON mode (--output json) with --label-selector suite=core
  • Uses the provided eval YAML specific to the provider (below)
  • Sets grace_period: 1m0s and resources (cpu: 500m, memory: 200Mi)

Eval suites used

  • mcpchecker-eval-google: evals/core-eval-testing/builtin-google/eval-core.yaml
  • mcpchecker-eval-anthropic: evals/core-eval-testing/builtin-anthropic/eval-core.yaml

CI impact

  • Both steps are marked optional: true, so they can be exercised without necessarily blocking the overall MCP server CI run if they fail.

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 openshift-eng/jira-lifecycle-plugin repository.

@grokspawn

Copy link
Copy Markdown
Contributor Author

/hold cancel
rehearse jobs are clean

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 15, 2026
@grokspawn

Copy link
Copy Markdown
Contributor Author

/hold
... no they're not. I just wasn't looking in the right place.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 15, 2026
@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: grokspawn
Once this PR has been reviewed and has the lgtm label, please assign deads2k, kaustubh-pande for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Copy Markdown
Contributor

@grokspawn: pj-rehearse could not automatically process this event because the request waited in queue for longer than 5 minutes. Use /pj-rehearse to trigger rehearsals manually.

@Cali0707 Cali0707 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.

LOVE the approach here, just some notes about the model/agent config methods

workflow: ipi-aws
```

Requires the `openshift-mcp-server-mcpchecker-credentials` secret in the `test-credentials`

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.

I dont think this is true, see: https://github.com/mcpchecker/mcpchecker/blob/main/docs/how-to/configure-agents.md#llm-agent (note that for openai, we only need OPENAI_API_KEY, etc.)

This seems to be referring to the older config from mcpchekcer

Reads model API credentials from the openshift-mcp-server-mcpchecker-credentials
secret and writes them as env var exports to ${SHARED_DIR}/mcpchecker-creds.env
for consumption by the openshift-mcp-server-mcpchecker-eval step.
Expected secret keys: MODEL_BASE_URL, MODEL_KEY, JUDGE_BASE_URL,

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.

As other spot, we probably only need to extract OPENAI_API_KEY key (which if the env var key is the literal in the secret, we probably need to rename in vault as well)

Comment on lines +11 to +15
export MODEL_BASE_URL="$(cat "${SECRETS_DIR}/MODEL_BASE_URL")"
export MODEL_KEY="$(cat "${SECRETS_DIR}/MODEL_KEY")"
export JUDGE_BASE_URL="$(cat "${SECRETS_DIR}/JUDGE_BASE_URL")"
export JUDGE_API_KEY="$(cat "${SECRETS_DIR}/JUDGE_API_KEY")"
export JUDGE_MODEL_NAME="$(cat "${SECRETS_DIR}/JUDGE_MODEL_NAME")"

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.

Same here, old format

Signed-off-by: grokspawn <jordan@nimblewidget.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@grokspawn: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-openshift-mcp-server-main-mcpchecker-eval-anthropic openshift/openshift-mcp-server presubmit Presubmit changed
pull-ci-openshift-openshift-mcp-server-main-mcpchecker-eval-google openshift/openshift-mcp-server presubmit Presubmit changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@grokspawn: The following tests 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/step-registry-shellcheck c1174fe link true /test step-registry-shellcheck
ci/prow/owners c1174fe link true /test owners

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants