Skip to content

docs: document real root cause for test_prv_006/007 concurrent failures - #106

Merged
saqibmanan merged 2 commits into
CIfrom
docs/slug-collision-root-cause-CI
Sep 18, 2026
Merged

saqibmanan merged 2 commits into
CIfrom
docs/slug-collision-root-cause-CI

Conversation

@saqibmanan

Copy link
Copy Markdown
Contributor

Summary

Comment-only update, no marker/logic changes. test_prv_006_org_create_dataset and test_prv_007_org_create_usecase were pulled from the default smoke gate in #100 as a stopgap pending investigation, with a comment saying they "need their own investigation." That investigation is done:

  • Root cause: DataSpaceBackend#199 — addDataset/addUseCase/addCollaborative's auto-generated titles have 1-second resolution, and the derived slug (and, for use cases, the title itself) is a unique DB column. Two creates in the same second — routine with -n 3 concurrent provider-smoke workers — collide on that constraint. addDataset returns success: False with an unusable error; addUseCase has no error handling at all and just raises. Either way the frontend's create flow never gets a usable record, which is exactly the "Timed out waiting for Metadata tab" and "Summary mismatch, Found: ''" symptoms these two tests hit.
  • This is a genuine write-race, not the read-latency/network-timeout issue the earlier 30s→60s wait bump assumed (which is why that bump didn't help), and separate from the org-collision theory that PR Bump tight waits on test_prv_011's collaborative flow (concurrent-load flakiness) #99 already ruled out for these two tests.
  • Fix is up as DataSpaceBackend PR #203 (not yet merged or deployed to dev).

What this PR does NOT do

Does not re-add @pytest.mark.smoke — that should only happen once #203 is merged, deployed to dev, and these two tests are confirmed green under real -n 3 concurrent CI load. Draft, not for merge yet.

Test plan

  • Comment-only diff, verified no marker/logic changes (git diff is docstring/comment lines only)
  • Re-run under -n 3 against dev once #203 deploys, then flip the marker back to smoke in a follow-up PR

Both were pulled from the default smoke gate as a stopgap (PR #100) pending
investigation. Root cause is now confirmed: DataSpaceBackend#199, a
same-second slug/title collision on dataset/usecase creation that makes the
create mutation fail outright under concurrent load - not a network-latency
issue, so the earlier 30s->60s wait bump never could have fixed it. Fix is up
as DataSpaceBackend PR #203 (not yet merged/deployed). Leaving both tests as
functional-only until #203 lands on dev and they're confirmed green under -n
3 concurrent load - re-adding @pytest.mark.smoke now would be speculative.
DataSpaceBackend PR #203 (retry-with-disambiguated-slug on same-second
title collision) merged to dev and deployed 2026-09-18. Confirmed via
the deploy's own post-deploy Functional Tests gate (DataSpaceBackend
run 35334824692, job 105572848166): test_prv_006_org_create_dataset
and test_prv_007_org_create_usecase both PASSED under real -n 3
concurrent load against the now-fixed dev backend, 0 reruns needed -
a clean pass where every prior attempt failed 3/3 including reruns.

Re-adding @pytest.mark.smoke to both, back under the default PR/push
gate. Updated the explanatory comments to describe the fix as landed
rather than pending.
@saqibmanan
saqibmanan marked this pull request as ready for review September 18, 2026 12:42
@saqibmanan
saqibmanan merged commit 0ed2611 into CI Sep 18, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant