-
Notifications
You must be signed in to change notification settings - Fork 695
[WIP] testparrallel #16091
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?
[WIP] testparrallel #16091
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 |
|---|---|---|
| @@ -1,21 +1,34 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -exuo pipefail | ||
|
|
||
| INSTALLER_DIR=${INSTALLER_DIR:=${ARTIFACT_DIR}/installer} | ||
|
|
||
| # don't log kubeadmin-password | ||
| set +x | ||
| export BRIDGE_KUBEADMIN_PASSWORD="$(cat "${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password}")" | ||
| set -x | ||
| export BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')" | ||
|
|
||
| ./contrib/create-user.sh | ||
|
|
||
| pushd frontend | ||
|
|
||
| SCENARIO="${1:-e2e}" | ||
|
|
||
| # test-prow-e2e.sh - Wrapper script for running e2e tests in Prow CI | ||
| # This script is called by the CI system and delegates to test-cypress.sh | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Check if parallel flag is passed | ||
| PARALLEL_FLAG="" | ||
| while getopts P: flag; do | ||
| case "${flag}" in | ||
| P) PARALLEL_FLAG="-P ${OPTARG}";; | ||
| esac | ||
| done | ||
|
|
||
| echo "================================================" | ||
| echo "Running OpenShift Console E2E Tests" | ||
| echo "================================================" | ||
| echo "Environment: ${OPENSHIFT_CI:-local}" | ||
| echo "Parallel mode: ${PARALLEL_FLAG:-disabled (sequential)}" | ||
| echo "================================================" | ||
| echo "" | ||
|
|
||
| # Navigate to frontend directory | ||
| cd frontend || exit 1 | ||
|
|
||
| # Run Cypress tests | ||
| # shellcheck disable=SC2086 | ||
| ./integration-tests/test-cypress.sh -h true ${PARALLEL_FLAG} | ||
|
|
||
|
Comment on lines
+27
to
+30
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. 🧩 Analysis chain🏁 Script executed: git ls-files | grep -E "test-prow-e2e\.sh"Repository: openshift/console Length of output: 77 🏁 Script executed: cat -n test-prow-e2e.sh | head -70Repository: openshift/console Length of output: 2372 🏁 Script executed: # Find prow config files
find . -type f \( -name "*prow*" -o -name "*job*" -o -name "*ci*" \) -path "*/.git" -prune -o -type f \( -name "*.yaml" -o -name "*.yml" \) -print | grep -iE "(prow|job|ci)" | head -20Repository: openshift/console Length of output: 1187 🏁 Script executed: cat -n .ci-operator.yaml | head -100Repository: openshift/console Length of output: 166 🏁 Script executed: # Search for SCENARIO variable usage in the codebase
rg -n '\bSCENARIO\b' --type sh --type yaml --type ymlRepository: openshift/console Length of output: 88 🏁 Script executed: # Search for SCENARIO variable usage
rg -n '\bSCENARIO\b'Repository: openshift/console Length of output: 518 🏁 Script executed: # Search for references to the specific scenario job names
rg -n "nightly-cypress|olmFull|dev-console.*pipelines|knative.*release" --type shRepository: openshift/console Length of output: 186 🏁 Script executed: # Find prow job definitions
find . -type d -name "*prow*" -o -name "*jobs*" -o -name "*ci*" 2>/dev/null | grep -v node_modules | grep -v vendor | head -20Repository: openshift/console Length of output: 1220 🏁 Script executed: # Search for job definitions or CI configuration in root and common locations
find . -maxdepth 2 -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*prow*" \) ! -path "./vendor/*" ! -path "./node_modules/*" ! -path "./.git/*"Repository: openshift/console Length of output: 354 🏁 Script executed: # Check git history to understand this change
git log --oneline test-prow-e2e.sh | head -20Repository: openshift/console Length of output: 85 🏁 Script executed: # Check the actual changes in the recent commit
git show 4d1972ac23 --statRepository: openshift/console Length of output: 50374 🏁 Script executed: # Look for how test-prow-e2e.sh is called/configured - check for prow config references
find . -maxdepth 2 -type f -name "*.yaml" ! -path "./vendor/*" -exec grep -l "test-prow-e2e\|SCENARIO" {} \;Repository: openshift/console Length of output: 43 🏁 Script executed: # Search for any references to test-prow-e2e or test-cypress in configuration
rg -n "test-prow-e2e|test-cypress" --type yaml --type shRepository: openshift/console Length of output: 6050 🏁 Script executed: # Check README or documentation for CI job information
find . -maxdepth 2 -type f \( -name "README*" -o -name "CONTRIBUTING*" -o -name "TESTING*" \) ! -path "./vendor/*" -exec grep -l "SCENARIO\|prow\|job\|cypress" {} \;Repository: openshift/console Length of output: 85 🏁 Script executed: grep -n "SCENARIO\|cypress\|prow\|job" TESTING.md | head -50Repository: openshift/console Length of output: 528 🏁 Script executed: # Check if there's any git status showing this unresolved conflict
git status test-prow-e2e.shRepository: openshift/console Length of output: 126 Resolve unresolved git merge conflict in test-prow-e2e.sh before merging The file contains unresolved merge conflict markers (lines 31–60) with both upstream and stashed versions. The upstream version (line 29) runs an unconditional full headless suite, while the stashed version (lines 32–50) contains scenario-based conditional routing ( This conflict must be explicitly resolved. Before choosing the upstream version, verify whether these scenario-based test jobs are still active in your Prow configuration. If they are, removing the conditional routing changes test coverage and duration. If they've been deprecated, the stashed code is dead and the upstream version is correct. The repository itself contains no SCENARIO references outside this conflict, so verification requires checking your external Prow job definitions. 🤖 Prompt for AI Agents |
||
| <<<<<<< Updated upstream | ||
| if [ "$SCENARIO" == "nightly-cypress" ]; then | ||
| PACKAGE="" | ||
| if [ $# -gt 1 ]; then | ||
|
|
@@ -39,3 +52,9 @@ fi | |
| env NO_SANDBOX=true yarn test-puppeteer-csp | ||
|
|
||
| popd | ||
| ======= | ||
| echo "" | ||
| echo "================================================" | ||
| echo "E2E Tests Completed" | ||
| echo "================================================" | ||
| >>>>>>> Stashed changes | ||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/console
Length of output: 103
🏁 Script executed:
sed -n '40,47p; 58p; 104,105p' frontend/integration-tests/test-cypress.shRepository: openshift/console
Length of output: 412
🏁 Script executed:
Repository: openshift/console
Length of output: 3938
🏁 Script executed:
grep -n "parallel" frontend/integration-tests/test-cypress.shRepository: openshift/console
Length of output: 501
-P falsestill enables parallel modeThe conditional at line 104 checks only for non-empty input using
[ -n "${parallel-}" ], so-P falsestill takes the parallel branch, contradicting the documented-P trueusage in the help text (line 58).Proposed fix
while getopts p:s:h:l:n:P: flag do case "${flag}" in p) pkg=${OPTARG};; s) spec=${OPTARG};; h) headless=${OPTARG};; n) nightly=${OPTARG};; - P) parallel=${OPTARG};; + P) parallel="$(printf '%s' "${OPTARG}" | tr '[:upper:]' '[:lower:]')";; esac done + +if [ -n "${parallel-}" ] && [ "${parallel}" != "true" ] && [ "${parallel}" != "false" ]; then + echo "Invalid -P value '${parallel}'. Expected true|false." >&2 + exit 2 +fi @@ - if [ -n "${parallel-}" ]; then + if [ "${parallel-false}" = "true" ]; thenAlso applies to: 58, 104
🤖 Prompt for AI Agents