-
Notifications
You must be signed in to change notification settings - Fork 6.5k
chore: enable lint for unused private fields #23242
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
chore: enable lint for unused private fields #23242
Conversation
Signed-off-by: Michael Crenshaw <[email protected]>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Signed-off-by: Michael Crenshaw <[email protected]>
| # Cache expiration for failed login attempts (default 24h0m0s) | ||
| server.login.attempts.expiration: "24h0m0s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting this was actually a no-op. Need to investigate more. Maybe we switched from an in-memory cache to a Redis cache and just didn't update the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR replaced the redis-based failures counter with an in-memory solution that doesn't have a configurable expiration: #5477
Not going to reevaluate that decision for this PR, just going to remove the dead code.
Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #23242 +/- ##
==========================================
- Coverage 60.02% 59.99% -0.03%
==========================================
Files 342 341 -1
Lines 57870 57818 -52
==========================================
- Hits 34736 34689 -47
+ Misses 20352 20346 -6
- Partials 2782 2783 +1 ☔ View full report in Codecov by Sentry. |
| mgr.reposCache = nil | ||
| mgr.repoCredsCache = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fields aren't read, so this method doesn't do anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good, Thanks for the changes and leaving some comments on the reviews, they were helpful.
Quite a cleanup of the ArgoCDRepoServer struct! 👏🏽
|
@ranakan19 thanks! Yeah the cleanup on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!! Thanks for the amazing cleanup @crenshaw-dev !! 🙌 🚀
Signed-off-by: Michael Crenshaw <[email protected]> Signed-off-by: dsuhinin <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]> Signed-off-by: dsuhinin <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]> Signed-off-by: enneitex <[email protected]>
This lint rule seems mostly very good. It found a bunch of unnecessary code.
The only false positives were two structs that have fields that are being used to make unique map keys.