Add an Azure Pipelines ecosystem - #15678
Open
JamieMagee wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Review details
Comments suppressed due to low confidence (2)
azure_pipelines/lib/dependabot/azure_pipelines/package/package_details_fetcher.rb:237
- The non-404 fallback is still reachable for a malformed
200response:parsereturnsnil(ortag_namecan be absent), and this expression then selectsmaster. That recreates the unreleased-version risk this status handling is intended to prevent. Treat an invalid successful response as an error; only the explicit 404 branch should returnDEFAULT_REF.
parsed = parse(response.body)
tag = parsed.is_a?(Hash) ? parsed["tag_name"] : nil
tag.is_a?(String) && !tag.empty? ? tag : DEFAULT_REF
azure_pipelines/lib/dependabot/azure_pipelines/file_fetcher.rb:137
MAX_CANDIDATESis not enforced while scanning one directory. If a directory contains more than 200 YAML files, this loop appends all of them andpipeline_filessubsequently downloads every candidate, defeating the request bound described above. Stop this loop when the candidate limit is reached.
contents.each do |entry|
next unless entry.type == "file" && entry.name.match?(YAML_PATTERN)
candidates << cleaned_path(dir, entry.name)
end
- Files reviewed: 67/70 changed files
- Comments generated: 2
- Review effort level: Medium
Comment on lines
+58
to
+60
| parsed = begin | ||
| YAML.safe_load(content, aliases: true, permitted_classes: [Date, Time]) | ||
| rescue Psych::Exception => e |
Comment on lines
+257
to
+261
| sig { params(directory: String).returns(T.nilable(Time)) } | ||
| def first_seen_at(directory) | ||
| url = "#{TASKS_API_URL}/commits?path=#{TASKS_DIRECTORY}/#{directory}/task.json&per_page=1" | ||
|
|
||
| response = get(url) |
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?
Updates
task:steps in Azure Pipelines YAML, so a pipeline onMaven@3gets offeredMaven@4.Versions come from
microsoft/azure-pipelines-tasksat its latest release tag. The Azure DevOps API for this needs credentials for a specific organization, which Dependabot doesn't have.Anything you want to highlight for special attention from reviewers?
Precision is the bit worth reviewing. Pipelines pin the major and the agent picks up minors itself. Maven's newest release is
4.276.0, so comparing whole versions would treatMaven@4as stale and open a no-op PR. Candidates get truncated to the pinned precision first.GoTool@0.3.1still updates in full.Directory names aren't authoritative.
ANTV1declares"name": "Ant", sotask.jsondecides the match.One shared file changed:
azure_pipelinesjoinsPACKAGE_MANAGERS_WITH_RELIABLE_DIRECTORIES, otherwise the commits finder triescompare/3...4against a repo whose tags are sprint numbers.Marketplace tasks, GUID references and deprecated majors resolve to nothing on purpose.
How will you know you've accomplished your goal?
93 unit examples, plus 364 in
commonfor the shared change. Rubocop andsrb tcclean.Dry run on
microsoft/SDCMbumpsNuGetToolInstaller@0to@1and correctly no-ops the other four, in 13 requests.DigitalRuby/ExchangeSharpbumpsDownloadBuildArtifacts@0andGitHubRelease@0. Cooldown holds a bump at 10,000 days and lets it through at 30.Against live data:
NodeTool@0(deprecated) andSonarQubePrepare@7(Marketplace) are left alone,Ant@1resolves viaANTV1,GoTool@0.3.1goes to0.275.0,Docker@1to2.Checklist
azure_pipelinesspecs, rubocop,srb tc, and thecommonspecs covering the one shared file. CI covers the rest.)