refactor(ci): encapsulate test run tracking into lib/test-run-tracker.sh#4366
Conversation
|
The container image build workflow finished with status: |
|
The container image build workflow finished with status: |
|
The container image build workflow finished with status: |
|
/review |
PR Reviewer Guide 🔍(Review updated until commit fdca364)Here are some key observations to aid the review process:
|
|
/retest |
|
/test e2e-ocp-helm-nightly |
ce7a406 to
88355be
Compare
zdrapela
left a comment
There was a problem hiding this comment.
Please make sure that each file that uses functions from other files sources all the files that it depends on - to ensure dependencies.
We should definitely check that for job triggered by /test e2e-ocp-helm-nightly, all the files in https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/redhat-developer_rhdh/4366/pull-ci-redhat-developer-rhdh-main-e2e-ocp-helm-nightly/2029492297959215104/artifacts/e2e-ocp-helm-nightly/redhat-developer-rhdh-ocp-helm-nightly/artifacts/reporting/ have the correct number of entries.
|
/review |
|
Persistent review updated to latest commit fdca364 |
|
/agentic_review |
Code Review by Qodo
1. Missing failure-count entry
|
|
/agentic_review |
|
Persistent review updated to latest commit fdca364 |
fdca364 to
d522a3d
Compare
|
/test e2e-ocp-helm-nightly |
|
The container image build workflow finished with status: |
Replace fragile CURRENT_DEPLOYMENT global counter with a dedicated deployment module that provides a clean API (deployment::register, deployment::mark_deploy_success, deployment::mark_deploy_failed, deployment::mark_test_result). This eliminates manual counter manipulation scattered across utils.sh and lib/testing.sh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove misleading `export _DEPLOYMENT_COUNTER` (subshells can't see parent counter updates anyway) - Source deployment.sh directly in testing.sh so job files that skip utils.sh/reporting.sh still have deployment::* available - Consolidate test result reporting into a single deployment::mark_test_result call instead of mixing old and new APIs - Add deployment::mark_deploy_success in initiate_upgrade_base_deployments to record deploy status consistently Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eline scripts - Fix silent failures: cert extraction pipeline, helm chart version resolution, curl without -f flag, and http_status comparison - Add error checks to all helm upgrade commands in EKS/GKE/AKS deployments - Add common::require_vars() for envsubst variable validation - Remove dead functions: namespace::remove_finalizers, operator::install_postgres_k8s - Export common::base64_encode for subshell usage - Fix unquoted variables in kubectl commands and sleep Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move common::require_vars to beginning of deployment functions for early validation - Add common::require_vars to operator deployment files (AKS, EKS, GKE) - Add explicit source for common.sh and namespace.sh in K8s deployment files - Restore namespace::remove_finalizers function (was prematurely removed) - Add source for reporting.sh in deployment.sh (fixes dependency declaration) - Add re-source guard to reporting.sh and fix circular dependency - Use artifacts_subdir (playwright project name) as deployment label instead of namespace in deployment::register to fix RHDHBUGS-2726 - Simplify log collection: collect immediately on deploy failure, check STATUS_TEST_FAILED only after test execution - Remove unnecessary "Uses globals: none" comment - Update docs/e2e-tests/enhanced-ci-reporting.md to reflect deployment:: API Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…atus file alignment Use playwright_project instead of namespace as the default deployment label, fixing Slack reports that showed duplicate names (RHDHBUGS-2726). Restructure testing::check_and_test to use testing::run_tests return value directly for pod log collection, simplifying the control flow. Ensure STATUS_NUMBER_OF_TEST_FAILED.txt always has an entry per deployment by defaulting num_failures to "0" and writing "N/A" for deploy failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…function prefix Rename the tracking library from `deployment` to `test_run_tracker` to better reflect its purpose: tracking test run status (deploy outcome + test results) for reporting, not managing deployments. - Rename file: lib/deployment.sh -> lib/test-run-tracker.sh - Rename function prefix: deployment:: -> test_run_tracker:: - Rename internal state: _DEPLOYMENT_COUNTER -> _TEST_RUN_COUNTER - Update all call sites in testing.sh and utils.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…er rename - Update enhanced-ci-reporting.md to use test_run_tracker:: prefix and lib/test-run-tracker.sh file path - Clarify FUTURE MODULE comment in utils.sh to distinguish planned lib/deploy.sh from lib/test-run-tracker.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a4b2c9a to
798a2a0
Compare
|
The container image build workflow finished with status: |
|
|
/test e2e-ocp-helm-nightly |
|
/test e2e-ocp-helm |
zdrapela
left a comment
There was a problem hiding this comment.
Thank you! It's now looking great. I'll just wait for the nightly job to finish, and I'll approve.
ad49057
into
redhat-developer:main




Summary
.ci/pipelines/lib/test-run-tracker.shmodule that encapsulates theCURRENT_DEPLOYMENTglobal counter into a clean API (test_run_tracker::register,test_run_tracker::mark_deploy_success,test_run_tracker::mark_deploy_failed,test_run_tracker::mark_test_result)utils.shandlib/testing.shwith single-call functions, reducing error-prone boilerplateCURRENT_DEPLOYMENTexport fromreporting.sh— state is now managed internally by the test run tracker moduleTest plan
grep -rn "CURRENT_DEPLOYMENT" .ci/returns zero matches outsidelib/test-run-tracker.shlib/test-run-tracker.sh,lib/testing.sh,reporting.sh,utils.sh)reporting.sh→lib/test-run-tracker.shloads correctly🤖 Generated with Claude Code