PingCAP-QE / ci

Continue intergration tests
Apache License 2.0
19 stars 97 forks source link

feat(scripts/artifacts): add shell function `publish_tiup_from_oci_artifact_repos` #2955

Closed wuhuizuo closed 1 month ago

wuhuizuo commented 1 month ago

Signed-off-by: wuhuizuo wuhuizuo@126.com

ti-chi-bot[bot] commented 1 month ago

I have already done a preliminary review for you, and I hope to help you do a better job.

Based on the PR title and description, it seems that this PR adds a new shell function called publish_tiup_from_oci_artifact_repos() to the existing tag-rc2ga-on-repos.sh script. This new function is responsible for publishing TiUP packages from OCI artifact repositories.

There are no immediate problems with this PR, but here are some suggestions for improvement:

  1. The PR description should provide more context about the changes. What problem does this PR solve? Why is this change necessary? It would be helpful to provide some background information to make it easier for reviewers to understand the changes.

  2. The function name publish_tiup_from_oci_artifact_repos() is quite long and may be difficult to read. Consider shortening the name to something like publish_tiup_from_oci().

  3. The publish_tiup_oci_repo() function is called from within a loop in publish_tiup_from_oci_artifact_repos(). It might be more efficient to pass an array of repos and tags to publish_tiup_from_oci_artifact_repos() and then loop through them once inside the function.

  4. The tkn command in publish_tiup_oci_repo() is not defined in the script. It's assumed that this command is available on the system where the script will be run. It would be helpful to provide some guidance on how to install this command or any other dependencies required by the script.

  5. The publish_tiup_oci_repo() function assumes that the TiUP packages are available in specific repositories and tags. It might be better to make these values configurable through command-line arguments or environment variables.

Overall, the changes look good and seem to serve a useful purpose. It would be helpful to address the suggestions above to make the script more robust and maintainable.

wuhuizuo commented 1 month ago

/approve

ti-chi-bot[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wuhuizuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/PingCAP-QE/ci/blob/main/OWNERS)~~ [wuhuizuo] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment