fix: treat uploads-from-forks as warnings, not errors - #46
aslushnikov wants to merge 1 commit into
Conversation
When an open source repository is forked, and runs tests inside, the OIDC upload fails. This is a common-enough case, so instead of printing a scary error message, we should consider the upload "skipped".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae1f0ade7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const repositoryMismatchReason = oidcRepositoryMismatchReason(errorMessage); | ||
| if (repositoryMismatchReason !== undefined) { | ||
| logger.warn(`[flakiness.io] ⚠ Skipping upload: ${repositoryMismatchReason}`); | ||
| return { status: 'skipped', reason: repositoryMismatchReason }; |
There was a problem hiding this comment.
Avoid downgrading non-fork repository mismatches
When a normal base-repository job is accidentally configured with a Flakiness project bound to another repository, the server returns the same repository-mismatch message as it does for a fork. Because this check uses only that message, it now returns skipped and bypasses throwOnFailure: true, causing strict CI workflows to pass while every report remains unuploaded. Restrict the downgrade to a verifiable fork context or a server error code that specifically identifies an expected fork upload.
Useful? React with 👍 / 👎.
When an open source repository is forked, and runs tests inside,
the OIDC upload fails.
This is a common-enough case, so instead of printing a scary error
message, we should consider the upload "skipped".