Skip to content

feat(datasets): manage datasets with the datasets commands and apply - #309

Open
nicolastakashi wants to merge 1 commit into
mainfrom
nicolastakashi/dataset-commands
Open

nicolastakashi wants to merge 1 commit into
mainfrom
nicolastakashi/dataset-commands

Conversation

@nicolastakashi

@nicolastakashi nicolastakashi commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

Users want to manage datasets as code from the CLI and CI, like every other asset.

What

  • New datasets commands: list, get, create, update, delete.
  • apply accepts kind: Dash0Dataset, including --dry-run validation.
  • delete states the 30-day restore window and the telemetry retention in its prompt. --force is idempotent. Deleting default surfaces the server's 400.
  • apply --since deletes a dataset removed from git, like any other kind.
  • dash0-api-client-go bumped to v1.26.0.
  • Datasets use the new document shape (the old one was never released): apiVersion: dash0.com/v1alpha1 with spec.retention, spec.privacy, and spec.processing, and no telemetryFilters. A missing or unknown apiVersion fails before any API call. update --dry-run previews a partial file merged onto the stored dataset, because an omitted field keeps its stored value.
  • Integration tests, roundtrip scripts, docs, skill bundle, changelog.

@nicolastakashi
nicolastakashi force-pushed the nicolastakashi/dataset-commands branch 3 times, most recently from d110410 to 36fb492 Compare October 21, 2026 19:16
@nicolastakashi
nicolastakashi marked this pull request as ready for review October 21, 2026 19:26
@nicolastakashi
nicolastakashi requested a review from a team as a code owner October 21, 2026 19:26
Add `datasets list|get|create|update|delete` (experimental) and support
`kind: Dash0Dataset` in `apply`, including `--dry-run` and `--since`.

- The slug is `spec.slug`, or `dash0.com/id` when absent; it is required.
- `create` and `apply` preflight with a GET: PUT on hit, POST on 404.
  `update` fails with "not found" instead of creating a dataset.
- `spec.permissions` is sent in the create call.
- `delete` and `apply --since` deletions need `--force` in agent mode.
- `apply` applies datasets first; `--since` deletes them last.
- Bump dash0-api-client-go to v1.26.0.
@nicolastakashi
nicolastakashi force-pushed the nicolastakashi/dataset-commands branch from 36fb492 to f72e7e9 Compare October 21, 2026 19:31
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.

1 participant