Repository navigation
Fix | Make aws sso logout idempotent, check project_long before configure sso logs in - #352
Merged
diego-ojeda-binbash merged 2 commits intoNov 14, 2026
Merged
Conversation
…gure sso logs in * `sso logout` no longer crashes when there is no cached token, when the token already expired (UnauthorizedException), or when there is no credentials file. It ends the session when it can, warns when it cannot, and always removes the local SSO tokens and credentials. The removal of credentials sections right before deleting the whole file is dropped. * `configure sso` checks `project_long` next to the other SSO settings. It used to fail with a TypeError after the login, leaving the profiles half configured. Closes #350 Co-Authored-By: Claude Opus 5.5 <[email protected]>
… fakes A test that did not ask for the `stubs` fixture used real boto3 clients: a regression that reached the SSO login made real, unauthenticated calls to AWS SSO-OIDC and polled forever. The `cli` fixture now always installs the fakes, so an unexpected call fails at once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Coverage Report for CI Build 43629475593Coverage increased (+0.09%) to 73.069%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions2 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
binbashdevops
approved these changes
Nov 14, 2026
diego-ojeda-binbash
deleted the
fix/issue-350-sso-logout-project-long
branch
November 14, 2026 19:03
21 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Fixes both crashes from #350, with option (a) in each case, plus one more found along the way:
sso logoutwith no cached tokenFileNotFoundErrortraceback0sso logoutwith an expired tokenUnauthorizedExceptiontraceback0sso logoutwith nocredentialsfile (new)FileNotFoundErrortraceback0configure ssowithoutproject_longTypeErrorafter the login, profiles half configuredlogoutis now idempotent: it ends the session when it can, and always removes the local SSO tokens and credentials. It also drops the removal ofcredentialssections, which was dead code: the whole file was deleted right after.Two commits:
logoutwithout a session,logouttwice in a row,logoutwith an expired token, andconfigure ssowithoutproject_long. All 4 fail on the current code.clifixture now always installs the AWS (Stubber), browser andsleepfakes. Before, a test that did not ask forstubsused real boto3 clients. While checking that the new tests fail on the old code, theproject_longcase ran into the real SSO login: it made unauthenticated calls to AWS SSO-OIDC (with a made-up start URL, no account involved) and polled forever. Now any unexpected call fails at once.Why?
#350: both commands showed a Python traceback instead of a clear message. The
configure ssocrash also left the AWS config half written.Results
322 tests pass. Against the current code, the 4 new tests fail in ~7 s.
Closes #350
Relates to #346
🤖 Generated with Claude Code