Skip to content

fix: treat uploads-from-forks as warnings, not errors - #46

Open
aslushnikov wants to merge 1 commit into
mainfrom
gracefully-handle-uploads-from-forks
Open

aslushnikov wants to merge 1 commit into
mainfrom
gracefully-handle-uploads-from-forks

Conversation

@aslushnikov

Copy link
Copy Markdown
Contributor

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".

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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/uploadReport.ts
Comment on lines +285 to +288
const repositoryMismatchReason = oidcRepositoryMismatchReason(errorMessage);
if (repositoryMismatchReason !== undefined) {
logger.warn(`[flakiness.io] ⚠ Skipping upload: ${repositoryMismatchReason}`);
return { status: 'skipped', reason: repositoryMismatchReason };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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