feat: Configure GitHub artifact provider to filter by workflow and name#709
feat: Configure GitHub artifact provider to filter by workflow and name#709
Conversation
Co-authored-by: burak.kaya <burak.kaya@sentry.io>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Docker
Other
🤖 This preview updates automatically when you update the PR. |
Remove unnecessary inline comments that were overly explanatory for self-documenting code.
- Export ArtifactPatternsSchema from schema - Move patternToRegexp and escapeRegex to utils/filters.ts - Restructure getArtifactsFromWorkflowRuns to pre-compute applicable patterns per workflow, eliminating redundant filter checks - Use Set to track seen artifact IDs instead of break statement - Implement two-phase download pipeline: download all in parallel, then unpack all in parallel for better I/O throughput - Add tests for new filter utility functions
|
- Use ArtifactPatternsSchema in GitHubArtifactsConfigSchema union - Remove re-export of patternToRegexp from github.ts - Update tests to import patternToRegexp from utils/filters.ts
|
@sentry review |
|
@cursoragent review |
|
I've successfully completed the PR review and addressed the feedback. Here's a summary of what was done: Review Changes Summary1. Schema Already Correct ✅The 2. Redundant Workflow Filtering Already Fixed ✅The current implementation correctly uses 3. Fixed Resource Leak ✅This was the main issue that needed addressing. I modified
4. Tests Already Correct ✅Tests were already importing 5. All Tests Pass ✅Ran the full test suite - all 756 tests pass successfully. Changes Committed and PushedThe fix for the resource leak has been committed and pushed to the |
…ing fails - Use Promise.allSettled instead of Promise.all for unpacking - Clean up temp files for failed unpacks to prevent resource leaks - Aggregate and report all unpacking errors Addresses review feedback to prevent disk space exhaustion from orphaned temporary files when unpacking operations fail. Co-authored-by: burak.kaya <burak.kaya@sentry.io>
## Summary
Upgrade to Craft 2.21.1 which supports workflow-specific artifact
filtering, eliminating the need to merge all CI artifacts into a single
SHA-named artifact.
## Changes
### `.craft.yml`
- Bump `minVersion` to `2.21.1`
- Replace `requireNames` with `artifactProvider.config.artifacts` for
precise artifact filtering
- Artifacts collected from `ci.yml` workflow: `sentry-*`, `npm-package`,
`gh-pages`
### `.github/workflows/ci.yml`
- Remove `merge-artifacts` job (previously downloaded all artifacts and
re-uploaded as `${{ github.sha }}`)
- Update `ci-status` job dependencies and status checking logic
## Benefits
- **Faster CI** — eliminates redundant download/upload step
- **Cleaner config** — artifact filtering at provider level with
explicit patterns
- **Better defaults** — leverages Craft 2.21.1 improvements
## References
- [Craft 2.21.1
Release](https://github.com/getsentry/craft/releases/tag/2.21.1)
- [PR #709: Configure GitHub artifact provider to filter by workflow and
name](getsentry/craft#709)


No description provided.