Skip to content

Commit

Permalink
feat(devservices): Add devservices ci validation job (#6716)
Browse files Browse the repository at this point in the history
This validation job will only run if files are changed in the
`devservices/` directory or the `.github/workflows/ci.yml` has been
changed. It will ensure that the config files that live in the snuba
devservices directory actually work, preventing potential breakages for
devservices across repos that depend on snuba if invalid configs are
merged.

Composite action used:
https://github.com/getsentry/action-validate-devservices-config
  • Loading branch information
hubertdeng123 authored Jan 10, 2025
1 parent 8aaf3b4 commit 2bd4f5c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ api_changes:
- "snuba/cli/devserver.py"
- "rust_snuba/src/processors/*"
- "snuba/datasets/processors/*"

devservices_changes:
- 'devservices/**'
- '.github/workflows/ci.yml'
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
# Map a step output to a job output
outputs:
api_changes: ${{ steps.changes.outputs.api_changes }}
devservices_changes: ${{ steps.changes.outputs.devservices_changes }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2

Expand Down Expand Up @@ -486,3 +487,15 @@ jobs:
# finally, nightly
docker tag ${IMAGE_URL} getsentry/snuba:nightly
docker push getsentry/snuba:nightly
validate-devservices-config:
runs-on: ubuntu-24.04
needs: files-changed
if: ${{ needs.files-changed.outputs.devservices_changes == 'true' }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
name: Checkout repository
- uses: getsentry/action-validate-devservices-config@6477ef1e9c96e456bfad726006e731f89fcd81db
name: Validate devservices config
with:
requirements-file-path: requirements.txt

0 comments on commit 2bd4f5c

Please sign in to comment.