Skip to content
Merged
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 @@ -27,6 +27,10 @@ base_images:
name: "4.21"
namespace: ocp
tag: installer
observability-e2e-test:
name: "2.17"
namespace: stolostron
tag: observability-e2e-test
openshift-virtualization-tests:
name: openshift-virtualization-tests
namespace: ci
Expand Down Expand Up @@ -129,7 +133,11 @@ tests:
{"step": "acm-fetch-managed-clusters", "failure_type": "all", "classification": "ACM cluster failure", "jira_project": "!default", "group": {"name": "opp-tests", "priority": 4}, "jira_epic": "!default", "jira_assignee": "!default", "jira_additional_labels": ["!default"]},
{"step": "acm-tests-grc", "failure_type": "all", "classification": "ACM GRC testcase failure", "jira_project": "!default", "group": {"name": "interop-p2p-tests", "priority": 5}, "jira_epic": "!default", "jira_assignee": "!default", "jira_additional_labels": ["!default","interop-tests"]},
{"step": "acm-mch", "failure_type": "all", "classification": "ACM MCH install", "jira_project": "!default", "group": {"name": "interop-p2p-tests", "priority": 2}, "jira_epic": "!default", "jira_assignee": "!default", "jira_additional_labels": ["!default"]},
{"step": "p2p-install-odf-spokes" , "failure_type": "all" , "classification": "ODF Spoke Deployment" , "group": { "name" : "lp-tests", "priority" : 1}, "jira_additional_labels": ["!default"], "jira_project": "DFBUGS", "jira_assignee": "ebenahar@redhat.com" }
{"step": "p2p-install-odf-spokes" , "failure_type": "all" , "classification": "ODF Spoke Deployment" , "group": { "name" : "lp-tests", "priority" : 1}, "jira_additional_labels": ["!default"], "jira_project": "DFBUGS", "jira_assignee": "ebenahar@redhat.com" },
{"step": "acm-obs-odf-setup" , "failure_type": "all" , "classification": "ACM Observability MCO Deployment" , "group": { "name" : "lp-tests", "priority" : 4}, "jira_additional_labels": ["!default"]},
{"step": "acm-obs-e2e-run" , "failure_type": "test_failure", "classification": "ACM Observability Tests Failure", "group": { "name" : "lp-tests", "priority" : 5}, "jira_additional_labels": ["!default","interop-tests"]},
{"step": "acm-obs-e2e-run" , "failure_type": "pod_failure" , "classification": "ACM Observability Tests Infra" , "group": { "name" : "lp-tests", "priority" : 4}, "jira_additional_labels": ["!default"]},
{"step": "interop-opp-observability-odf" , "failure_type": "all" , "classification": "ACM Observability Health Check" , "group": { "name" : "lp-tests", "priority" : 5}, "jira_additional_labels": ["!default","interop-tests"]}
]
}
FIREWATCH_CONFIG_FILE_PATH: https://raw.githubusercontent.com/CSPI-QE/cspi-utils/main/firewatch-base-configs/cr/lp-interop.json
Expand All @@ -139,6 +147,8 @@ tests:
FIREWATCH_DEFAULT_JIRA_EPIC: INTEROP-8652
FIREWATCH_DEFAULT_JIRA_PROJECT: LPINTEROP
FIREWATCH_FAIL_WITH_TEST_FAILURES: "true"
GINKGO_SKIP: Integration|should configure hub Thanos components with the correct
CLI arguments$
MAP_TESTS: "true"
OCP_VERSION: "4.22"
ODF_DEFAULT_STORAGE_CLASS: ocs-storagecluster-ceph-rbd-virtualization
Expand Down Expand Up @@ -192,6 +202,9 @@ tests:
- ref: interop-tests-openshift-virtualization-upgrade-prep
- ref: interop-tests-openshift-virtualization-upgrade-tests
- ref: acm-tests-grc
- ref: acm-obs-odf-setup
- ref: acm-obs-e2e-run
- ref: interop-opp-observability-odf
timeout: 20h0m0s
zz_generated_metadata:
branch: master
Expand Down
3 changes: 3 additions & 0 deletions ci-operator/step-registry/acm/obs/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
approvers: &owners
- cspi-qe-ocp-lp
reviewers: *owners
1 change: 1 addition & 0 deletions ci-operator/step-registry/acm/obs/e2e-run/OWNERS
121 changes: 121 additions & 0 deletions ci-operator/step-registry/acm/obs/e2e-run/acm-obs-e2e-run-commands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#!/bin/bash
set -euxo pipefail; shopt -s inherit_errexit

