Commit 92ea6f9
fix: do not fail the suite when there is no trace to redact
The redaction added two commits ago took TestMain down with it in CI:
could not redact .../playwright-traces/TestMain.zip, removing it:
no such file or directory
Error: remove .../TestMain.zip: no such file or directory
Two mistakes. A trace that was never written cannot leak anything, so a
missing archive is nothing to redact rather than an error, and removing
an already-absent file is not a failure either — only a trace still on
disk afterwards is worth failing over.
The second mistake is what produced the missing file. Every package's
TestMain traces under the same name into one shared directory, so the
packages `go test ./...` runs in parallel were already overwriting each
other's traces; rewriting one then raced the next writer, and a failed
rewrite deleted the file out from under it. Trace names are now
qualified by package, which removes the race and stops the traces from
clobbering each other — worth having on its own, given these traces are
the only record of what the browser did.
Verified with two browser-login packages in parallel and a dummy
ORY_RATE_LIMIT_HEADER: both complete, each writes its own trace
(identity.TestMain.zip, relationtuples.TestMain.zip), both hold zero
occurrences of the value, and the header still reaches only the console
hosts.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tg5VWFUb7824qkrooUdvBA1 parent 45462d4 commit 92ea6f9
2 files changed
Lines changed: 36 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
106 | 113 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
358 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
359 | 365 | | |
360 | 366 | | |
361 | 367 | | |
| |||
365 | 371 | | |
366 | 372 | | |
367 | 373 | | |
368 | | - | |
369 | | - | |
370 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
371 | 385 | | |
372 | 386 | | |
373 | 387 | | |
| |||
392 | 406 | | |
393 | 407 | | |
394 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
395 | 413 | | |
396 | 414 | | |
397 | 415 | | |
| |||
520 | 538 | | |
521 | 539 | | |
522 | 540 | | |
523 | | - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
524 | 547 | | |
525 | 548 | | |
526 | 549 | | |
527 | 550 | | |
528 | 551 | | |
529 | 552 | | |
| 553 | + | |
530 | 554 | | |
531 | 555 | | |
532 | 556 | | |
| |||
0 commit comments