jerryshao commented on code in PR #14990:
URL: https://github.com/apache/gravitino/pull/14990#discussion_r4595113598


##########
.github/scripts/fork-ci-status.cjs:
##########
@@ -236,7 +306,15 @@ function createService(github, { readWorkflow = sha => 
github.rest.repos.getCont
     const { owner, repo, run } = selected;
     // A manual upstream run uses the workflow definitions at run.head_sha, 
not the PR definitions.
     const jobs = selected.trusted ? trustedJobs : await jobsFor(owner, repo, 
run);
-    const base = selected.trusted ? run.head_sha : !sameDefinitions ? 
pr.base.sha : await testedBase(pr, jobs);
+    const incomplete = incompleteAttempt(run, jobs);
+    if (incomplete) return { ...selected, fork: ordinary?.run, result: 
incomplete };
+    if (selected.trusted && !trustedExact && run.status === 'completed') {
+      return { ...selected, fork: ordinary?.run, result: requiredAction(
+        'Trusted CI has not identified this PR head and base. The publisher 
will check again; ' +
+        'if the gate remains missing, dispatch a new trusted run for the 
current PR.') };
+    }
+    // CI edits change who may attest success, not which base the run actually 
tested.
+    const base = selected.trusted ? run.head_sha : await testedBase(pr, jobs);

Review Comment:
   [P2] If a modified fork workflow names a nonexistent base SHA, the compare 
request returns 404 before `evaluateExecution()` can report a failed job. Every 
refresh then leaves the previous status untouched. Please handle an 
unresolvable comparison as an unaccepted tested base while still reporting 
authoritative job failures, and keep transient API errors retryable. A 
regression beside the changed-CI ancestry test could return 404 and assert that 
`mirror()` returns the current failure rather than rejecting.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to