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: cluster and user name conflict on add kubeconfig with same context cluster and user #1048

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

poneding
Copy link
Contributor

Description

See issue #1047 and Files changed.

Related Issue

resolves #1047

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (changes only affecting documentation)

Checklist

  • I have tested my changes locally and ensured they are functioning properly. Please run the make build and make test commands.
  • I have added/updated unit or e2e tests to cover my changes.
  • I have updated the relevant documentation. If you change commands or arguments, run make doc-gen to generate new documentation.

Copy link

the-label-bot bot commented Dec 31, 2024

The Label Bot has predicted the following:

Category Value Confidence Applied Label

@sunny0826
Copy link
Owner

Hey there! Let's fix that unit test!

@poneding
Copy link
Contributor Author

poneding commented Jan 2, 2025

Hey there! Let's fix that unit test!

If use rand generate suffixe instead of hash, then I think we need to modify the test functions. So what do you think.

@sunny0826
Copy link
Owner

Hey there! Let's fix that unit test!

If use rand generate suffixe instead of hash, then I think we need to modify the test functions. So what do you think.

Of course.

Copy link

gitguardian bot commented Jan 3, 2025

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
4387263 Triggered Generic High Entropy Secret 050e806 cmd/add_test.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@poneding
Copy link
Contributor Author

poneding commented Jan 7, 2025

Hey there! Let's fix that unit test!

If use rand generate suffixe instead of hash, then I think we need to modify the test functions. So what do you think.

Of course.

Updated.

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 62.22222% with 17 lines in your changes missing coverage. Please review.

Project coverage is 19.56%. Comparing base (c509a69) to head (050e806).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cmd/add.go 62.22% 11 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1048      +/-   ##
==========================================
- Coverage   20.26%   19.56%   -0.70%     
==========================================
  Files          21       21              
  Lines        2615     2647      +32     
==========================================
- Hits          530      518      -12     
- Misses       2038     2075      +37     
- Partials       47       54       +7     
Flag Coverage Δ
unittests 19.56% <62.22%> (-0.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Owner

@sunny0826 sunny0826 left a comment

Choose a reason for hiding this comment

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

LGTM
Thank you for your valuable contribution to this project! Your work is greatly appreciated. 🎆

@sunny0826 sunny0826 merged commit ca1f735 into sunny0826:master Jan 7, 2025
6 checks passed
@sunny0826
Copy link
Owner

@all-contributors please add @poneding for code

Copy link
Contributor

@sunny0826

I've put up a pull request to add @poneding! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cluster and user name conflict on add kubeconfig with same context cluster and user
2 participants