Remove use of Dependabot::DependencySnapshot
from the UpdateGraphCommand
#13128
+61
−58
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?
The
UpdateGraphCommand
is slightly simpler than theUpdateFilesCommand
as it doesn't need to do modal operation between version/security updates or PR grouping strategies, it just needs to iterate over N directories and submit a snapshot for each.The
Dependabot::DependencySnapshot
component also early-evaluates the file parser and this is something we'd ideally leave later in the individual graphing operation so we can run additional steps before or after it, or in extreme cases use an alternative parser.This change reflows the
UpdateGraphCommand
and rearranges the responsibilities so that:Dependabot::DependencySnapshot
component is dropped in favour of plucking things out of theEnvironment.job_definition
job.directory
key as a back compat concern our new command will not need to care aboutGithubApi::DependencySubmission
component is now focused exclusively on serialising data into the right JSON for sending to the APIDependabot::DependencyGrapher
now receives the parser to user to get the dependenciesAnything you want to highlight for special attention from reviewers?
Mainly that the new testing surfaces make sense
How will you know you've accomplished your goal?
The overall graphing behaviour is unchanged by this, but we can now handle monorepo jobs where we need to parse a few directories at once.
Checklist