Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,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 +246 to +251

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.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Hardcoded personal fork and feature branch must be reverted before merge.

The workspace setup clones from pmtk/edge-tooling.git branch ci-doctor-rca instead of using the pre-installed EDGE_TOOLING_DIR. If merged, production CI would depend on a personal fork and feature branch that may disappear or diverge.

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
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/openshift/edge-tooling/microshift-ci/doctor/openshift-edge-tooling-microshift-ci-doctor-commands.sh`
around lines 272 - 278, The workspace setup in the script is cloning from a
personal fork (pmtk/edge-tooling.git) on a feature branch (ci-doctor-rca)
instead of using the pre-installed EDGE_TOOLING_DIR variable. Revert to the
original configuration by uncommenting the three lines that set SRC_DIR to use
EDGE_TOOLING_DIR and PLUGIN_DIR relative to it, then remove the hardcoded
SRC_DIR assignment to /tmp/edge-tooling and the entire git clone command that
references the personal fork and feature branch.


cd "${SRC_DIR}"


# Configure the GitHub token for MicroShift repo operations
{ set +x; export GITHUB_TOKEN="${GITHUB_TOKEN_USHIFT}"; set -x; }

Expand All @@ -260,17 +266,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..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ref:
requests:
cpu: 2000m
memory: 4Gi
timeout: 1h30m0s
timeout: 2h15m0s
grace_period: 10m0s
documentation: |-
Analyzes MicroShift periodic jobs and pull requests using Claude AI.
Expand Down