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: sort broken mountpoint and put subpaths at the end. #4423

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SimonCqk
Copy link
Contributor

@SimonCqk SimonCqk commented Dec 3, 2024

Ⅰ. Describe what this PR does

  1. sort broken mountpoints orders.
  2. fix unexpected variable capture in for-loop.

Ⅱ. Does this pull request fix one issue?

fixes #XXXX

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Copy link

fluid-e2e-bot bot commented Dec 3, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign trafalgarzzz for approval by writing /assign @trafalgarzzz in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

fluid-e2e-bot bot commented Dec 3, 2024

Hi @SimonCqk. Thanks for your PR.

I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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

sonarcloud bot commented Dec 3, 2024

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 40.90909% with 13 lines in your changes missing coverage. Please review.

Project coverage is 58.20%. Comparing base (3db2a62) to head (859026b).
Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
pkg/utils/mountinfo/mountpoint.go 38.09% 12 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4423      +/-   ##
==========================================
- Coverage   58.22%   58.20%   -0.02%     
==========================================
  Files         565      565              
  Lines       30967    30982      +15     
==========================================
+ Hits        18030    18034       +4     
- Misses      10745    10755      +10     
- Partials     2192     2193       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -64,14 +69,15 @@ func getGlobalMounts(mountByPath map[string]*Mount) (globalMountByName map[strin

for k, v := range mountByPath {
if strings.Contains(k, mountRoot) {
vCopy := v
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think vCopy := v does not create a deep copy of the Mount object; instead, it creates a new pointer to the same Mount object. If the original Mount object is modified, vCopy will reflect these changes. If this behavior is not intended, implementing a method for deep copying might be necessary.

@cheyang cheyang marked this pull request as draft December 4, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants