Skip to content

chore(ci): gzip junit results in SHARED_DIR to avoid Secret size limit#5042

Merged
openshift-merge-bot[bot] merged 1 commit into
redhat-developer:mainfrom
zdrapela:ci/gzip-junit-shared-dir
Jul 2, 2026
Merged

chore(ci): gzip junit results in SHARED_DIR to avoid Secret size limit#5042
openshift-merge-bot[bot] merged 1 commit into
redhat-developer:mainfrom
zdrapela:ci/gzip-junit-shared-dir

Conversation

@zdrapela

@zdrapela zdrapela commented Jul 1, 2026

Copy link
Copy Markdown
Member

Follow-up to openshift/release#81313 which updated the data-router step to handle decompression.

Problem: The Kubernetes Secret backing SHARED_DIR has a 1 MiB size limit. Raw junit XML can exceed this when coverage <property> tags and many test cases are present.

Solution: Gzip junit XML before writing to SHARED_DIR. XML compresses ~10-15x with gzip, keeping even large files well under the limit. Also adds:

  • File existence check before attempting the copy
  • Safety valve: removes the gzipped file if it still exceeds 800 KB after compression
  • Informational logging of the compressed size

The data-router step in openshift/release already handles both .gz and plain .xml formats, so there is no ordering dependency once that PR merges.

Works as expected. See job step logs:

🗃️ Data Router metadata created and saved to ARTIFACT_DIR
total 48
drwxr-x---    2 10032200 root          4096 Jul  2 09:52 .
drwxrwxrwt    1 root     root            90 Jul  2 09:52 ..
-rw-r--r--    1 10032200 root             3 Jul  2 09:52 CONTAINER_PLATFORM.txt
-rw-r--r--    1 10032200 root             4 Jul  2 09:52 CONTAINER_PLATFORM_VERSION.txt
-rw-r--r--    1 10032200 root             4 Jul  2 09:52 IS_OPENSHIFT.txt
-rw-r--r--    1 10032200 root             1 Jul  2 09:52 OVERALL_RESULT.txt
-rw-r--r--    1 10032200 root            23 Jul  2 09:52 STATUS_DEPLOYMENT_NAMESPACE.txt
-rw-r--r--    1 10032200 root            12 Jul  2 09:52 STATUS_FAILED_TO_DEPLOY.txt
-rw-r--r--    1 10032200 root             4 Jul  2 09:52 STATUS_NUMBER_OF_TEST_FAILED.txt
-rw-r--r--    1 10032200 root            11 Jul  2 09:52 STATUS_TEST_FAILED.txt
-rw-r--r--    1 10032200 root          3454 Jul  2 09:52 junit-results-showcase-rbac.xml.gz
-rw-r--r--    1 10032200 root          5077 Jul  2 09:52 junit-results-showcase.xml.gz
📝 Processing JUnit files for Data Router compatibility...
Decompressed junit-results-showcase-rbac.xml.gz -> /logs/artifacts/data-router/junit-results-showcase-rbac.xml
Decompressed junit-results-showcase.xml.gz -> /logs/artifacts/data-router/junit-results-showcase.xml
Processing: junit-results-showcase-rbac.xml
✅ Processed: junit-results-showcase-rbac.xml (namespace: showcase-rbac)
Processing: junit-results-showcase.xml
✅ Processed: junit-results-showcase.xml (namespace: showcase)
🗃️ JUnit files processed and ready for Data Router
Attempt 1 of 10 to send test results through Data Router.
environment: line 318: warning: command substitution: ignored null byte in input
Test results successfully sent through Data Router.
Request ID: e90ead8a-eb83-42e2-bfe8-142ee2a0bd8b

Jira: https://redhat.atlassian.net/browse/RHDHBUGS-3428

@openshift-ci openshift-ci Bot requested review from sanketpathak and teknaS47 July 1, 2026 08:58
@zdrapela zdrapela changed the title ci: gzip junit results in SHARED_DIR to avoid Secret size limit chore(ci): gzip junit results in SHARED_DIR to avoid Secret size limit Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.77%. Comparing base (5c7ffe3) to head (c029f80).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5042      +/-   ##
==========================================
- Coverage   55.39%   54.77%   -0.62%     
==========================================
  Files         122      110      -12     
  Lines        2365     2147     -218     
  Branches      567      542      -25     
==========================================
- Hits         1310     1176     -134     
+ Misses       1048      969      -79     
+ Partials        7        2       -5     
Flag Coverage Δ
rhdh 54.77% <ø> (-0.62%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c7ffe3...c029f80. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zdrapela

zdrapela commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/test e2e-ocp-helm

Gzip junit XML before writing to SHARED_DIR to stay under the
Kubernetes Secret 1 MiB size limit. Raw junit XML can exceed this
when coverage <property> tags and many test cases are present. XML
compresses ~10-15x with gzip, keeping even large files well under
the limit.

Also adds a safety check that removes the gzipped file if it still
exceeds 800 KB after compression, and validates the source file
exists before attempting the copy.

The data-router step in openshift/release already handles both .gz
and plain .xml formats (openshift/release#81313).

Assisted-by: OpenCode
@zdrapela zdrapela force-pushed the ci/gzip-junit-shared-dir branch from 45c9934 to c029f80 Compare July 2, 2026 10:49
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

@openshift-ci openshift-ci Bot added the lgtm label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@openshift-merge-bot openshift-merge-bot Bot merged commit d8b493f into redhat-developer:main Jul 2, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants