Skip to content

feat: [FME-19823]: wire --comment/--title into CLI delete for feature_flag, environment, and segment:definition - #265

Merged
puthrayaharness merged 1 commit into
harness:mainfrom
apetruccelli:FME-19823
Oct 2, 2026
Merged

puthrayaharness merged 1 commit into
harness:mainfrom
apetruccelli:FME-19823

Conversation

@apetruccelli

Copy link
Copy Markdown
Contributor

Description

FME-19742 (PR #12932) added comment/title audit fields to the v4 delete endpoints for feature flags, environments, and segment definitions — all as a JSON body (ArchiveUnarchiveRequest / SegmentDefinitionDeleteRequest, no @QueryParam).

  • delete feature_flag: had no --comment/--title flags at all. Added them, sent as a JSON body, omitted (not sent as null/empty) when unset.
  • delete fme_environment: same gap, same fix.
  • delete segment:definition: already had --comment/--title, but wired as query params from before FME-19742. The merged backend now rejects that (400 Missing required title) since it expects a body. Moved to body_params to match.

Verified live end-to-end against qa0: created a feature flag, segment, and segment definition, then deleted each with --comment/--title — confirmed via --debug that the request body carries both fields and the server returns 200. delete fme_environment was confirmed to send the correct body (request accepted past validation) but full delete success wasn't observed in this qa0 project due to an unrelated 409 hasDependents (API tokens scoped to the environment) — a pre-existing backend guard, not caused by this change.

Commands

  • harness delete feature_flag <name> [--comment <text>] [--title <text>]
  • harness delete fme_environment <id> [--comment <text>] [--title <text>]
  • harness delete segment:definition <segment-name> --env <env-id> [--comment <text>] [--title <text>]

Acceptance Criteria

  • --comment/--title added to delete feature_flag, sent as a JSON body
  • --comment/--title added to delete fme_environment, sent as a JSON body
  • delete segment:definition moved from query params to a JSON body for --comment/--title
  • All three omit comment/title from the body entirely when unset (not sent as null/empty)
  • Unit tests for all three commands (comment/title present + omitted-when-unset), go test ./pkg/... passes
  • Verified live against qa0 for feature_flag and segment:definition delete
  • go build ./..., gofmt, and go vet clean

🤖 Generated with Claude Code

…_flag, environment, and segment:definition

FME-19742 (PR #12932) added comment/title audit fields to the v4 delete
endpoints for feature flags, environments, and segment definitions, all as
a JSON body (no @QueryParam). delete feature_flag and delete fme_environment
had no --comment/--title flags at all; delete segment:definition had stale
query-param wiring from before FME-19742 that now 400s against the merged
backend ("Missing required title").

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@puthrayaharness
puthrayaharness merged commit 05f43ad into harness:main Oct 2, 2026
1 check passed
apetruccelli added a commit to apetruccelli/cli that referenced this pull request Oct 2, 2026
Resolve spec/test conflicts: keep main's body-based segment:definition delete
(comment/title, harness#265) and drop the superseded query-param tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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