Skip to content

chore(spec): re-vendor upstream OpenAPI (sha 59ef7c790426) - #233

Merged
Severin Neumann (svrnm) merged 1 commit into
mainfrom
chore/spec-revendor-2702ae33
Nov 11, 2026
Merged

Severin Neumann (svrnm) merged 1 commit into
mainfrom
chore/spec-revendor-2702ae33

Conversation

@svrnm

Copy link
Copy Markdown
Contributor

Closes #221.

Upstream changed again after spec-sync filed the issue (2702ae33… became 59ef7c79…), so this vendors the current spec, downloaded whole.

  • Re-applied the three NOTE(bronto-cli vendor patch) x-go-name patches (ResendUserInvitationResponse, PollLiveTailResponse, InitLiveTailResponse) unchanged
  • make spec-baseline updates api/vendored.sha256; api/upstream.sha256 is now 59ef7c79… vendored-2026-11-11
  • go generate ./internal/api adds the new URL templates. No path was removed.
  • go test ./... and make check-spec pass

CLI impact

No command changes in this PR. Follow-ups:

  • New endpoints with no command (reachable through 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/export
  • Breaking change: Action.type no longer required. monitors check still rejects an action that has no type. Filed as monitors check: published spec no longer requires actions[].type #231.
  • Breaking change: MetricQuery.from_expr lost maxLength: 255. dashboards validate/apply still enforce 255 on the client. Filed as dashboards: published spec dropped the 255-char from_expr limit #232.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings November 11, 2026 06:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

Upstream moved on after spec-sync filed #221 (2702ae33 -> 59ef7c79), so
this vendors the current spec, downloaded whole, with the three
x-go-name vendor patches re-applied unchanged.

Closes #221.

Assisted-By: Claude
@svrnm
Severin Neumann (svrnm) merged commit 3313ebf into main Nov 11, 2026
16 checks passed
@svrnm
Severin Neumann (svrnm) deleted the chore/spec-revendor-2702ae33 branch November 11, 2026 07:01
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

1 active deployment
bronto-it — 94c4658a Deployed Nov 11, 2026 by svrnm via integration #445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upstream OpenAPI spec changed (sha 2702ae33e855)

2 participants