-
Notifications
You must be signed in to change notification settings - Fork 2.3k
USHIFT-7381: Add PCP dashboard post step for MicroShift e2e jobs #82007
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
Open
suleymanakbas91
wants to merge
10
commits into
openshift:main
Choose a base branch
from
suleymanakbas91:feat/pcp-dashboard-step
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
931e01b
feat: add PCP dashboard post step for MicroShift e2e jobs
suleymanakbas91 9a6e22f
fix: emit warning on pmlogger copy failure instead of silent suppression
suleymanakbas91 194bcdc
fix: add timeout to pcp-dashboard step (required with best_effort)
suleymanakbas91 6e262a6
chore: add generated registry metadata for pcp-dashboard step
suleymanakbas91 948c7ec
fix: drop --build-id from pcp-dashboard step invocation
suleymanakbas91 46c9ceb
fix: drop --title from PCP dashboard invocation
suleymanakbas91 f7a64ac
fix: follow symlinks when collecting PCP archives from hypervisor
suleymanakbas91 6feb4ac
fix: prefer shared artifacts volume for scenario-info PCP data
suleymanakbas91 fed3ee3
fix: download VM PCP archives from GCS instead of SSH
suleymanakbas91 5ef877e
fix: handle missing scenario-info gracefully in pcp-dashboard step
suleymanakbas91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
ci-operator/step-registry/openshift/microshift/infra/pcp-dashboard/OWNERS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| approvers: | ||
| - openshift-edge-approvers | ||
| options: {} | ||
| reviewers: | ||
| - openshift-edge-reviewers |
52 changes: 52 additions & 0 deletions
52
...shift/microshift/infra/pcp-dashboard/openshift-microshift-infra-pcp-dashboard-commands.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| #!/bin/bash | ||
| set -xeuo pipefail | ||
|
|
||
| # shellcheck disable=SC1091 | ||
| source "${SHARED_DIR}/ci-functions.sh" | ||
| ci_script_prologue | ||
| trap_subprocesses_on_term | ||
|
|
||
| EDGE_TOOLING_DIR="${EDGE_TOOLING_DIR:-/opt/app-root/src/edge-tooling}" | ||
| PCP_SCRIPTS="${EDGE_TOOLING_DIR}/plugins/microshift-ci/scripts/pcp-graphs" | ||
| LOCAL_ARTIFACTS=$(mktemp -d) | ||
|
|
||
| # Construct GCS path to the metal-tests step's scenario-info. | ||
| # The metal-tests step uploads scenario-info (including pcp-archives.tar) to GCS, | ||
| # but these files are no longer on the hypervisor by the time this post step runs. | ||
| if [ "${JOB_TYPE}" == "presubmit" ]; then | ||
| GCS_JOB_PATH="pr-logs/pull/${REPO_OWNER}_${REPO_NAME}/${PULL_NUMBER}/${JOB_NAME}/${BUILD_ID}" | ||
| else | ||
| GCS_JOB_PATH="logs/${JOB_NAME}/${BUILD_ID}" | ||
| fi | ||
| GCS_BASE="gs://test-platform-results/${GCS_JOB_PATH}" | ||
|
|
||
| # Find scenario-info path (wildcard handles different workflow names) | ||
| SCENARIO_GCS=$(gsutil ls -d "${GCS_BASE}/artifacts/*/openshift-microshift-e2e-metal-tests/artifacts/scenario-info/" 2>/dev/null | head -1 || true) | ||
|
|
||
| if [ -n "${SCENARIO_GCS}" ]; then | ||
| echo "Downloading VM PCP archives from GCS..." | ||
| while IFS= read -r gcs_file; do | ||
| rel="${gcs_file#"${SCENARIO_GCS}"}" | ||
| mkdir -p "${LOCAL_ARTIFACTS}/$(dirname "${rel}")" | ||
| gsutil -q cp "${gcs_file}" "${LOCAL_ARTIFACTS}/${rel}" | ||
| done < <(gsutil ls -r "${SCENARIO_GCS}" 2>/dev/null | grep -E '(pcp-archives\.tar|junit\.xml)$') | ||
| else | ||
| echo "WARNING: could not find scenario-info in GCS at ${GCS_BASE}" | ||
| fi | ||
|
|
||
| # Copy hypervisor PCP logs if available | ||
| PMLOGS_DIR=/var/log/pcp/pmlogger | ||
| if ssh "${INSTANCE_PREFIX}" "[ -d \"${PMLOGS_DIR}\" ]" ; then | ||
| mkdir -p "${LOCAL_ARTIFACTS}/pmlogs" | ||
| if ! scp -r "${INSTANCE_PREFIX}:${PMLOGS_DIR}/"* "${LOCAL_ARTIFACTS}/pmlogs/" ; then | ||
| echo "WARNING: failed to copy hypervisor pmlogger data, skipping" | ||
| fi | ||
| fi | ||
|
|
||
| # Generate the interactive PCP dashboard | ||
| echo "Generating PCP dashboard..." | ||
| bash "${PCP_SCRIPTS}/generate-dashboard.sh" \ | ||
| --local "${LOCAL_ARTIFACTS}" \ | ||
| --output "${ARTIFACT_DIR}/custom-link-pcp.html" | ||
|
|
||
| rm -rf "${LOCAL_ARTIFACTS}" | ||
11 changes: 11 additions & 0 deletions
11
...microshift/infra/pcp-dashboard/openshift-microshift-infra-pcp-dashboard-ref.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "path": "openshift/microshift/infra/pcp-dashboard/openshift-microshift-infra-pcp-dashboard-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "openshift-edge-approvers" | ||
| ], | ||
| "reviewers": [ | ||
| "openshift-edge-reviewers" | ||
| ] | ||
| } | ||
| } |
25 changes: 25 additions & 0 deletions
25
...penshift/microshift/infra/pcp-dashboard/openshift-microshift-infra-pcp-dashboard-ref.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| ref: | ||
| as: openshift-microshift-infra-pcp-dashboard | ||
| from_image: | ||
| namespace: ci | ||
| name: edge-tooling-ai-helpers | ||
| tag: latest | ||
| commands: openshift-microshift-infra-pcp-dashboard-commands.sh | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 200Mi | ||
| timeout: 15m | ||
| grace_period: 10m | ||
| best_effort: true | ||
| env: | ||
| - name: HOME | ||
| default: /tmp/secret | ||
| credentials: | ||
| - namespace: test-credentials | ||
| name: microshift-rhsm-creds | ||
| mount_path: /var/run/rhsm/ | ||
| documentation: |- | ||
| Generates an interactive PCP performance dashboard from scenario VM and | ||
| hypervisor PCP archives, producing a custom-link-pcp.html artifact that | ||
| Spyglass renders as a "Test PCP" toggle in Prow job results. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.