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

cluster: unique validator_keys dir #2958

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

pinebit
Copy link
Contributor

@pinebit pinebit commented Mar 13, 2024

In according with the issue description #2881, this is UX improvement - if the target validator_keys folder exists, the implementation checks if the folder is empty. If the existing directory is not empty, or in case of any IO error, the process fails.

category: feature
ticket: #2881

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 69.56522% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 54.12%. Comparing base (66b41d7) to head (6ea4107).
Report is 2 commits behind head on main.

Files Patch % Lines
cluster/helpers.go 82.35% 2 Missing and 1 partial ⚠️
cmd/createcluster.go 33.33% 1 Missing and 1 partial ⚠️
dkg/disk.go 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2958      +/-   ##
==========================================
+ Coverage   54.09%   54.12%   +0.03%     
==========================================
  Files         194      194              
  Lines       27402    27412      +10     
==========================================
+ Hits        14822    14838      +16     
+ Misses      10826    10821       -5     
+ Partials     1754     1753       -1     

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

@OisinKyne
Copy link
Contributor

I'm not sure this is better. People would struggle to figure out why their validator keys aren't matching with the expected ones because their cluster has imported the default validator_keys/ one. What we should do is, if the validator_keys folder is present, we check the directory is empty, and if so, we continue without erroring. When people clean folders, they often don't think to delete the folder they just delete the files.

@pinebit
Copy link
Contributor Author

pinebit commented Mar 13, 2024

I'm not sure this is better. People would struggle to figure out why their validator keys aren't matching with the expected ones because their cluster has imported the default validator_keys/ one. What we should do is, if the validator_keys folder is present, we check the directory is empty, and if so, we continue without erroring. When people clean folders, they often don't think to delete the folder they just delete the files.

Thank you @OisinKyne, changed as you suggested. Good point.

@pinebit pinebit force-pushed the pinebit/unique-validator-keys-dir branch from f14abff to 6ea4107 Compare March 14, 2024 14:30
Copy link

sonarcloud bot commented Mar 14, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@pinebit pinebit added the merge when ready Indicates bulldozer bot may merge when all checks pass label Mar 14, 2024
@obol-bulldozer obol-bulldozer bot merged commit f09498a into main Mar 14, 2024
12 checks passed
@obol-bulldozer obol-bulldozer bot deleted the pinebit/unique-validator-keys-dir branch March 14, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants