Upgrade gradle dependencies only if >=48h old#11293
Conversation
4efc512 to
5d9229e
Compare
5d9229e to
355ced2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 355ced273e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Marking as draft, as I re-review |
| "validate-lockfiles", | ||
| "--baseline-dir", str(baseline_dir), | ||
| "--current-dir", str(current_dir), | ||
| "--metadata-file", str(metadata_file), |
There was a problem hiding this comment.
what are the use case in which the metadata are missing? How updating will look like ? (i.e. manual?)
Maintaining this looks uncomfortable but I'm maybe missing context on this switch
There was a problem hiding this comment.
oh good catch! At some point, I meant to add an "override" option via this metadata file path, for example if the artifact wasn't found on Maven Central, but this is unused now, so I'll remove it... Instead there's an automatic retry to get the artifact to hopefully address the case there is infra flakiness.
There was a problem hiding this comment.
Ah sorry, a correction -- the --metadata-file is still used in these python tests to pass in timestamp values, but it's not used in the actual workflow
|
|
||
| reverted_files = len(violations_by_file) | ||
| emit_outputs({"cutoff_at": format_datetime(cutoff), "reverted_files": reverted_files}, args.github_output) | ||
| print(f"Validated {len(changed)} changed coordinate(s) across {len(changed_by_file)} lockfile(s). {reverted_files} lockfile(s) reverted.") |
There was a problem hiding this comment.
would it be worth listing on the PR what which artifact caused the push back?
What Does This Do
Only upgrade gradle dependencies if they are at least 48 hours old. This PR specifically addresses the “Update Gradle dependencies” workflow. This follows #11215
Motivation
Require a 48-hour cooldown on external dependencies to reduce the risk of zero-day vulnerabilities.
Additional Notes
This PR was largely written by AI with my guidance on requirements and testing, followed by my review and tweaks for readability.
I added python tests for the scripts, but the actual changes need to land on
masterbefore the workflow can be tested because the workflow depends on anocto-ststoken that is only scoped to master.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.