ci(lint): run secret-scan pytest without syncing the project env - #35827
Open
mateo-berri wants to merge 1 commit into
Open
ci(lint): run secret-scan pytest without syncing the project env#35827mateo-berri wants to merge 1 commit into
mateo-berri wants to merge 1 commit into
Conversation
Contributor
Greptile SummaryThis PR speeds up the secret-scan CI job by running its self-contained pytest check outside the project environment.
Confidence Score: 5/5The PR appears safe to merge because the targeted test is self-contained and remains runnable with the isolated pytest environment. The changed invocation still provides pytest, preserves repository-root execution and pytest configuration discovery, and the test derives its source-tree scan path independently of the project environment.
|
| Filename | Overview |
|---|---|
| .github/workflows/test-linting.yml | Runs the standalone secret-scan test in a minimal ephemeral pytest environment, avoiding an unnecessary full project synchronization without changing the test’s scan scope or dependencies. |
Reviews (1): Last reviewed commit: "ci(lint): run secret-scan pytest without..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
TLDR
Problem this solves:
uv run --frozenfirst syncs 146 packages and builds the litellm wheelHow it solves it:
--no-projectso nothing but pytest installsRelevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Before, at 258d154 on PR #35807: the secret-scan job spent its whole budget installing an environment the test never uses, then died at the five minute cap before the single collected test ran (cancelled run)
After, at d7ef033, the same invocation CI now runs, from a shell with no project environment:
And the live end-to-end proof, since pull_request runs use the workflow file from the PR branch: this PR's own secret-scan check at d7ef033 passed in 1m8s, well clear of the five minute cap
Type
🚄 Infrastructure
Changes
tests/litellm/test_no_hardcoded_secrets.pywalks the source tree withos.walkand regexes; it imports nothing from litellm, and no conftest exists anywhere on its path (repo root,tests/, ortests/litellm/). The job'suv run --frozennevertheless synced the full project environment, and on a cold-cache runner building the litellm wheel alone took over two minutes, which is how a job capped attimeout-minutes: 5got cancelled before its one test executed. Swapping--frozenfor--no-projectmakes uv skip the project entirely and spin up an ephemeral environment containing just pytest, so the job no longer races its own timeout. The ggshield step after it already runs isolated throughuv tool runand is untouchedFinal Attestation