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(clustertool) fix shamir_threshold check #29302

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

gismo2004
Copy link
Contributor

Description
current implementation just checks the first line of the file as it exits in the “else”

⚒️ Fixes #

⚙️ Type of change

  • ⚙️ Feature/App addition
  • 🪛 Bugfix
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🔃 Refactor of current code

🧪 How Has This Been Tested?
Local go test file.

📃 Notes:

✔️ Checklist:

  • ⚖️ My code follows the style guidelines of this project
  • 👀 I have performed a self-review of my own code
  • #️⃣ I have commented my code, particularly in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings
  • 🧪 I have added tests to this description that prove my fix is effective or that my feature works
  • ⬆️ I increased versions for any altered app according to semantic versioning
  • I made sure the title starts with feat(chart-name):, fix(chart-name): or chore(chart-name):

➕ App addition

If this PR is an app addition please make sure you have done the following.

  • 🖼️ I have added an icon in the Chart's root directory called icon.png

Please don't blindly check all the boxes. Read them and only check those that apply.
Those checkboxes are there for the reviewer to see what is this all about and
the status of this PR with a quick glance.

Copy link
Member

@PrivatePuffin PrivatePuffin left a comment

Choose a reason for hiding this comment

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

There is a lot wrong with this.
And I also dont get your point at all either.

@gismo2004
Copy link
Contributor Author

@PrivatePuffin Now I am excited to hear, what exactly "a lot wrong" means!

And my point: your implementation ALWAYS returns a failed as you just check the FIRST line of the file! So unless the string to be found is in line #1 this check is useless...

Except, your intention was to always prevent the commit, if the files haven't been encrypted before? Then this check can be replaced with simple exit(1). I also don't get the point in not executing this check if files ARE already encrypted?

@PrivatePuffin
Copy link
Member

I see your point on this.
The else will always trigger.

@PrivatePuffin
Copy link
Member

I also don't get the point in not executing this check if files ARE already encrypted?

Its a failsafe, its NOT the primary check.
If this gets triggered you've a bigger problem.

Its a failsafe for a case a user reported.

@PrivatePuffin PrivatePuffin merged commit 4f13196 into truecharts:master Nov 15, 2024
27 checks passed
@truecharts truecharts locked as resolved and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants