-
Notifications
You must be signed in to change notification settings - Fork 56
Re-enable ruff BLE (blind-except) rule and fix all violations #10002
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8c73148
[Spec Kit] Add specification for ruff BLE re-enablement (INBOX-19)
saltas888 53d513b
[Spec Kit] Add implementation plan for ruff BLE re-enablement (INBOX-19)
saltas888 6018a80
[Spec Kit] Add critique report and apply its recommendations (INBOX-19)
saltas888 9c42b3d
[Spec Kit] Add task breakdown for ruff BLE re-enablement (INBOX-19)
saltas888 a590463
[Spec Kit] Add spec/ask alignment check — verdict ALIGNED (INBOX-19)
saltas888 e244821
[Spec Kit] Complete T001 inventory re-measurement — 78/78 sites recon…
saltas888 0c1a9bd
[Spec Kit] Suppress BLE001 in graph migrations — Batch A (INBOX-19)
saltas888 5b438fe
[Spec Kit] Suppress BLE001 in auth + backend runtime — Batches B/C (I…
saltas888 7ee0670
[Spec Kit] Suppress BLE001 in test helpers + tooling; US3 checkpoint …
saltas888 68ca27a
[Spec Kit] Narrow 8 blind excepts in tests/tooling; US2 checkpoint gr…
saltas888 f648739
[Spec Kit] Enable BLE rule — remove ignore, add changelog; all gates …
saltas888 06fd34d
[Spec Kit] Polish: suppression audit, unit suite, SC-007 diff audit, …
saltas888 f32b310
[Spec Kit] Add final implementation report — all gates re-verified gr…
saltas888 89e7ec4
resolve conflicts
saltas888 5ec7bc0
Document rollback and retry caveats on two BLE suppressions
saltas888 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
I'm not sure this was needed in the first place. There would be an exception here if the event itself was malformed i.e. we didn't properly create the event. That should never happen as we control the data used as input. When sending the events we'd be sending them to an internal queue which is then later picked up. I don't think this ever blocks the current code path even if we fail to send the event to Prefect. In some other cases we do send things like this as a background task that gets executed after the response is returned the user which could be a better option. The same would be true for oauth2 and oicd, as this PR isn't really changing the behavior this part could be done as a follow up job.
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.
🤖 platform-health-agent — thanks, and agreed with your own conclusion that this is a follow-up rather than something for this PR: the
try/exceptaround the event emission already existed, and this PR adds only the comment +# noqa: BLE001, so behaviour is unchanged here.To make sure the follow-up captures your point accurately: the suggestion is that the defensive catch is unnecessary in the first place (event construction is fully under our control, and emission goes to an internal queue that cannot block the login/logout response), so the better shape is to drop the
try/except— or move emission to a background task that runs after the response is returned — rather than keep a suppressed broad catch. Same treatment forapi/oauth2.pyandapi/oidc.py, which carry the identical pattern.I have not changed anything here. If you would like this tracked as an Engineering Inbox card (all three files, "remove/relocate best-effort event-emission catches in auth endpoints"), say so and I will file it with your reasoning quoted.