Skip to content

fix(incidents): enable v2.list_incident_attachments unstable op#513

Merged
platinummonkey merged 1 commit into
DataDog:mainfrom
pietrodll:pietrodll/fix-list-incidents-attachments
May 18, 2026
Merged

fix(incidents): enable v2.list_incident_attachments unstable op#513
platinummonkey merged 1 commit into
DataDog:mainfrom
pietrodll:pietrodll/fix-list-incidents-attachments

Conversation

@pietrodll
Copy link
Copy Markdown
Contributor

What does this PR do?

Enables the v2.list_incident_attachments unstable operation in the DD API client so pup incidents attachments list actually works instead of failing with UnstableOperationDisabledError.

Motivation

The command was unusable:

Error: failed to list incident attachments:
UnstableOperationDisabledError(... msg: "Operation 'v2.list_incident_attachments' is not enabled" ...)

Additional Notes

  • Adds the op to UNSTABLE_OPS in src/client.rs and bumps the count-assertion test (166 → 167).
  • Adds tests for the attachments commands (happy + error paths for both attachments_list and attachments_delete) — these paths previously had no coverage.

Checklist

  • The code change follows the project conventions
  • Tests have been added/updated
  • Documentation has been updated (n/a)
  • All CI checks pass
  • Code coverage is maintained or improved

`pup incidents attachments list` was failing with
`UnstableOperationDisabledError` because the underlying DD API client
flag was not set. Add `v2.list_incident_attachments` to `UNSTABLE_OPS`
in `src/client.rs` and bump the count-assertion test.

Also add tests for the attachments commands (happy + error paths for
both `attachments_list` and `attachments_delete`) to lock in behavior.
@pietrodll pietrodll requested a review from a team as a code owner May 18, 2026 08:41
@platinummonkey platinummonkey merged commit 596be2f into DataDog:main May 18, 2026
6 checks passed
@pietrodll pietrodll deleted the pietrodll/fix-list-incidents-attachments branch May 20, 2026 09:16
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.

2 participants