Skip to content

refactor(authn/method): improve code style and error handling in util.go#4775

Merged
markphelps merged 4 commits into
flipt-io:v2from
ptejasvini:ptejasvini1_flipt
Oct 3, 2025
Merged

refactor(authn/method): improve code style and error handling in util.go#4775
markphelps merged 4 commits into
flipt-io:v2from
ptejasvini:ptejasvini1_flipt

Conversation

@ptejasvini

Copy link
Copy Markdown
Contributor

Summary:

Refactored code in util.go for better readability and maintainability.
Applied inline error handling and replaced magic values with constants.
Ensured code style aligns with project and Google Go style guide recommendations.

@ptejasvini
ptejasvini requested a review from a team as a code owner September 30, 2025 21:07
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 30, 2025
@dosubot

dosubot Bot commented Sep 30, 2025

Copy link
Copy Markdown

Related Documentation

Checked 3 published document(s). No updates required.

You have 3 draft document(s). Publish docs to keep them always up-to-date

How did I do? Any feedback?  Join Discord

@codecov

codecov Bot commented Sep 30, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.53%. Comparing base (4200b00) to head (9e41bea).
⚠️ Report is 5 commits behind head on v2.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #4775      +/-   ##
==========================================
- Coverage   58.55%   58.53%   -0.02%     
==========================================
  Files         135      135              
  Lines       16840    16843       +3     
==========================================
- Hits         9860     9859       -1     
- Misses       6294     6298       +4     
  Partials      686      686              
Flag Coverage Δ
integrationtests 33.75% <0.00%> (-0.18%) ⬇️
unittests 49.15% <100.00%> (+0.03%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@markphelps
markphelps enabled auto-merge October 1, 2025 11:28
@markphelps
markphelps disabled auto-merge October 1, 2025 11:28
@markphelps markphelps added the automerge Used by Kodiak bot to automerge PRs label Oct 1, 2025
@markphelps

Copy link
Copy Markdown
Collaborator

Thank you for the contribution @ptejasvini ! Would you mind following the instructions to sign the DCO ?

Dont worry about the failing tests, those are flakey that I'm trying to figure out how to make less flakey: #4771

@github-actions

github-actions Bot commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

👋 Hi @ptejasvini! Thanks for your contribution to this project.

It looks like one or more of your commits are missing a DCO (Developer Certificate of Origin) sign-off. The DCO is a simple way for you to certify that you have the right to submit this code under the project's license.

How to fix this:

# For future commits, use the -s flag
git commit -s -m "Your commit message"

# To sign off on existing commits in this PR
git rebase HEAD~$(git rev-list --count origin/v2..HEAD) --signoff
git push --force-with-lease

The -s flag adds this line to your commit message:
Signed-off-by: Your Name <[email protected]>

📋 View the failing DCO check for more details

For more information about the DCO, visit: https://developercertificate.org/

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. size:S This PR changes 10-29 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. size:XXL This PR changes 1000+ lines, ignoring generated files. labels Oct 3, 2025
Summary:

Refactored code in util.go for better readability and maintainability.
Applied inline error handling and replaced magic values with constants.
Ensured code style aligns with project and Google Go style guide recommendations.

Signed-off-by: tejasvini1 <[email protected]>
Signed-off-by: tejasvini1 <[email protected]>
@ptejasvini

Copy link
Copy Markdown
Contributor Author

Hey @markphelps ! Thanks a lot for quick help! I have added the sign off. PTAL and can you let me know if it is good to approve the diff.

@markphelps markphelps left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm! thank you for the contribution @ptejasvini

Signed-off-by: tejasvini1 <[email protected]>
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 3, 2025
@ptejasvini

Copy link
Copy Markdown
Contributor Author

Hey @markphelps , i think it requires approval, PTAL.

@ptejasvini

Copy link
Copy Markdown
Contributor Author

Hey @markphelps, thanks for reviewing the PR!

It looks like the workflows are still pending approval. Could you kindly approve them so the CI checks can run? Appreciate your help!

@ptejasvini
ptejasvini requested a review from markphelps October 3, 2025 17:40
Signed-off-by: tejasvini1 <[email protected]>
@ptejasvini

Copy link
Copy Markdown
Contributor Author

Hey @markphelps — I've pushed a new commit to fix the UT failures. Could you please re-approve the workflows so CI can run? Thank you again!

@ptejasvini

Copy link
Copy Markdown
Contributor Author

@markphelps Gentle Bump ^^

@markphelps

Copy link
Copy Markdown
Collaborator

Thank you @ptejasvini !!

@markphelps
markphelps merged commit b098687 into flipt-io:v2 Oct 3, 2025
23 of 25 checks passed
@dosubot

dosubot Bot commented Oct 3, 2025

Copy link
Copy Markdown

Documentation Updates

Checked 4 published document(s). No updates required.

You have 1 draft document(s). Publish docs to keep them always up-to-date

How did I do? Any feedback?  Join Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Used by Kodiak bot to automerge PRs size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants