fix(ci): separate collected resources with YAML document markers#2798
fix(ci): separate collected resources with YAML document markers#2798zakisk wants to merge 2 commits into
Conversation
Use per-resource kubectl get with --- separators when collecting pipelineruns, repositories, and configmaps in CI log artifacts so each resource is a distinct YAML document. Signed-off-by: Zaki Shaikh <zashaikh@redhat.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the log collection script hack/gh-workflow-ci.sh to fetch individual Kubernetes resources (pipelineruns, repositories, and configmaps) in loops and write them to YAML files. The review feedback highlights a critical issue: because set -e and set -o pipefail are active, any failure in kubectl get (such as a resource being deleted during collection) will cause the entire script to abort prematurely. It is recommended to handle potential errors gracefully by checking if the resource exists and redirecting stderr.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
this allows e2e workflow run on any changes in hack/ directory as there are all the script used across workflow file. Signed-off-by: Zaki Shaikh <zashaikh@redhat.com>
aae0520 to
0a37e70
Compare
📝 Description of the Change
Use per-resource kubectl get with --- separators when collecting pipelineruns, repositories, and configmaps in CI log artifacts so each resource is a distinct YAML document.
🔗 Linked GitHub Issue
Fixes #
🧪 Testing Strategy
🤖 AI Assistance
AI assistance can be used for various tasks, such as code generation,
documentation, or testing.
Please indicate whether you have used AI assistance
for this PR and provide details if applicable.
Important
Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-bytrailer to your commit message.For example:
Co-authored-by: Claude noreply@anthropic.com
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.