-
Notifications
You must be signed in to change notification settings - Fork 2.3k
microshift-ci-doctor: add openshift-ci MCP and widen analysis budget #80509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,7 +196,8 @@ configure_claude() { | |
| "Write(//tmp/**)", | ||
| "Bash(bash plugins/microshift-ci/scripts/*)", | ||
| "Bash(python3 plugins/microshift-ci/scripts/*)", | ||
| "Skill(microshift-ci:*)" | ||
| "Skill(microshift-ci:*)", | ||
| "mcp__openshift-ci__*" | ||
| ] | ||
| } | ||
| } | ||
|
|
@@ -223,6 +224,31 @@ EOF | |
| else | ||
| echo "WARNING: Jira API token or username not available. Jira MCP will not be available." | ||
| fi | ||
|
|
||
| # Configure the OpenShift CI MCP — read-only Sippy/Release-Controller/ | ||
| # Search.CI access used by the analysis skills for job history and | ||
| # known-regression context. No credentials involved. Failures are | ||
| # non-fatal: skills record the absence in their analysis gaps. | ||
| echo "Configuring OpenShift CI MCP..." | ||
| local -r ocimcp_version="v0.5.0" | ||
| local -r ocimcp_sha256="a9221011c8aded3108a89a9ee8fa19bcd86daed0582d997ff51913445d5eb53e" | ||
| local -r ocimcp_bin="${WORKDIR}/bin/openshift-ci-mcp" | ||
| mkdir -p "${WORKDIR}/bin" | ||
| if curl -sL --retry 3 -o "${ocimcp_bin}" \ | ||
| "https://github.com/openshift-eng/openshift-ci-mcp/releases/download/${ocimcp_version}/openshift-ci-mcp-linux-amd64" && | ||
| echo "${ocimcp_sha256} ${ocimcp_bin}" | sha256sum --check --quiet; then | ||
| chmod +x "${ocimcp_bin}" | ||
| claude mcp add --scope user --transport stdio openshift-ci -- "${ocimcp_bin}" --tools core,jobs,tests,prs,search | ||
| echo "Waiting for OpenShift CI MCP to become available..." | ||
| if wait_for_mcp_status "openshift-ci" "Connected"; then | ||
| echo "OpenShift CI MCP is available." | ||
| else | ||
| echo "WARNING: OpenShift CI MCP did not connect. Job history will not be available." | ||
| fi | ||
| else | ||
| echo "WARNING: Failed to download or verify openshift-ci-mcp ${ocimcp_version}. Job history will not be available." | ||
| rm -f "${ocimcp_bin}" | ||
| fi | ||
| } | ||
|
|
||
| # | ||
|
|
@@ -243,10 +269,16 @@ load_secrets | |
| configure_claude | ||
|
|
||
| # Use the edge-tooling source pre-installed in the image | ||
| SRC_DIR="${EDGE_TOOLING_DIR}" | ||
| #SRC_DIR="${EDGE_TOOLING_DIR}" | ||
| #PLUGIN_DIR="${SRC_DIR}/plugins/microshift-ci" | ||
|
|
||
| SRC_DIR=/tmp/edge-tooling | ||
| PLUGIN_DIR="${SRC_DIR}/plugins/microshift-ci" | ||
| git clone https://github.com/pmtk/edge-tooling.git -b ci-doctor-rca "${SRC_DIR}" | ||
|
Comment on lines
+272
to
+277
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoded personal fork and feature branch must be reverted before merge. The workspace setup clones from Restore the original configuration or update to use the official repository: Suggested fix (restore original)-#SRC_DIR="${EDGE_TOOLING_DIR}"
-#PLUGIN_DIR="${SRC_DIR}/plugins/microshift-ci"
-#cd "${SRC_DIR}"
-
-SRC_DIR=/tmp/edge-tooling
+SRC_DIR="${EDGE_TOOLING_DIR}"
PLUGIN_DIR="${SRC_DIR}/plugins/microshift-ci"
-git clone https://github.com/pmtk/edge-tooling.git -b ci-doctor-rca "${SRC_DIR}"
+cd "${SRC_DIR}"🤖 Prompt for AI Agents |
||
|
|
||
| cd "${SRC_DIR}" | ||
|
|
||
|
|
||
| # Configure the GitHub token for MicroShift repo operations | ||
| { set +x; export GITHUB_TOKEN="${GITHUB_TOKEN_USHIFT}"; set -x; } | ||
|
|
||
|
|
@@ -260,17 +292,20 @@ echo "Running automatic closing of duplicate rebase PRs..." | |
| --filter 'NO-ISSUE: rebase-release' | ||
| echo "Automatic closing of duplicate rebase PRs completed" | ||
|
|
||
| # Run analysis on all releases and open rebase PRs (45m and 100 turns). | ||
| # Run analysis on all releases and open rebase PRs (60m and 150 turns). | ||
| # The deeper per-job root cause analysis (sosreport extraction, source | ||
| # correlation, causal chains) needs more wall clock than the old | ||
| # surface-level scan did. | ||
| echo "Running Claude to analyze MicroShift CI jobs and pull requests..." | ||
| CLAUDE_RC=0 | ||
| timeout 2700 claude \ | ||
| timeout 3600 claude \ | ||
| --model "${CLAUDE_MODEL}" \ | ||
| --max-turns 100 \ | ||
| --max-turns 150 \ | ||
| --output-format stream-json \ | ||
| --plugin-dir "${PLUGIN_DIR}" \ | ||
| -p "/microshift-ci:doctor ${RELEASE_VERSIONS}" \ | ||
| --verbose 2>&1 | tee "${CLAUDE_DOCTOR_LOG}" || CLAUDE_RC=$? | ||
| check_claude_rc "${CLAUDE_RC}" "doctor" 45 | ||
| check_claude_rc "${CLAUDE_RC}" "doctor" 60 | ||
|
|
||
| # Run bug creation for failed jobs (15m and 50 turns). | ||
| echo "Running Claude to create bugs for failed jobs..." | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add explicit network timeouts to the MCP binary download.
The new
curlcall retries, but without--connect-timeout/--max-timeit can hang long enough to burn step budget during network stalls.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents