Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(apps/prod/tekton/configs/tasks): use the mirror registry to download oci files #1191

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

wuhuizuo
Copy link
Collaborator

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

…oad oci files

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
@ti-chi-bot ti-chi-bot bot requested a review from purelind July 31, 2024 06:02
@ti-chi-bot ti-chi-bot bot added area/apps env/prod will deploy on the main product cluster labels Jul 31, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 31, 2024

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

Based on the pull request title and description, the key change in this pull request is to use the mirror registry to download OCI files in the publish-tiup-from-oci-artifact.yaml file.

One potential problem I see in this pull request is that the replacement of "hub.pingcap.net" to "hub-mig.pingcap.net" in the artifact_url variable may not be sufficient to handle all possible URLs that could be passed in as params.artifact-url. It would be better to use a more robust mechanism to replace the URL, such as using a regular expression.

To fix this potential problem, we can modify the code to use a regular expression to replace the URL instead of a simple string replacement. For example, we can use the sed command to replace the URL like this:

artifact_url=$(params.artifact-url)
artifact_url=$(echo "$artifact_url" | sed 's/hub\.pingcap\.net/hub-mig.pingcap.net/g')
oras pull $artifact_url

This way, all occurrences of "hub.pingcap.net" in the URL will be replaced with "hub-mig.pingcap.net".

@ti-chi-bot ti-chi-bot bot added the size/XS label Jul 31, 2024
@wuhuizuo
Copy link
Collaborator Author

/approve

Copy link
Contributor

ti-chi-bot bot commented Jul 31, 2024

[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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jul 31, 2024
@ti-chi-bot ti-chi-bot bot merged commit 85119e8 into main Jul 31, 2024
3 of 4 checks passed
@ti-chi-bot ti-chi-bot bot deleted the fix/use-mirror-oci-registry branch July 31, 2024 06:05
ti-chi-bot bot pushed a commit that referenced this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/apps env/prod will deploy on the main product cluster size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant