Conversation
Greptile SummaryThis PR standardizes GitHub Actions workflow jobs to use the Key changes:
One notable consideration: in Confidence Score: 5/5Safe to merge — changes are purely additive CI configuration with no impact on application logic. All seven changes are single-line additions of .github/workflows/pr-python-model-tests.yml — workflow-level Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
ENV[ci-protected Environment\nSecrets + Protection Rules]
subgraph nightly-llm-provider-chat.yml
A1[provider-chat-test\nreusable workflow] --> A2[notify-slack-on-failure\n✅ ci-protected]
end
subgraph post-merge-beta-cherry-pick.yml
B1[resolve-cherry-pick-request] --> B2[cherry-pick-to-latest-release]
B2 --> B3[notify-slack-on-success\n✅ ci-protected]
B1 --> B4[notify-slack-on-failure\n✅ ci-protected]
end
subgraph pr-python-model-tests.yml
C1[model-check\n✅ ci-protected]
end
subgraph preview.yml
D1[Deploy-Preview\n✅ ci-protected]
end
subgraph storybook-deploy.yml
E1[Deploy-Storybook\n✅ ci-protected] --> E2[notify-slack-on-failure\n✅ ci-protected]
end
subgraph sync_foss.yml
F1[sync-foss\n✅ ci-protected]
end
subgraph tag-nightly.yml
G1[create-and-push-tag\n✅ ci-protected]
end
ENV -.->|secrets & rules| A2
ENV -.->|secrets & rules| B3
ENV -.->|secrets & rules| B4
ENV -.->|secrets & rules| C1
ENV -.->|secrets & rules| D1
ENV -.->|secrets & rules| E1
ENV -.->|secrets & rules| E2
ENV -.->|secrets & rules| F1
ENV -.->|secrets & rules| G1
Prompt To Fix All With AIThis is a comment left during a code review.
Path: .github/workflows/pr-python-model-tests.yml
Line: 12-24
Comment:
**Workflow-level `env:` can't access environment-scoped secrets**
GitHub Actions only makes environment secrets available within the job that specifies the `environment` key — they are not injected into workflow-level `env:` blocks. If any of these secrets (`AWS_ACCESS_KEY_ID`, `COHERE_API_KEY`, `LITELLM_API_KEY`, `OPENAI_API_KEY`, etc.) are stored exclusively as `ci-protected` environment secrets (rather than as repository-level secrets), this block would silently produce empty strings.
Since this PR's goal is to consolidate onto environment-scoped secrets, consider moving these declarations inside the `model-check` job's `env:` block (line 37) so they are resolved in the correct job scope:
```yaml
model-check:
runs-on: ...
environment: ci-protected
timeout-minutes: 45
env:
PYTHONPATH: ./backend
# Bedrock
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION_NAME: ${{ vars.AWS_REGION_NAME }}
# API keys for testing
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
LITELLM_API_KEY: ${{ secrets.LITELLM_API_KEY }}
LITELLM_API_URL: ${{ secrets.LITELLM_API_URL }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }}
AZURE_API_URL: ${{ vars.AZURE_API_URL }}
```
If these secrets are (and will remain) repo-level secrets, the current placement works fine and no change is needed.
How can I resolve this? If you propose a fix, please make it concise.Reviews (3): Last reviewed commit: "fewer" | Re-trigger Greptile |
🖼️ Visual Regression Report
|
Description
How Has This Been Tested?
Captured by existing
Additional Options
Summary by cubic
Standardized GitHub Actions to use the
ci-protectedenvironment so env-scoped secrets and protections apply consistently across tests, deploys, and scheduled tasks, including notify/failure paths.pr-python-model-tests, preview deploy, Storybook deploy + failure handler.sync_foss,tag-nightly.Written for commit 5a775cc. Summary will update on new commits.