STONEBLD-4926 docs: add task documentation page generated from build-pipeline-tasks - #641
STONEBLD-4926 docs: add task documentation page generated from build-pipeline-tasks#641yash2189 wants to merge 2 commits into
Conversation
PR Summary by QodoAdd generated Tekton task documentation page with weekly auto-refresh
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
|
🚀 Preview is available at: https://pr-641--konflux-docs.netlify.app |
Code Review by Qodo
1.
|
| cat > "${dest}" <<'EOF' | ||
| = Task documentation | ||
| :description: Reference of Tekton tasks from the konflux-ci/build-definitions repository. | ||
|
|
There was a problem hiding this comment.
2. Non-atomic doc generation 🐞 Bug ☼ Reliability
hack/gen-task-docs.sh truncates the tracked documentation file up-front and then appends rows; if any error occurs after truncation, the repo can be left with a partially written task-documentation.adoc.
Agent Prompt
### Issue description
The generator overwrites `modules/building/pages/task-documentation.adoc` at the start (`cat > "${dest}" ...`) and then appends content over time. If the script fails after the initial overwrite (tool failure, filesystem error, unexpected content, etc.), the destination file can be left truncated/invalid.
### Issue Context
This is especially risky when the workflow opens an automated PR: a mid-run failure could still leave a modified (but broken) generated doc in the workspace.
### Fix Focus Areas
- hack/gen-task-docs.sh[15-48]
### Suggested fix
- Generate into a temporary file (e.g., `tmp=$(mktemp "${dest}.XXXXXX")`).
- Write the header/rows/footer to the temp file.
- On success, `mv "$tmp" "$dest"` (atomic on same filesystem).
- Add a `trap` to remove the temp file on error/exit.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
🚀 Preview is available at: https://pr-641--konflux-docs.netlify.app |
Summary
hack/gen-task-docs.shandnpm run task-gento regenerate the pageCloses STONEBLD-4926