fix(ci): use dummy key fallback so dependabot PRs pass test_parse_aws#45
Merged
Conversation
GitHub withholds secrets from dependabot PRs, so OPENAI_API_KEY arrived as an empty string. The parser's non-empty guard then short-circuited before the mocked requests.post was ever called, causing test_parse_aws to fail with 0 subcommands instead of 2. Using a literal fallback lets the parser proceed while the test mock handles the actual HTTP call. Co-authored-by: Cursor <[email protected]>
requests 2.34.x requires Python >=3.10. The CI was still pinned to 3.9, causing pip to reject the version outright. Using 3.12 aligns with the Dockerfile (3.14-slim bump in PR #44) and unblocks #42. Co-authored-by: Cursor <[email protected]>
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.
Problem
All 5 open dependabot PRs (#40–#44) fail
tests/test_parser.py::test_parse_awswith the same root cause: GitHub Actions withholds repository secrets from dependabotpull_requestevents, soOPENAI_API_KEYarrives as an empty string. The parser's non-empty-key guard then short-circuits beforerequests.postis ever called, returning[]subcommands instead of the expected 2.Fix
Use the
||fallback operator to supply a literal placeholder key when the secret is absent. Sincerequests.postis fully mocked in the test suite, no real API call is made — the parser only needs a non-empty string to proceed past the guard.This is a pre-existing bug in the CI setup unrelated to any of the dependabot changes. Once this PR merges to
main, the dependabot PRs can be rebased/re-run and will pass.Affected PRs
actions/checkout3 → 7actions/setup-python4 → 6requests2.31.0 → 2.34.2pymongo4.7.3 → 4.17.03.9-slim→3.14-slimMade with Cursor