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(tidb-engine-ext): link git and registry cargo cache #3210

Merged

Conversation

purelind
Copy link
Collaborator

@purelind purelind commented Nov 7, 2024

Directly setting the CARGO_HOME variable will result in losing the default config and env configurations,so just creat link for git and registry of cargo cache.

Copy link

ti-chi-bot bot commented Nov 7, 2024

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 the changes are related to fixing an issue with the tidb-engine-ext repository where setting the CARGO_HOME variable results in losing the default configuration and environment configurations. To fix this issue, the changes proposed in this PR are to create a link for the git and registry of cargo cache instead of directly setting the CARGO_HOME variable.

Looking at the diff, the changes seem to be straightforward. The script now removes the .git and registry directories from the cargo cache and then creates symbolic links for the git and registry directories in the cargo cache.

However, the PR does not mention why the CARGO_HOME variable was set in the first place and whether there are any other potential issues with removing it and using symbolic links instead.

It would be good to clarify these points in the PR description or in the comments. Additionally, it may be worth considering if there are any security implications to creating symbolic links in the cargo cache.

Overall, the changes proposed in this PR seem reasonable. It would be good to add some additional context around the reasoning behind the changes and any potential issues to be aware of.

@ti-chi-bot ti-chi-bot bot added the size/S label Nov 7, 2024
Copy link

ti-chi-bot bot commented Nov 7, 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 description and code diff, it appears that the following changes were made:

  • Instead of directly setting the CARGO_HOME environment variable, the pull request creates a symlink for the git and registry directories of the Cargo cache.
  • The CARGO_HOME environment variable is no longer set.
  • The CPU limit for the container has been increased to 12.
  • The CARGO_NET_GIT_FETCH_WITH_CLI environment variable is still set to "true".
  • The cargo-cache volume is still mounted at /cargo-cache.

Potential problems:

  • The code diff does not have a test case to validate the changes.
  • The pull request does not give a clear explanation of why the change is made.
  • The pull request does not explain how the suggested fix is expected to improve the current situation.

Fixing suggestions:

  • Add test cases to validate the changes made in the pull request.
  • Add a detailed explanation of why the change is made to the pull request description.
  • Add an explanation of how the suggested fix is expected to improve the current situation to the pull request description.

Copy link
Contributor

@CalvinNeo CalvinNeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

ti-chi-bot bot commented Nov 7, 2024

@CalvinNeo: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

ti-chi-bot bot commented Nov 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: CalvinNeo

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 merged commit 5448a3f into PingCAP-QE:main Nov 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants