ci: sync the vendored metric preset list with the Vespa CLI - #1349
Draft
thomasht86 wants to merge 2 commits into
Draft
thomasht86 wants to merge 2 commits into
thomasht86 wants to merge 2 commits into
Conversation
Add a scheduled workflow (Mon-Thu midnight, like release-vespacli.yml, plus workflow_dispatch) that resolves the latest Vespa CLI release tag, fetches client/go/internal/cli/cmd/metric-presets.json at that tag and, if the bytes differ from vespa/resources/metric-presets.json, overwrites the vendored copy, bumps the ref in metric-presets.source.json and opens a PR. The script only uses the standard library and reads repository/path/ref from the source file. Tags before v8.753.16 do not have the file (HTTP 404), which is reported as nothing to do. `lsp-*` tags are skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Follow-up to #1348 (PR 2 of the production tests plan). Based on that branch for now so the resource files exist; GitHub retargets this to
masteronce #1348 merges and its branch is deleted.What
.github/workflows/sync-metric-presets.yml: scheduled Mon-Thu at midnight (same asrelease-vespacli.yml) plusworkflow_dispatch. Runs the sync script and, when the vendored file changed, re-runs the twovendoredunit tests and opens a PR fromsync-metric-presets/<tag>to the default branch. Re-runs for the same tag force-push the branch and reuse an open PR.vespa/utils/sync_metric_presets.py: stdlib-only. Reads repository/path/ref fromvespa/resources/metric-presets.source.json, resolves the latest Vespa CLI release tag (skippinglsp-*, drafts and prereleases), fetches the raw file at that tag, byte-compares withvespa/resources/metric-presets.json. On drift it overwrites the file, bumpsref, prints added/removed preset names and writeschanged/tag/previous_ref/summarytoGITHUB_OUTPUT. A 404 (tags before v8.753.16 have no file) is reported as nothing to do.--tagand--dry-runfor local use.tests/unit/test_sync_metric_presets.py: tag picking, diff/summary and the sync paths (identical, 404, drift, dry run) with mocked fetches.Verified locally
--tag v8.751.13: 404 path, nothing to do.refrewritten in the same format (no diff inmetric-presets.source.json).Notes
GITHUB_TOKENviagh, so the repo setting "Allow GitHub Actions to create and approve pull requests" must be on, and the auto-PR will not trigger the PR CI workflows (standardGITHUB_TOKENlimitation). Switch to a PAT/app token if CI on the auto-PR is wanted.masterwith real drift.🤖 Generated with Claude Code