chore(ci): Remove cci-export and the bash-wrapper mechanism - #256
chore(ci): Remove cci-export and the bash-wrapper mechanism#256davdhacs wants to merge 1 commit into
Conversation
cci-export persisted environment variables across CircleCI steps by writing to $BASH_ENV, which CircleCI sources before each step's shell. StackRox CI runs on GitHub Actions and OpenShift CI/prow now, where BASH_ENV is never sourced between steps -- cross-step state travels via $GITHUB_ENV and $SHARED_DIR instead -- so the mechanism is dead weight. Removed: - static-contents/bin/bash-wrapper (the cci-export function and the /bin/bash -> /bin/real-bash swap that installed it) - static-contents/etc/initial-bash.env (the BASH_ENV foundation) - images/test.cci-export.Dockerfile and images/test/ (the bats tests) - the ENV BASH_ENV declarations from the test/ui-test images - the test-cci-export Makefile target and the corresponding CI job Consumers (stackrox, scanner) call cci-export behind a `command -v cci-export` guard and fall back to plain `export`, so this change degrades gracefully rather than breaking their CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Build Images
|
|
@davdhacs this is a great cleanup. ❤️ However there might be subtle side-effects that this code hints at. Namely: If I think we need to replace the above block in |
Thank you for pointing out flipping this. Removing the usage first is persuasive to me because I had not considered cci-export may exist for some use case. |
waiting on removal of cci-export usage from stackrox/stackrox: stackrox/stackrox#22357
Remove
cci-exportand the entirebash-wrappermechanism from the CI images.Why
cci-exportpersisted environment variables across CircleCI steps by appendingexportlines to$BASH_ENV, which CircleCI sources before each step's shell. StackRox CI now runs on GitHub Actions and OpenShift CI / prow, whereBASH_ENVis never sourced between steps — cross-step state travels via$GITHUB_ENVand$SHARED_DIR(prow) instead. The mechanism is dead weight.It surfaced recently causing hundreds of noise warnings in our prow e2e logs: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_release/83406/rehearse-83406-pull-ci-stackrox-stackrox-master-ocp-4-12-compliance-e2e-tests/2088023413737132032#1:build-log.txt%3A1491
Consumer impact
Verified across
stackrox/{stackrox,scanner,collector},automation-flavors, and an org-wide code search (includingrelease-4.9/release-4.10):stackroxandscannercallcci-exportbehind acommand -v cci-exportguard and fall back to plainexport(+$GITHUB_ENVin stackrox'sci_export). This change degrades gracefully rather than breaking their CI.collectorandautomation-flavorsdon't reference it at all; automation-flavors passes cluster info / kubeconfig via$SHARED_DIR, which is independent ofcci-export.🤖 Generated with Claude Code