Repository navigation
bazel/dependency: Update a release date in every metadata file that has it - #5630
Conversation
…as it A dependency was only updated in the first of the `metadata` files that has it. Envoy has `envoy_toolshed` in both of its files, and the dependency JSON that is checked takes the date from the second, so a fix that only reached the first left the check failing. Signed-off-by: Ryan Northey <ryan@synca.io>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change to update release dates across all matching metadata files.
No open issues 🎉
What changed in this PR
Updates release_date_updater so release-date fixes reach every metadata file containing the dependency, addressing stale dates when Envoy merges its main and API dependency metadata.
Changes:
- Update all matching files while counting each dependency once and preserving errors for missing entries.
- Adjust lookup and explicit-date tests to expect both copies to change.
- Align documentation and comments with the multi-file behavior.
| File | Description |
|---|---|
bazel/dependency/test/testdata/release_dates/api.yaml |
Update the fixture comment to describe changes in both files. |
bazel/dependency/test/release_dates_test.sh |
Expect duplicate metadata entries to update in both files. |
bazel/dependency/release-dates.sh |
Continue through all metadata files and count updates per dependency. |
bazel/dependency/README.md |
Document updates across every matching file. |
bazel/dependency/macros.bzl |
Update the metadata argument’s docstring to match the new behavior. |
Review effort: Balanced
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
The dependency bot (`ci/dependency/update.sh`) bumps a `bazel_dep` and leaves the `release_date` of the dependency in `deps.yaml` as it was. The hook that updated it for the WORKSPACE updater went with WORKSPACE (#47217), so every bump since has had a stale date (#49388 needed six fixed by hand), and now that the release dates check is back (#48705) the `deps` precheck of a bump fails on it. This adds `//tools/dependency:release_dates` (`release_date_updater`, envoyproxy/toolshed#5626 and envoyproxy/toolshed#5630), which fixes the dates in `bazel/deps.yaml` and `api/bazel/deps.yaml` with the ones that the checker (`//tools/dependency:check`) looks up: ```console $ bazel run //tools/dependency:release_dates -- gperftools Checking the release dates of: gperftools bazel/deps.yaml: gperftools 2026-03-06 -> 2026-10-21 ``` `deps.update` (the bot's `bazel` task) and `registry` with named modules (its `registry` task) now run it for the modules they update. Only those are looked up, as each is a request to GitHub, a module can be named as the module (`msgpack-c`) where its metadata key differs (`msgpack-cxx`), and a module with no metadata is skipped. It needs the `GITHUB_TOKEN` that the workflow already gives the update. Not covered: `registry` with `all`, where the updated modules are not known at that point; their dates are left to the `deps` check. A dependency with metadata in both files (`envoy_toolshed`) is fixed in both: the check reads the API file's date. Risk Level: Low (dependency tooling only) Testing: The `bazel` task was run from a branch with these changes against a pre-release of the toolshed module ([run 44363626118](https://github.com/envoyproxy/envoy/actions/runs/44363626118), `gperftools msgpack-c`, no PR): the diff it produced has the `gperftools` date fixed alongside the `MODULE.bazel` and lockfile changes. There the step was in `do_ci.sh`; it is now in `deps_update`. The `registry` path, and the fix of a dependency in both files (toolshed 0.5.26.envoy, #49411), have not been run. Docs Changes: `ci/README.md` Release Notes: N/A Signed-off-by: Ryan Northey <ryan@synca.io>
release_date_updater(#5626) only updated a dependency in the first of itsmetadatafiles that has it.Envoy has
envoy_toolshedin bothbazel/deps.yamlandapi/bazel/deps.yaml, and the dependency JSON that the checker reads merges the two with the API file last, so its date is the one that is checked. A fix that only reachedbazel/deps.yamlwould leave the release dates check failing on every toolshed bump, which is the bump that the dependency bot makes most (envoyproxy/envoy#49408).A dependency is now updated in every file that has it. It still counts once in the summary, and one that is in no file is still an error.
Testing: the fixture already had a dependency in both files (to show that it was only updated in one);
//dependency/test:release_dates_testnow expects both to change. Run directly with jq and yq binaries, with shellcheck and yamllint; the Bazel target has only been run by this PR's CI.