Bound release network operations and recover Sentry finalization#573
Bound release network operations and recover Sentry finalization#573baron wants to merge 1 commit into
Conversation
| text=True, | ||
| capture_output=True, | ||
| ) | ||
| calls = [json.loads(line) for line in call_log.read_text(encoding="utf-8").splitlines()] |
There was a problem hiding this comment.
Bug: The test fixture run_sentry_deploy_fixture reads call_log without checking if it exists, which can cause a FileNotFoundError if no API calls are logged.
Severity: LOW
Suggested Fix
Add a conditional check to ensure call_log.exists() is true before attempting to read the file. If the file does not exist, return an empty list. The implementation should be calls = ([json.loads(line) for line in call_log.read_text(encoding="utf-8").splitlines()] if call_log.exists() else []).
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: Scripts/test_release_tooling.py#L1694
Potential issue: In `Scripts/test_release_tooling.py`, the `run_sentry_deploy_fixture`
method reads the `call_log` file without first verifying its existence. If a test
scenario using this fixture completes or fails before any API calls are made and logged,
the file will not be created. This will lead to a `FileNotFoundError` when the code
attempts to read the non-existent log file, causing the test to crash. A similar
function, `run_sentry_prepare_fixture`, correctly includes a guard for this condition,
suggesting its omission here was an oversight.
Did we get this right? 👍 / 👎 to inform future reviews.
|
Closing as superseded by #579, which carries the reviewed release/tooling network-bounds work on current main and has a fully green exact-head CI matrix. Related six-PR fix series, in recommended landing order:
|
Summary
finalize-sentryrecovery modeValidation
make dev-release-preflightpython3 Scripts/test_release_tooling.pypython3 Scripts/test_release_promotion.pymake guardrailsbash -n Scripts/release.sh Scripts/promote_release.sh Scripts/install_format_tools.shgit diff --checkRisk / rollout
No real release, Sentry, download, artifact, or app-lifecycle operation was used during validation. The recovery paths are bounded and fail closed when authoritative state cannot be established.