Title: fix: host-runner compatibility for tests and scripts by davdhacs · Pull Request #19712 · stackrox/stackrox · GitHub
Open Graph Title: fix: host-runner compatibility for tests and scripts by davdhacs · Pull Request #19712 · stackrox/stackrox
X Title: fix: host-runner compatibility for tests and scripts by davdhacs · Pull Request #19712 · stackrox/stackrox
Description: Description Fix tests and scripts to work on ubuntu-latest host runners (no container) in addition to CI container environments. All changes are backward-compatible — CI still passes in containers. This is a prerequisite for removing containers from unit-test jobs (#19678). Changes File Issue Fix rate_limited_logger.go Log path prefix /home/runner/work/ not recognized (container used /__w/) Add host runner prefix download_zip_test.go os.Stat("/root/evil.txt") returns ErrPermission on non-root (container ran as root) Accept ErrNotExist or ErrPermission detection_test.go Not a valid test if GHA runs without a container. Delete (path change based on isContainer, covered by local-roxctl bats tests) lib.sh bash 5.2+ treats & in ${var//pat/repl} as matched pattern (container had bash 5.1) Escape with \& (works on all versions 4.4-5.3, verified via docker) helpers.bash yq 4.52 adds --- separators in multi-doc output (container had yq 4.16) Add yq_multidoc helper that strips separators *-netpol-generate-*.bats Line index assertions broken by yq separators Use yq_multidoc Verification These changes run in the existing CI container workflow (no workflow changes in this PR). If all tests pass, the fixes are proven backward-compatible. Testing and quality CI results inspected Automated testing modified existing tests How I validated my change CI runs: A: in the existing rox-ci-image container, proving backward compatibility. B: without a container, passing on #19678 Partially generated by AI.
Open Graph Description: Description Fix tests and scripts to work on ubuntu-latest host runners (no container) in addition to CI container environments. All changes are backward-compatible — CI still passes in containers....
X Description: Description Fix tests and scripts to work on ubuntu-latest host runners (no container) in addition to CI container environments. All changes are backward-compatible — CI still passes in containers....
Opengraph URL: https://github.com/stackrox/stackrox/pull/19712
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:fa0a98ae-1336-3e54-dab7-7aef2d17d93b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E730:38840C:9168B3:C538C2:6A4D4C4F |
| html-safe-nonce | 79ec84db86a3848d8d4ae06e9d1275368d29056f7bf5da06ed124de3b227991b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzMwOjM4ODQwQzo5MTY4QjM6QzUzOEMyOjZBNEQ0QzRGIiwidmlzaXRvcl9pZCI6IjY3OTM5ODU5NzQ0ODczMDUyOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3dd0393ff04ef3a02425b53c8b396eb1d97372458cdf77559be2c838c026ab57 |
| hovercard-subject-tag | pull_request:3472857003 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/stackrox/stackrox/pull/19712/files |
| twitter:image | https://avatars.githubusercontent.com/u/105243888?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/105243888?s=400&v=4 |
| og:image:alt | Description Fix tests and scripts to work on ubuntu-latest host runners (no container) in addition to CI container environments. All changes are backward-compatible — CI still passes in containers.... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/stackrox/stackrox git https://github.com/stackrox/stackrox.git |
| octolytics-dimension-user_id | 40638982 |
| octolytics-dimension-user_login | stackrox |
| octolytics-dimension-repository_id | 434017296 |
| octolytics-dimension-repository_nwo | stackrox/stackrox |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 434017296 |
| octolytics-dimension-repository_network_root_nwo | stackrox/stackrox |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width