Skip to content

Add Dependabot Bazel sync automation with manual backfill for existing PRs#4780

Draft
Copilot wants to merge 4 commits into
masterfrom
copilot/resync-bazel-dependencies
Draft

Add Dependabot Bazel sync automation with manual backfill for existing PRs#4780
Copilot wants to merge 4 commits into
masterfrom
copilot/resync-bazel-dependencies

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

Dependabot PRs that update root pom.xml were failing Bazel sync checks because only Maven files were updated. This change adds automation to keep Bazel dependency artifacts aligned both for new Dependabot PR updates and for already-open Dependabot PRs.

  • Per-PR Dependabot sync (existing/new updates)

    • Keeps dependabot-sync-bazel.yml focused on pull_request_target events for Dependabot PRs targeting master / master-java8 with root pom.xml changes.
    • Runs Bazel dependency regeneration and pushes updated MODULE.bazel / maven_install.json back to the Dependabot branch when needed.
  • Manual backfill for open Dependabot PRs

    • Adds dependabot-sync-bazel-backfill.yml (workflow_dispatch) to process currently open Dependabot PRs in bulk.
    • Enumerates open PRs (with pagination), filters to Dependabot-owned branches and root pom.xml changes, then applies the same sync + repin flow and pushes updates per PR branch.
  • Safety and scope controls

    • Restricts processing to same-repo Dependabot branches and supported base branches.
    • Uses a reusable temporary local branch during iteration to avoid branch accumulation while processing multiple PRs.
on:
  workflow_dispatch:
    inputs:
      backfill_open_prs:
        type: boolean
        default: false

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 21, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Copilot
Once this PR has been reviewed and has the lgtm label, please ask for approval from brendandburns. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from yue9944882 May 21, 2026 22:58
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 21, 2026
Copilot AI changed the title Add workflow to auto-sync Bazel files on Dependabot pom updates Auto-sync Bazel dependency artifacts on Dependabot pom.xml PRs May 21, 2026
@brendandburns
Copy link
Copy Markdown
Contributor

I don't think that we need Java or Bazel installed for this workflow, right?

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 21, 2026
Copilot AI changed the title Auto-sync Bazel dependency artifacts on Dependabot pom.xml PRs Add Dependabot Bazel sync automation with manual backfill for existing PRs May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants