Add API integration to fetch blocked versions at job updates#15123
Merged
kbukum1 merged 5 commits intoMay 22, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR re-introduces the updater-side integration for fetching globally managed “blocked versions” from the Dependabot API at execution time (gated behind the blocked_versions experiment) and injecting them into the job definition before Dependabot::Job construction. It also updates the blocked versions payload field name from version to version-requirement to align with existing ignore condition conventions and the API contract.
Changes:
- Add
ApiClient#fetch_blocked_versionswith defensive parsing/error handling and corresponding specs. - Inject fetched blocked versions into the job definition during
UpdateFilesCommand#jobconstruction (experiment-gated) with specs. - Rename blocked versions entries to use
version-requirementacross job behavior/tests and dry-run helper output.
Show a summary per file
| File | Description |
|---|---|
| updater/lib/dependabot/update_files_command.rb | Deep-copies job definition and injects API-fetched blocked versions when experiment is enabled. |
| updater/lib/dependabot/api_client.rb | Adds API client method to fetch blocked versions (instrumented, defensive). |
| updater/lib/dependabot/service.rb | Delegates fetch_blocked_versions through the service adapter. |
| updater/lib/dependabot/job.rb | Updates blocked versions handling/logging to use version-requirement. |
| updater/spec/dependabot/api_client_spec.rb | Adds test coverage for blocked versions API fetch success/failure/format cases. |
| updater/spec/dependabot/update_files_command_spec.rb | Adds test coverage for experiment-gated fetch + injection behavior. |
| updater/spec/dependabot/job_spec.rb | Updates blocked versions fixtures/expectations to version-requirement. |
| bin/dry-run.rb | Updates blocked versions example/output keys to version-requirement. |
Copilot's findings
- Files reviewed: 7/8 changed files
- Comments generated: 1
9141639 to
acf1505
Compare
70fe6b1 to
4d44fa5
Compare
robaiken
approved these changes
May 22, 2026
4d44fa5 to
631c808
Compare
… in job construction
…and remove redundant parsing method
631c808 to
d0439ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
Add the API client integration that fetches blocked versions from the API and injects them into the job definition at construction time. Blocked versions are globally managed (not per-job configuration), so they need to be fetched fresh at execution time. This ensures the updater always uses the latest blocked versions list.
This PR also renames the blocked versions payload field from
versiontoversion-requirementto align withignore_conditionsconventions and the API contract.Stacks on #14915 which adds the
blocked_versionsattribute to the Job class.Anything you want to highlight for special attention from reviewers?
blocked_versionsexperiment flag — no behavior change without it.Checklist