Skip to content

Commit de9eecc

Browse files
ai: apply changes for #879 (1 review thread)
Addresses: - #3641887238 at .github/workflows/trigger-integration-tests.yml:511 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
1 parent ea0f2a8 commit de9eecc

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

.github/workflows/trigger-integration-tests.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ jobs:
469469
labels: linux-ubuntu-latest
470470
permissions:
471471
contents: read
472-
pull-requests: read
472+
pull-requests: write
473473
steps:
474474
- name: Check if driver source changed
475475
id: changed
@@ -515,3 +515,39 @@ jobs:
515515
repository: databricks/databricks-driver-test
516516
event-type: coverage-fanout
517517
client-payload: '{"reference_repo": "${{ github.repository }}", "pr_number": "${{ github.event.pull_request.number }}", "pr_url": "${{ github.event.pull_request.html_url }}"}'
518+
519+
- name: Signal dispatch failure
520+
# Best-effort fan-out: the PR is already merged, so there is no
521+
# required check to turn red. Without this handler a broken dispatch
522+
# (rotated App secret, App uninstalled, driver-test API error) fails
523+
# the step but surfaces nowhere and the coverage fan-out silently
524+
# never runs. Emit a workflow warning and comment on the merged PR so
525+
# the failure is noticeable. Uses the default token (checks/PR write
526+
# via job permissions), not the App token, since App-token generation
527+
# is itself a likely failure point.
528+
if: failure() && steps.changed.outputs.source == 'true'
529+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
530+
with:
531+
github-token: ${{ github.token }}
532+
script: |
533+
const runUrl =
534+
`${context.serverUrl}/${context.repo.owner}/${context.repo.repo}` +
535+
`/actions/runs/${context.runId}`;
536+
core.warning(
537+
`Failed to dispatch coverage-fanout to databricks-driver-test; ` +
538+
`the multi-language coverage fan-out did not run. See ${runUrl}`
539+
);
540+
try {
541+
await github.rest.issues.createComment({
542+
owner: context.repo.owner,
543+
repo: context.repo.repo,
544+
issue_number: context.payload.pull_request.number,
545+
body:
546+
`⚠️ Failed to dispatch the multi-language coverage fan-out ` +
547+
`to \`databricks-driver-test\` after this PR merged. Coverage ` +
548+
`was not extended for this change. ` +
549+
`[Workflow run](${runUrl})`,
550+
});
551+
} catch (e) {
552+
core.warning(`Could not comment on the merged PR: ${e.message}`);
553+
}

0 commit comments

Comments
 (0)