Skip to content

Match existing group PRs covering a subset of job directories#15548

Open
IanButterworth wants to merge 1 commit into
dependabot:mainfrom
IanButterworth:fix/group-pr-directory-subset-match
Open

Match existing group PRs covering a subset of job directories#15548
IanButterworth wants to merge 1 commit into
dependabot:mainfrom
IanButterworth:fix/group-pr-directory-subset-match

Conversation

@IanButterworth

Copy link
Copy Markdown
Contributor

Fixes #15370

Developed with Claude:


What are you trying to accomplish?

Fix duplicate grouped update PRs for multi-directory configurations.

A grouped PR only records directories that actually had updates, so it can legitimately
cover fewer directories than the job is configured with. The exact set equality introduced
in 43492ac treated such PRs as non-existent on every scheduled run, so a new group PR was
opened each week instead of deferring to the refresh job, and the old PR was never
superseded.

This relaxes the check to match when the PR's directories are a subset of the job's.

Anything you want to highlight for special attention from reviewers?

The subset direction preserves both earlier fixes: a PR in an unrelated directory still
doesn't suppress a new PR (#9430), and a stale PR covering directories outside the job's
scope still doesn't match (43492ac).

How will you know you've accomplished your goal?

Reproduced from the issue: DynamicPPL.jl configures 8 directories, but only 7 had updates,
so the weekly run failed the equality check and opened a duplicate PR
(TuringLang/DynamicPPL.jl#1424 / #1426). Added specs for both the subset-match and
outside-scope cases; all affected spec files, srb tc, and RuboCop pass.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

A grouped update PR only records the directories that actually had
updates, so it can legitimately cover fewer directories than the job
is configured with (e.g. one configured directory had no updatable
dependencies that run).

The exact set equality introduced in 43492ac treated such PRs as
non-existent on every scheduled run, so a brand-new group PR was
opened each time instead of deferring to the refresh job, and the old
PR was never superseded — duplicate PRs accumulated until closed by
hand.

Relax the check to match when the PR's directories are a subset of the
job's directories. This preserves both earlier fixes: a PR in an
unrelated directory still doesn't suppress a new PR (dependabot#9430), and a
stale PR covering directories outside the job's scope still doesn't
match (43492ac).

Fixes dependabot#15370

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

Duplicate PRs for exact same dependency updates without closing old one or using same PR.

1 participant