Commit 6c5704c
committed
fix(test): recover after Linear's "conflict on insert" on projects create
Linear's API has a transient failure mode where `*Create` mutations commit
server-side but return "conflict on insert" to the client. The existing
`run_lineark_with_retry` helper retries the same request body, which is
counterproductive — Linear's content-hash idempotency keeps returning the
same conflict, so every retry fails the same way. CI's Tests (Online) job
has been flaking on this for at least the last several PRs (#140 hit it
before the work in #141 even started).
When we see "conflict on insert", read the entity back by name instead of
retrying. The entity is already in Linear's database; we just need its
post-create state. Both `*Create` and `read` responses share the shape
that downstream test assertions care about (`id`, `name`, full details),
so the synthesized response is interchangeable.
Limited to `projects` for now since `projects read` accepts both UUIDs
and names. `issues read` only accepts identifier/UUID; the one issues
caller of this helper would need a search-and-filter recovery path
that's bigger than this fix.1 parent 0ee74b2 commit 6c5704c
1 file changed
Lines changed: 67 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
| |||
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
45 | 111 | | |
46 | 112 | | |
47 | 113 | | |
| |||
0 commit comments