Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
391b0ad
baseline
joshuarli Nov 24, 2025
954c93b
see if we have more cpu to use
joshuarli Nov 24, 2025
b7647d2
test
joshuarli Nov 24, 2025
fd4dd8d
hm
joshuarli Nov 25, 2025
d0f9bcb
vmstat is new firend
joshuarli Nov 25, 2025
c75d1fe
.
joshuarli Nov 25, 2025
30e5dc6
let it rip
joshuarli Nov 25, 2025
d1ac005
[skip ci] remove rerunfailures
joshuarli Nov 25, 2025
8f13f5f
[skip ci] fix: sort for xdist collection
joshuarli Nov 25, 2025
fbd5ab2
[skip ci] remaining fixes for xdist colelction
joshuarli Nov 26, 2025
9fc08e5
[skip ci]
joshuarli Dec 2, 2025
636e6c6
try n2 acceptance
joshuarli Dec 11, 2025
89b729f
Merge remote-tracking branch 'origin' into ci-try-multiproc-shards
joshuarli Dec 11, 2025
b074623
no rereuns
joshuarli Dec 11, 2025
0e5a7ca
try n3 and mark some tests as unsafe
joshuarli Dec 12, 2025
e0fe7c6
more marks
joshuarli Dec 12, 2025
783d486
4 shards n3, 1 shard serial
joshuarli Dec 12, 2025
d322244
more marks but i think we need to be sharding by class, not tests
joshuarli Dec 12, 2025
ab81f83
pytest collection should be class based for acceptance tests
joshuarli Dec 12, 2025
238ba66
remove all xdist_unsafe
joshuarli Dec 12, 2025
0298cfd
redo marking this time with loadscope for class-based distribution at…
joshuarli Dec 12, 2025
23ca621
bump base timeout from 10 to 20
joshuarli Dec 12, 2025
d47c68c
5 shards and start marking only from ci, not local
joshuarli Dec 12, 2025
ece7080
.
joshuarli Dec 12, 2025
b2f029f
..
joshuarli Dec 12, 2025
5194008
does n2 help with these few timeouts
joshuarli Dec 12, 2025
3b65240
maybe timeouts were the issue all along
joshuarli Dec 15, 2025
ce57098
fix: stop attempting pytest-django db teardowns at the end
joshuarli Dec 15, 2025
8a6a14d
60s timeout
joshuarli Dec 15, 2025
585d2b5
isolate potential test pollution
joshuarli Dec 16, 2025
a83dc34
see if n2 relieves timeouts
joshuarli Dec 16, 2025
51b35d6
[skip ci] cant reproduce timeouts locally even with 10
joshuarli Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-sentry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ runs:

### pytest configuration ###
echo "PY_COLORS=1" >> "$GITHUB_ENV"
echo "PYTEST_ADDOPTS=--reruns=5 --durations=10 --fail-slow=60s" >> $GITHUB_ENV
# echo "PYTEST_ADDOPTS=--reruns=5 --durations=10 --fail-slow=60s" >> $GITHUB_ENV
echo "COVERAGE_CORE=sysmon" >> "$GITHUB_ENV"

### pytest-sentry configuration ###
Expand Down
136 changes: 71 additions & 65 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,7 @@ env:
SNUBA_NO_WORKERS: 1

jobs:
files-changed:
name: detect what files changed
runs-on: ubuntu-24.04
timeout-minutes: 3
# Map a step output to a job output
outputs:
acceptance: ${{ steps.changes.outputs.acceptance }}
backend_all: ${{ steps.changes.outputs.backend_all }}
frontend_all: ${{ steps.changes.outputs.frontend_all }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Check for backend file changes
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml

acceptance:
if: needs.files-changed.outputs.acceptance == 'true'
needs: files-changed
name: acceptance
runs-on: ubuntu-24.04
timeout-minutes: 30
Expand Down Expand Up @@ -100,9 +79,6 @@ jobs:

- name: webpack
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# should set value either as `true` or `false`
CODECOV_ENABLE_BA: ${{ needs.files-changed.outputs.frontend_all == 'true'}}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
run: |
pnpm run build-acceptance
Expand All @@ -117,50 +93,80 @@ jobs:
with:
mode: acceptance-ci

- name: Run acceptance tests (#${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
run: make run-acceptance
- name: Run acceptance test
run: |
python3 -b -m pytest --reuse-db -m "not xdist_unsafe" -n2 --dist=loadscope tests/acceptance/test*

acceptance-serial:
name: acceptance-serial
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
id-token: write
actions: read # used for DIM metadata
strategy:
# This helps not having to run multiple jobs because one fails, thus, reducing resource usage
# and reducing the risk that one of many runs would turn red again (read: intermittent tests)
fail-fast: false
matrix:
# XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.
instance: [0]
env:
# XXX: MATRIX_INSTANCE_TOTAL must be hardcoded to the length of strategy.matrix.instance.
MATRIX_INSTANCE_TOTAL: 1
TEST_GROUP_STRATEGY: roundrobin

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
name: Checkout sentry

- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
id: setup-node
with:
node-version-file: '.node-version'

- name: Inspect failure
if: failure()
- uses: pnpm/action-setup@36de12bed180fa130ed56a35e7344f2fa7a820ab # v4

- name: Step configurations
id: config
run: |
if command -v devservices; then
devservices logs
fi
echo "webpack-path=.webpack_cache" >> "$GITHUB_OUTPUT"
echo "WEBPACK_CACHE_PATH=.webpack_cache" >> "$GITHUB_ENV"

- name: Collect test data
uses: ./.github/actions/collect-test-data
if: ${{ !cancelled() }}
- name: webpack cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
artifact_path: .artifacts/pytest.acceptance.json
gcs_bucket: ${{ secrets.COLLECT_TEST_DATA_GCS_BUCKET }}
gcp_project_id: ${{ secrets.COLLECT_TEST_DATA_GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.SENTRY_GCP_DEV_WORKLOAD_IDENTITY_POOL }}
service_account_email: ${{ secrets.COLLECT_TEST_DATA_SERVICE_ACCOUNT_EMAIL }}
matrix_instance_number: ${{ steps.setup.outputs.matrix-instance-number }}

# This job runs when FE or BE changes happen, however, we only upload coverage data for
# BE changes since it conflicts with codecov's carry forward functionality
# Upload coverage data even if running the tests step fails since
# it reduces large coverage fluctuations
- name: Handle artifacts
uses: ./.github/actions/artifacts
if: ${{ !cancelled() && needs.files-changed.outputs.backend_all == 'true' }}
continue-on-error: true
timeout-minutes: 5
path: ${{ steps.config.outputs.webpack-path }}
key: ${{ runner.os }}-v2-webpack-cache-${{ hashFiles('rspack.config.ts', 'pnpm-lock.yaml', 'package.json') }}

- name: node_modules cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
id: nodemodulescache
with:
token: ${{ secrets.CODECOV_TOKEN }}
commit_sha: ${{ github.event.pull_request.head.sha }}
type: acceptance

acceptance-required-checks:
# this is a required check so we need this job to always run and report a status.
if: always()
name: Acceptance
needs: [acceptance, files-changed]
runs-on: ubuntu-24.04
timeout-minutes: 3
steps:
- name: Check for failures
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('pnpm-lock.yaml', 'api-docs/pnpm-lock.yaml', '.node-version') }}

- name: Install Javascript Dependencies
if: steps.nodemodulescache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile

- name: webpack
env:
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
run: |
pnpm run build-acceptance

- name: Build chartcuterie configuration module
run: |
make build-chartcuterie-config

- name: Setup sentry env
uses: ./.github/actions/setup-sentry
id: setup
with:
mode: acceptance-ci

- name: Run acceptance test
run: |
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1
python3 -b -m pytest --reuse-db -m "xdist_unsafe" tests/acceptance
Loading
Loading