-
Notifications
You must be signed in to change notification settings - Fork 230
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
backend: refactor: refreshAndCacheNewToken in headlamp.go #2816
Conversation
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.
Thanks you for the PR @Faakhir30. Some suggestions
0a2c22a
to
886e3c2
Compare
@Faakhir30 you can try running |
Yeah, did try that a lot, but for some reason it is not working for me locally, did asked in couldnt find much about this error. most probably its some packages version conflict, but im not sure:
|
You need Go version ❯ go version
go version go1.22.1 darwin/amd64 Also, you can always check our actions workfows for the passing CI headlamp/.github/workflows/backend-test.yml Lines 31 to 55 in 4f110c1
|
886e3c2
to
b86ef17
Compare
Signed-off-by: Faakhir30 <[email protected]>
b86ef17
to
86c89a3
Compare
Changes implemented, lint errors fixed, rebased with main, ready for review. @knrt10 thanks |
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.
Awesome. Thanks again for PR, appreciate it
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.
🎉 great work, thanks!
Fixes #1848
The
refreshAndCacheNewToken
function inbackend/cmd/headlamp.go
is currently too long and complex, requiring a//nolint:funlen
directive to bypass linter warnings. This makes the code harder to maintain and understand.Refactored the function by:
funlen
linter bypassTesting
make backend-test
to ensure all tests passmake backend-lint
that code passes linting without exceptions