Repository navigation
chore(spec): re-vendor upstream OpenAPI (sha 59ef7c790426) - #233
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the spec-metadata and generated URL-template refresh.
No open issues 🎉
1 file not reviewed
internal/api/urltemplates_gen.go: Generated file
What changed in this PR
Updates spec-tracking metadata and generated URL templates for the upstream OpenAPI refresh to 59ef7c790426, addressing #221. No CLI commands change; validation differences are tracked separately in #231 and #232.
Changes:
- Adds URL templates for newly published export, integration-provider, and SSO endpoints.
- Updates upstream and vendored checksum baselines for the November 11 refresh.
| File | Description |
|---|---|
internal/api/urltemplates_gen.go |
Adds generated URL templates for new API endpoints. |
api/vendored.sha256 |
Records the updated patched-spec checksum. |
api/upstream.sha256 |
Records the current upstream checksum and vendoring date. |
Review effort: Balanced
Severin Neumann (svrnm)
force-pushed
the
chore/spec-revendor-2702ae33
branch
from
November 11, 2026 06:53
541a6d5 to
94c4658
Compare
Severin Neumann (svrnm)
added a commit
that referenced
this pull request
Nov 11, 2026
Completes the remaining half of #189: ad-hoc `POST /timeseries/search`. The per-metric half (`GET /timeseries/{id}`) shipped in #205. Nothing from the issue is left, so: Closes #189 ## Command ```sh bronto metrics query --select 'p95(Span:duration_nano)' -d .traces/checkout-service \ --where "Span:kind = 'SPAN_KIND_SERVER'" --group-by Span:name --since 1h bronto metrics query --select duration_ms --agg max -d prod/checkout-service bronto metrics query --input body.json # {"queries": [...], "formulas": [...]} ``` - **Why `metrics query`:** it sits next to `metrics definitions query` and `metrics top-keys`, and it runs the same kind of query unsaved. Its flags are the fields one manifest/definition query holds (`--select`, `-d`/`--from-expr`, `--where`, `--group-by`, `--agg`), with the names `search` already uses. `--input` takes a full body for several queries or formulas. That is the same `queries`/`formulas` a metric definition holds, so a definition JSON works as-is. - **Reused code, not new machinery:** - The flags fill a `manQuery`, and `manQuery.resolve` (the code dashboard manifests use) builds the API query: the dataset becomes `from_expr`, and the aggregation defaults from the select. - The time flags are `timeseriesFlags`, and the output goes through `printTimeseries`. - Formula range values come from `queryDefinition`'s one-slice logic, which now sits in a shared `querySeries` behind a fetch func. - `printTimeseries` takes the window string and a "what to check" hint, so the all-zero warning doesn't point ad-hoc users at `definitions get`. - **Precedence with `--input`:** time flags you set override the body's `time_range`/`num_of_slices`/`limit`, and the body's values beat the flag defaults. This is the same rule as `search --saved`. - **Errors teach the fix** (`usage_invalid_flags`, exit 2), for a missing `--select`, a missing dataset, `-d` together with `--from-expr`, a bare field without `--agg`, an unknown `--agg`, or more than 5 group keys. Each error names the flag that fixes it. Combining `--input` with the query flags gives `usage_conflicting_flags`, and an `--input` body with no queries gives `usage_invalid_body`. - **`--dry-run`:** the query still runs under `--dry-run`, as in `dashboards validate --live`, because the POST saves nothing. ## Spec / #233 #233 re-vendors the spec. For this endpoint it adds only error-response examples, and `MetricQuery.from_expr` loses its `maxLength: 255`. `SearchTimeseries`, the request body and the 200 response are unchanged, so this PR builds on `main`, not on `chore/spec-revendor-2702ae33`. ## Tests - Unit tests (`internal/cli/metricdefs_test.go`, fake server via `runResource`): - The exact request body built from the flags. - `--input` precedence and the formula range-value second call. - Every usage error, with no request made. - Inventories updated: endpoint probe, `/logs` and `/timeseries/search` mappings, and the telemetry class for `--agg`. - `go test ./...` passes and `make lint` reports 0 issues. - Live: `TestMetricDefinitionsLive` now also runs `metrics query` over the seeded spans once they are visible, and asserts a count of 2. That adds one request to the suite and seeds nothing new. It runs in CI's integration job. ## Docs - A paragraph and examples in the dashboards guide. - A row in the resources guide's command table. - `skill.md`. - The regenerated `metrics.mdx` reference. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This branch was successfully 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.
Closes #221.
Upstream changed again after spec-sync filed the issue (
2702ae33…became59ef7c79…), so this vendors the current spec, downloaded whole.NOTE(bronto-cli vendor patch)x-go-namepatches (ResendUserInvitationResponse, PollLiveTailResponse, InitLiveTailResponse) unchangedmake spec-baselineupdatesapi/vendored.sha256;api/upstream.sha256is now59ef7c79… vendored-2026-11-11go generate ./internal/apiadds the new URL templates. No path was removed.go test ./...andmake check-specpassCLI impact
No command changes in this PR. Follow-ups:
bronto api):GET /dashboards/{id}/export,/monitors/{id}/export,/users/{id}/export,/groups/{id}/export,/integrations/slack/{id}/export,/integrations/webhooks/{id}/export,/integrations/providers(+/{provider_id},/{provider_id}/export),/sso/idps/{idp_name}/export,/sso/mappings/exportAction.typeno longer required.monitors checkstill rejects an action that has no type. Filed as monitors check: published spec no longer requires actions[].type #231.MetricQuery.from_exprlostmaxLength: 255.dashboards validate/applystill enforce 255 on the client. Filed as dashboards: published spec dropped the 255-char from_expr limit #232.🤖 Generated with Claude Code