feat(RELEASE-1989): python for publish-index-images tasks#2241
feat(RELEASE-1989): python for publish-index-images tasks#2241midnightercz wants to merge 1 commit into
Conversation
PR Reviewer Guide 🔍(Review updated until commit de5bbe3)Warning
Here are some key observations to aid the review process:
|
e5a8ece to
5e75cea
Compare
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
There was a problem hiding this comment.
Pull request overview
This PR updates the managed and internal “publish index image” Tekton tasks to replace embedded bash logic with Python entrypoints provided by the release-service-utils image.
Changes:
- Swap bash implementations for
python3 -m managed_publish_index_imageandpython3 -m publish_index_image. - Update the task step image reference for both tasks (currently to
quay.io/jluza/release-service-utils:RELEASE-1989). - Simplify the managed task script by removing the inline internalrequest creation loop.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tasks/managed/publish-index-image/publish-index-image.yaml | Replaces the managed publish loop with a Python module invocation and updates the step image reference. |
| tasks/internal/publish-index-image-task/publish-index-image-task.yaml | Replaces skopeo-based bash publishing logic with a Python module invocation and updates the step image reference. |
Comments suppressed due to low confidence (1)
tasks/internal/publish-index-image-task/publish-index-image-task.yaml:85
- The task defines a
requestMessageresult, and the internal publish-index-image pipeline surfaces it, but the new Python invocation no longer writes anything to$(results.requestMessage.path). This will cause task/pipeline consumers and the existing task tests to fail. Please ensure the Python implementation writes the intended message to the Tekton result file (or plumb the result path into the module and write it there).
--target-index "$(params.targetIndex)" \
--retries "$(params.retries)" \
--source-credential-path /mnt/publishingCredentials/sourceIndexCredential \
--target-credential-path /mnt/publishingCredentials/targetIndexCredential
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5e75cea to
941358c
Compare
|
/retest |
1 similar comment
|
/retest |
|
All PipelineRuns for this commit have already succeeded. Use |
|
/ok-to-test |
|
All PipelineRuns for this commit have already succeeded. Use |
941358c to
b20b46f
Compare
|
/ok-to-test |
b20b46f to
dead8a4
Compare
|
/ok-to-test |
2 similar comments
|
/ok-to-test |
|
/ok-to-test |
|
/retest |
dead8a4 to
bbba522
Compare
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
c8c057d to
2bded48
Compare
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
fb16139 to
de5bbe3
Compare
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
tasks/internal/publish-index-image and tasks/managed/publish-index-image internal bash scripts are replaced with python scripts from release-service-utils Signed-off-by: Jindrich Luza <jluza@redhat.com> Assisted-By: gemini Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
de5bbe3 to
165b23f
Compare
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
PR Code Suggestions ✨Warning
Inline suggestions were posted as code suggestions. |
| --source-credential-path /mnt/publishingCredentials/sourceIndexCredential \ | ||
| --target-credential-path /mnt/publishingCredentials/targetIndexCredential | \ | ||
| awk '{printf "%s", (NR==1 ? "" : ORS) $0}' | \ | ||
| tee "$(results.requestMessage.path)" |
There was a problem hiding this comment.
This works, but I wonder if it would be cleaner to have the Python script write requestMessage directly (e.g. RESULT_REQUEST_MESSAGE env + tekton.result_paths_from_env, same as check_fbc_opt_in)? Then you would not need the stdout pipe/awk layer, and log output cannot accidentally end up in the result.
happybhati
left a comment
There was a problem hiding this comment.
Minor comment, overall looks good, waiting on Utils change to be merged and some conflicts on this PR.
| --retries "$(params.retries)" \ | ||
| --source-credential-path /mnt/publishingCredentials/sourceIndexCredential \ | ||
| --target-credential-path /mnt/publishingCredentials/targetIndexCredential | \ | ||
| awk '{printf "%s", (NR==1 ? "" : ORS) $0}' | \ |
There was a problem hiding this comment.
You might use instead the result_paths_from_env in the python script instead of falling back to shell:
https://github.com/konflux-ci/release-service-utils/blob/main/scripts/python/helpers/tekton.py#L131
tasks/internal/publish-index-image and
tasks/managed/publish-index-image
internal bash scripts are replaced with python scripts from release-service-utils
Describe your changes
Relevant Jira
Checklist before requesting a review
do not mergelabel if there's a dependency PRrelease-service-maintainershandle if you are unsure who to tagSigned-off-by: My name <email>.github/scripts/readme_generator.shand verified the results using.github/scripts/check_readme.shAssisted-By: Cursor