Skip to content

Add logs saved views commands - #672

Merged
platinummonkey merged 7 commits into
mainfrom
dd/feat/logs-saved-views
Jul 29, 2026
Merged

Add logs saved views commands#672
platinummonkey merged 7 commits into
mainfrom
dd/feat/logs-saved-views

Conversation

@platinummonkey

@platinummonkey platinummonkey commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds pup logs saved-views subgroup for listing, fetching, creating, and deleting Logs saved views.

Motivation

Logs saved views currently have to be created manually in the Datadog UI, which blocks automation workflows for bootstrapping service-specific log views. This addresses issue #488 by adding CLI coverage for that gap while the saved-view schema remains unavailable in the typed Rust SDK.

Changes

  • Adds pup logs saved-views list, get, create --file, and delete dispatch in src/main.rs.
  • Adds raw HTTP helpers in src/commands/logs.rs against the logs saved-view config path.
  • Keeps create schema-flexible by passing the JSON file body through unchanged.
  • Adds command parser and mocked HTTP route tests for the new subgroup.
  • Removes an unnecessary mutable mock server binding reported by CI.
  • Merges the latest origin/main into the branch to clear any base-branch conflicts.
  • Updates docs/COMMANDS.md with the saved views command surface.

Additional Notes

The saved views endpoint is implemented as an experimental raw API path because the current typed Datadog Rust client does not expose saved-view models. create --file expects the endpoint-native JSON request body.

Testing

  • RUSTUP_TOOLCHAIN=stable cargo fmt --check
  • Conflict-marker scan found no Git conflict markers
  • RUSTUP_TOOLCHAIN=stable cargo test saved_views --offline could not compile because the pinned datadog-api-client git dependency is not cached in the sandbox.
  • Previous online RUSTUP_TOOLCHAIN=stable cargo test saved_views also could not run because the sandbox received 403 errors fetching the pinned SDK dependency.
  • CI reported Variable does not need to be mutable in src/commands/logs.rs:857:13; this follow-up removes that mut.

Checklist

  • The code change follows the project conventions (see CONTRIBUTING.md)
  • Tests have been added/updated (if applicable)
  • Documentation has been updated (if applicable)
  • All CI checks pass
  • Code coverage is maintained or improved

Related Issues

Closes #488


PR by Bits - View session in Datadog

Comment @DataDog to request changes

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jul 23, 2026

Copy link
Copy Markdown

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

@datadog-datadog-prod-us1-2

Copy link
Copy Markdown

I can only run on private repositories.

@datadog-prod-us1-3

This comment has been minimized.

platinummonkey and others added 2 commits July 27, 2026 15:00
@platinummonkey
platinummonkey marked this pull request as ready for review July 28, 2026 14:30
@platinummonkey
platinummonkey requested a review from a team as a code owner July 28, 2026 14:30
@platinummonkey
platinummonkey marked this pull request as draft July 28, 2026 14:41
@platinummonkey
platinummonkey marked this pull request as ready for review July 28, 2026 17:25
@platinummonkey
platinummonkey merged commit 844c484 into main Jul 29, 2026
6 checks passed
@platinummonkey
platinummonkey deleted the dd/feat/logs-saved-views branch July 29, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add pup logs saved-views (list/get/create/delete)

3 participants