-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[PERFSCALE-5187] Enable Control plane baseline tests on existing BM CPT Lab for Telco Core RDS - OCP 5.0 Nightly builds #83169
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,17 +13,39 @@ bastion=$(cat ${CLUSTER_PROFILE_DIR}/address) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| get_idms_manifest() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Getting the ImageDigestMirrorSet manifest from the PREGA build server" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| QUAY_URL="https://quay.io/api/v1/repository/prega/prega-operator-index/tag/?limit=100&page=1" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OCP_VERSION=$(oc get clusterversion --no-headers | grep -o '[4].[0-9][0-9]' | head -1 | awk '{print "v"$0}') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OCP_VERSION=$(oc get clusterversion --no-headers | grep -oE '[0-9]+\.[0-9]+' | head -1 | awk '{print "v"$0}') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DIGEST=$(curl -s -H "Authorization: Bearer ${QUAY_ACCESS_TOKEN}" ${QUAY_URL} | jq -r --arg tag "$OCP_VERSION" '.tags[] | select(.name == $tag) | .manifest_digest' | head -1) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OPERATOR_PREGA_VERSION=$(curl -s -H "Authorization: Bearer ${QUAY_ACCESS_TOKEN}" ${QUAY_URL} | jq -r --arg digest "$DIGEST" --arg tag "$OCP_VERSION" '.tags[] | select(.manifest_digest == $digest and .name != $tag) | .name' | sort -u) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
17
to
18
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. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
file='ci-operator/step-registry/openshift-qe/installer/bm/day2/prega-operators/openshift-qe-installer-bm-day2-prega-operators-commands.sh'
rg -n -C 3 'set .*x|set -o xtrace|set \+x|QUAY_ACCESS_TOKEN' "$file"Repository: openshift/release Length of output: 1496 🏁 Script executed: #!/bin/bash
set -euo pipefail
file='cioperator/step-registry/openshift-qe/installer/bm/day2/prega-operators/openshift-qe-installer-bm-day2-prega-operators-commands.sh'
printf 'Tracing/token occurrences in %s:\n' "$file"
rg -n -C 2 'set .*x|set -o xtrace|set \+x|QUAY_ACCESS_TOKEN|curl -s -H "Authorization: Bearer \${QUAY_ACCESS_TOKEN}"|^ *set -x$' "$file" || true
printf '\nFirst 90 lines:\n'
sed -n '1,90p' "$file"Repository: openshift/release Length of output: 801 🏁 Script executed: #!/bin/bash
set -euo pipefail
file='ci-operator/step-registry/openshift-qe/installer/bm/day2/prega-operators/openshift-qe-installer-bm-day2-prega-operators-commands.sh'
printf 'Tracing/token occurrences in %s:\n' "$file"
rg -n -C 2 'set .*x|set -o xtrace|set \+x|QUAY_ACCESS_TOKEN|Bearer \${QUAY_ACCESS_TOKEN}|^ *set -x$' "$file" || true
printf '\nFirst 90 lines:\n'
sed -n '1,90p' "$file"
python3 - <<'PY'
from pathlib import Path
import re
p = Path('ci-operator/step-registry/openshift-qe/installer/bm/day2/prega-operators/openshift-qe-installer-bm-day2-prega-operators-commands.sh')
lines = p.read_text().splitlines()
sensitive_pat = re.compile(r'Authorization:\s*Bearer\s+\${QUAY_ACCESS_TOKEN}')
for i, line in enumerate(lines, 1):
if sensitive_pat.search(line):
# Walk back to find nearest preceding set -x / set -o xtrace
enabled_before = False
disabled_since = None
for j in range(i, 0, -1):
stripped = lines[j-1].strip()
if stripped in ('set -x', 'set -o xtrace') or stripped.startswith('set -o xtrace '):
enabled_before = True
break
if stripped in ('set +x', 'set +o xtrace') or stripped.startswith('set +o xtrace '):
disabled_since = j
break
print(f"line {i}: enabled_before={enabled_before} since_disabled_line={disabled_since}")
print(f" {line}")
PYRepository: openshift/release Length of output: 5445 Disable xtrace around the Quay token requests. The script enables 🧰 Tools🪛 Shellcheck (0.11.0)[info] 17-17: Double quote to prevent globbing and word splitting. (SC2086) [info] 18-18: Double quote to prevent globbing and word splitting. (SC2086) 🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ -z "${OPERATOR_PREGA_VERSION}" ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "OPERATOR_PREGA_VERSION could not be resolved from Quay; falling back to OCP_VERSION: ${OCP_VERSION}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OPERATOR_PREGA_VERSION="${OCP_VERSION}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "PREGA Operator Version: ${OPERATOR_PREGA_VERSION} for OCP Version: ${OCP_VERSION}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ssh ${SSH_ARGS} root@${bastion} " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -e | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set -o pipefail | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| curl -k -o /tmp/idms.yaml https://${PREGA_BUILD_SERVER_IP}/${OPERATOR_PREGA_VERSION}/imageDigestMirrorSet.yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| curl -k -o /tmp/idms_${OCP_VERSION}.yaml https://${PREGA_BUILD_SERVER_IP}/${OPERATOR_PREGA_VERSION}/imageDigestMirrorSet.yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scp -q ${SSH_ARGS} root@${bastion}:/tmp/idms.yaml /tmp/idms.yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "ImageDigestMirrorSet manifest saved to /tmp/idms.yaml" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scp -q ${SSH_ARGS} root@${bastion}:/tmp/idms_${OCP_VERSION}.yaml /tmp/idms_${OCP_VERSION}.yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| validate_yaml() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| local f="$1" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [[ -s "$f" ]] || return 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if command -v yq &>/dev/null; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| yq eval 'has("kind") and has("apiVersion")' "$f" 2>/dev/null | grep -q '^true$' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| grep -qE '^(apiVersion|kind):' "$f" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ! validate_yaml /tmp/idms_${OCP_VERSION}.yaml; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Downloaded /tmp/idms_${OCP_VERSION}.yaml is not valid YAML; falling back to bastion artifact for ${OCP_VERSION}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scp -q ${SSH_ARGS} root@${bastion}:/root/prega_artifacts/idms_${OCP_VERSION}.yaml /tmp/idms_${OCP_VERSION}.yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| validate_yaml /tmp/idms_${OCP_VERSION}.yaml \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| || { echo "Fallback IDMS /root/prega_artifacts/idms_${OCP_VERSION}.yaml is also invalid or missing"; exit 1; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+31
to
+45
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. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Validate the expected ImageDigestMirrorSet schema.
Require Proposed fix [[ -s "$f" ]] || return 1
if command -v yq &>/dev/null; then
- yq eval 'has("kind") and has("apiVersion")' "$f" 2>/dev/null | grep -q '^true$'
+ yq eval '.apiVersion == "config.openshift.io/v1" and .kind == "ImageDigestMirrorSet"' "$f" 2>/dev/null | grep -q '^true$'
else
- grep -qE '^(apiVersion|kind):' "$f"
+ grep -qx 'apiVersion: config.openshift.io/v1' "$f" &&
+ grep -qx 'kind: ImageDigestMirrorSet' "$f"
fi📝 Committable suggestion
Suggested change
🧰 Tools🪛 Shellcheck (0.11.0)[info] 41-41: Double quote to prevent globbing and word splitting. (SC2086) [info] 43-43: Double quote to prevent globbing and word splitting. (SC2086) [info] 43-43: Double quote to prevent globbing and word splitting. (SC2086) [info] 43-43: Double quote to prevent globbing and word splitting. (SC2086) [info] 43-43: Double quote to prevent globbing and word splitting. (SC2086) [info] 44-44: Double quote to prevent globbing and word splitting. (SC2086) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "ImageDigestMirrorSet manifest saved to /tmp/idms_${OCP_VERSION}.yaml" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oc config view | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -39,15 +61,13 @@ if [ ${OCP_BUILD} == "dev" ]; then | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jq -s '.[0] * .[1]' /tmp/existing_pull_secret.json /tmp/prega_pull_secret.json > /tmp/merged_pull_secret.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=/tmp/merged_pull_secret.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 300 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl wait --for jsonpath='{.status.updatedMachineCount}'="$(oc get node --no-headers -l node-role.kubernetes.io/worker= | wc -l)" --timeout=60m mcp worker | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oc adm wait-for-stable-cluster --minimum-stable-period=2m --timeout=20m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oc adm wait-for-stable-cluster --minimum-stable-period=2m --timeout=40m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Applying the ImageDigestMirrorSet manifest" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| get_idms_manifest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oc apply -f /tmp/idms.yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oc apply -f /tmp/idms_${OCP_VERSION}.yaml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sleep 300 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kubectl wait --for jsonpath='{.status.updatedMachineCount}'="$(oc get node --no-headers -l node-role.kubernetes.io/worker= | wc -l)" --timeout=60m mcp worker | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oc adm wait-for-stable-cluster --minimum-stable-period=2m --timeout=20m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| oc adm wait-for-stable-cluster --minimum-stable-period=2m --timeout=40m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Creating CatalogSource for PREGA Operator Index" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cat << EOF| oc apply -f - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/release
Length of output: 197
🏁 Script executed:
Repository: openshift/release
Length of output: 246
🏁 Script executed:
Repository: openshift/release
Length of output: 11712
Regenerate CI configuration artifacts before merge.
This change adds a scheduled CI job under
ci-operator/config/openshift-eng/ocp-perfscale. Runmake updateand include any generated Prow job config, determinized CI config, and registry metadata changes.🤖 Prompt for AI Agents
Sources: Coding guidelines, Learnings