typeset reportDir="${ARTIFACT_DIR}/obs-results"
mkdir -p "${reportDir}"

# shellcheck disable=SC2317
PropagateJunit () {
mkdir -p "${SHARED_DIR}/junit"
cp "${reportDir}"/*.xml "${SHARED_DIR}/junit/" || true
true
}

# shellcheck disable=SC2317
CollectArtifacts () {
cp "${reportDir}"/* "${ARTIFACT_DIR}/" || true
true
}

trap '{ CollectArtifacts; PropagateJunit; true; }' EXIT

if [[ "${MAP_TESTS}" == 'true' ]]; then
eval "$(
typeset -a _fURL=()
type -t wget 1>/dev/null && _fURL=(wget --timeout=30 -qO-) || _fURL=(curl --connect-timeout 10 --max-time 30 -fsSL)
"${_fURL[@]}" \
https://raw.githubusercontent.com/RedHatQE/OpenShift-LP-QE--Tools/refs/heads/main/libs/bash/ci-operator/interop/common/ExitTrap--PostProcessPrep.sh
)"
if type -t ExitTrap--PostProcessPrep 1>/dev/null; then
trap '
LP_IO__ET_PPP__NEW_TS_NAME="${DR__RP__CR_COMP_NAME}--%s" \
ExitTrap--PostProcessPrep
CollectArtifacts; PropagateJunit
' EXIT
fi
fi

# ---------------------------------------------------------------------------
# 1. Kubeconfig — use writable /tmp, not image-owned /workspace/.kube
# The image sets USER 1001 but OpenShift runs with arbitrary UID;
# /workspace/.kube is chown 1001:1001 and not group-writable.
# ---------------------------------------------------------------------------
typeset kubeDir="/tmp/obs-kube"
mkdir -p "${kubeDir}"
cp "${SHARED_DIR}/kubeconfig" "${kubeDir}/config"
export KUBECONFIG="${kubeDir}/config"

if [[ -f "${SHARED_DIR}/managed-cluster-kubeconfig" ]]; then
cp "${SHARED_DIR}/managed-cluster-kubeconfig" "${kubeDir}/import-kubeconfig"
export IMPORT_KUBECONFIG="${kubeDir}/import-kubeconfig"
fi

# ---------------------------------------------------------------------------
# 2. Load options from SHARED_DIR (generated by acm-obs-odf-setup)
# ---------------------------------------------------------------------------
[[ -f "${SHARED_DIR}/acm-obs-options.json" ]] || {
: 'ERROR: acm-obs-options.json not found — acm-obs-odf-setup must run first'
exit 1
}

export OPTIONS="${SHARED_DIR}/acm-obs-options.json"
export REPORT_FILE="${reportDir}/results.xml"

# ---------------------------------------------------------------------------
# 3. Environment for the suite
# ---------------------------------------------------------------------------
export SKIP_INSTALL_STEP='true'
export SKIP_UNINSTALL_STEP='true'
export IS_CANARY_ENV='true'

# ---------------------------------------------------------------------------
# 4. Run the compiled Ginkgo test binary
# ---------------------------------------------------------------------------
typeset ginkgoBin='/usr/local/bin/ginkgo'
[[ -x "${ginkgoBin}" ]] || { : "ERROR: ginkgo binary not found at ${ginkgoBin}"; exit 1; }

typeset testBin='/workspace/opt/tests/observability-e2e-test.test'
[[ -f "${testBin}" ]] || { : "ERROR: compiled test binary not found at ${testBin}"; exit 1; }

typeset -i ginkgoRc=0
"${ginkgoBin}" \
--v \
--focus="${GINKGO_FOCUS}" \
--skip="${GINKGO_SKIP}" \
--timeout=6300s \
--no-color \
-nodes=1 \
--output-dir="${reportDir}" \
--junit-report=results.xml \
"${testBin}" \
-- -v=3 || ginkgoRc=$?

[[ -f "${reportDir}/results.xml" ]] || {
: "ERROR: missing JUnit report ${reportDir}/results.xml (ginkgo exit=${ginkgoRc})"
exit 1
}

typeset -i testCnt=0
testCnt="$(grep -c '<testcase' "${reportDir}/results.xml" || true)"
((testCnt > 0)) || {
: "ERROR: Ginkgo focus/skip matched no specs (focus=${GINKGO_FOCUS} skip=${GINKGO_SKIP})"
exit 1
}

cp "${reportDir}/results.xml" "${ARTIFACT_DIR}/junit_acm-observability.xml"

# Exit policy: if Ginkgo failed but produced JUnit with recorded failures,
# the suite ran and the failures are observability-specific — not an infra
# problem that other LP tests depend on. Return 0 so downstream steps
# continue; Firewatch classifies the failures from JUnit.
# If Ginkgo failed without producing any <failure> elements (e.g. runner
# crash, image pull error, timeout with no output), exit nonzero.
typeset -i failCnt=0
failCnt="$(grep -c '<failure' "${reportDir}/results.xml" || true)"

if ((ginkgoRc != 0 && failCnt > 0)); then
: "Ginkgo exit=${ginkgoRc} with ${failCnt} failure(s) in JUnit — returning 0 for downstream steps"
exit 0
fi

exit "${ginkgoRc}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "acm/obs/e2e-run/acm-obs-e2e-run-ref.yaml",
"owners": {
"approvers": [
"cspi-qe-ocp-lp"
],
"reviewers": [
"cspi-qe-ocp-lp"
]
}
}
53 changes: 53 additions & 0 deletions ci-operator/step-registry/acm/obs/e2e-run/acm-obs-e2e-run-ref.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ref:
as: acm-obs-e2e-run
from: observability-e2e-test
commands: acm-obs-e2e-run-commands.sh
timeout: 2h0m0s
grace_period: 10m0s
resources:
requests:
cpu: '2'
memory: 4Gi
env:
- name: DR__RP__CR_COMP_NAME
default: "lp-interop--ACM-Virt"
documentation: Component Readiness component name for junit remapping
- name: MAP_TESTS
default: "false"
documentation: When true, remap junit test suite names for Component Readiness routing
- name: GINKGO_FOCUS
default: "@ocpInterop"
documentation: Ginkgo --focus regex to select test specs (e.g. @ocpInterop)
- name: GINKGO_SKIP
default: "Integration"
documentation: Ginkgo --skip regex to exclude test specs
documentation: |-
Runs the maintained ACM observability Ginkgo test suite from the
stolostron/multicluster-observability-operator test image.

Exit policy: if Ginkgo exits nonzero but JUnit contains recorded
<failure> elements, the suite ran and its failures are observability-
specific — exit 0 so downstream LP test steps continue. Firewatch
classifies failures from JUnit. If Ginkgo fails without producing
JUnit failures (runner crash, image pull, timeout), exit nonzero.

Requires acm-obs-odf-setup (or equivalent) to have already:
- Deployed MCO with ODF storage and created mco-e2e-testing-sa RBAC
- Written ${SHARED_DIR}/acm-obs-options.json (suite options)

When MAP_TESTS=true, the script downloads ExitTrap--PostProcessPrep.sh
from raw.githubusercontent.com at runtime (peer ACM interop pattern);
this requires network access from the test pod.

Runs with SKIP_INSTALL_STEP=true and SKIP_UNINSTALL_STEP=true so the
suite uses the pre-existing MCO installation and does not tear it down.

Produces JUnit XML for Prow / Sippy / TestGrid / Component Readiness.

The consuming CI config must define the 'observability-e2e-test' image
alias in base_images, e.g.:
base_images:
observability-e2e-test:
name: "2.17"
namespace: stolostron
tag: observability-e2e-test
1 change: 1 addition & 0 deletions ci-operator/step-registry/acm/obs/odf-setup/OWNERS
Loading