-
Notifications
You must be signed in to change notification settings - Fork 174
perf(ci): remove container from unit-tests jobs #19678
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
Draft
davdhacs
wants to merge
73
commits into
master
Choose a base branch
from
davdhacs/matrix-unittests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
66497a2
perf(ci): use fixed version ldflags for tests to enable GOCACHE hits
davdhacs 0bdca75
perf(ci): stabilize file mtimes for Go test cache
davdhacs 0af36f0
perf(ci): also stabilize directory mtimes for test cache
davdhacs dfff6f5
perf(ci): stop over-separating GOCACHE for matrix variants that share…
davdhacs dc74d14
fix(ci): add key-suffix for unit-test GOTAGS matrix and scanner GOARCH
davdhacs 8fae846
style: add parentheses to key-suffix conditional for clarity
davdhacs 8fbd5e5
revert: keep operator branding key-suffix (PR #19417 will refactor this)
davdhacs 76892da
chore: add comment explaining race-only cache key separation
davdhacs 841d0ad
empty: warm run with rebased combined branch
davdhacs 8fdaa3a
ci: temporarily always save GOCACHE for testing on PR branch (remove …
davdhacs ab64892
empty: warm run after cache save
davdhacs 4e792fc
perf(ci): remove container from unit-tests jobs, run on host
davdhacs b3fd3ff
fix: install bats, fix postgres role, keep openshift-ci in container
davdhacs 7d7d8c8
fix: install bats libs to /usr/lib/node_modules to match test helpers
davdhacs 2ea9954
fix: address test failures from container removal
davdhacs c51eb95
fix: add host runner path prefix for rate limited logger
davdhacs b05f21b
fix: escape & in bash replacement strings for bash 5.2+
davdhacs 41fe559
fix: override GOTOOLCHAIN=local from setup-go
davdhacs bed59cd
empty: warm run after successful seed
davdhacs e15a29e
fix: handle yq v4 multi-doc separators in netpol bats tests
davdhacs 3f82c38
perf(ci): split go unit tests into 3 shards (pkg, central, rest)
davdhacs 42b76e7
fix: exclude sensor/tests and operator/tests from rest shard
davdhacs faf9004
empty: warm run with all 3 shard caches saved
davdhacs c7efb58
perf(ci): separate integration tests job, skip bench on PRs
davdhacs 64444f8
perf(ci): split go-postgres into main/migrator shards
davdhacs 981344d
empty: warm run with all shard caches
davdhacs a14c6a3
perf(ci): split integration/operator tests, enable integration caching
davdhacs 4525f53
fix: remove junit report from operator integration (no test log)
davdhacs 6e14b45
empty: warm run with all caches including operator-integration
davdhacs 4f8206a
perf(ci): split go tests into 5 shards for smaller caches
davdhacs 4349ae5
empty: warm run with 5-way shard caches
davdhacs a446d62
perf(ci): experiment — skip GOMODCACHE for pkg-helm shard
davdhacs 942cc0f
perf(ci): skip GOMODCACHE for all go test shards
davdhacs c1044a9
perf(ci): skip GOMODCACHE + shallow checkout for all Go test jobs
davdhacs fdb4653
fix: restore GOMODCACHE for operator-integration (needs protoc tools)
davdhacs e17999c
perf(ci): skip GOMODCACHE for local-roxctl-tests
davdhacs e223936
perf(ci): split local-roxctl-tests into dev/release shards
davdhacs 10a07a2
empty: warm run with roxctl shard caches
davdhacs f39a036
perf(ci): remove container from ui-component, use setup-node
davdhacs ad30746
perf(ci): use cypress-io/github-action for ui-component tests
davdhacs ae2e769
perf(ci): bypass make deps/build-prep for test jobs
davdhacs f58b26a
fix: restore make targets for go-postgres, fix ui-component junit
davdhacs 4c81839
perf(ci): add SKIP_DEPS to bypass go mod tidy in test jobs
davdhacs 4a3925f
perf(ci): disable Cypress video, upload artifacts only on failure
davdhacs 869af28
refactor: keep skip-mod-cache default false, explicit true on test jobs
davdhacs 67bae80
perf(ci): adopt cache-mod approach from #19688
davdhacs 4e9c8ad
empty: trigger CI for cold run with cache-mod approach
davdhacs 73ba0fe
trigger: add comment to force workflow run
davdhacs 4b8edf2
chore: clean trigger comment
davdhacs 5648e38
fix: remove duplicate integration/helm steps from go shards
davdhacs ef394a2
fix: use := for SCANNER_DIR, remove unused matrix.variant.env
davdhacs 23a8a0f
perf: make SCANNER_DIR lazy — only download when proto targets run
davdhacs 51abc01
docs: explain bash 5.2 ampersand escaping in XML replacement
davdhacs 5e8e46b
fix: fail fast on postgres readiness timeout, increase to 60s
davdhacs 74e56e5
fix: use tee -a in migrator target to preserve main shard output
davdhacs 581f56d
fix: preserve yq exit status in yq_multidoc helper
davdhacs 88cc868
fix: assert specific errors in zip path traversal test
davdhacs c8ca344
fix: set BUILD_TAG for operator helm tests (avoids git describe)
davdhacs 1f31808
perf(ci): adopt latest #19688 — remove GOMODCACHE entirely
davdhacs 4464bdf
fix: set BUILD_TAG on operator integration tests too
davdhacs ca27ddf
fix: use /.dockerenv instead of GITHUB_ACTIONS for container detectio…
davdhacs 6d9dd2a
chore: remove circular TestContainerDetection
davdhacs 83f47d9
empty: re-trigger CI after operator-integration fix
davdhacs 7dc8c1c
Merge origin/master into davdhacs/matrix-unittests
davdhacs b9c014f
fix: host-runner compatibility for tests and scripts
davdhacs f153542
Merge remote-tracking branch 'origin/master' into davdhacs/matrix-uni…
davdhacs c42ca78
fix(ci): address shellcheck warnings in unit-tests workflow
davdhacs 9f2eb95
fix(ci): fix shellcheck directive syntax
davdhacs 3f50506
Merge remote-tracking branch 'origin/master' into davdhacs/host-runne…
davdhacs fe90602
Merge remote-tracking branch 'origin/master' into davdhacs/host-runne…
davdhacs 0abf513
Merge remote-tracking branch 'origin/master' into davdhacs/matrix-uni…
davdhacs 58ea483
fix: use sed instead of grep -v in yq_multidoc
davdhacs 11e1696
Merge remote-tracking branch 'origin/davdhacs/host-runner-test-fixes'…
davdhacs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Narrow
ErrPermissionhandling to avoid masking traversal regressions.At Line 214, allowing
fs.ErrPermissionfor all paths makes this defense-in-depth check too permissive. For paths that are expected to be readable in CI (parentDir,grandParentDir,/tmp,/etc), this can hide a real escape side effect.Proposed tightening
for _, path := range checkPaths { _, err := os.Stat(path) - // File must not exist. On non-root runners, paths under /root/ return - // ErrPermission instead of ErrNotExist — both confirm the file wasn't written. - assert.True(t, errors.Is(err, fs.ErrNotExist) || errors.Is(err, fs.ErrPermission), - "Malicious file should not exist at %s, got: %v", path, err) + // `/root` may be non-traversable on non-root runners, so ErrPermission is acceptable there. + if strings.HasPrefix(path, "/root/") { + assert.True(t, errors.Is(err, fs.ErrNotExist) || errors.Is(err, fs.ErrPermission), + "Malicious file should not exist at %s, got: %v", path, err) + continue + } + assert.ErrorIs(t, err, fs.ErrNotExist, "Malicious file should not exist at %s", path) }As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."
🤖 Prompt for AI Agents