Skip to content

Add --after to create-environment - #122

Merged
alefcastelo merged 1 commit into
mainfrom
admin-redesign-2-create-after
Dec 2, 2026
Merged

alefcastelo merged 1 commit into
mainfrom
admin-redesign-2-create-after

Conversation

@alefcastelo

@alefcastelo alefcastelo commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

bidirekt create-environment staging --after dev creates the environment right after dev in the broker's configured order. Without the flag it goes at the end, as before.

  • The request gains "after" only when the flag is set: {"environment":"production","after":"staging"}.
  • An unknown --after fails with the broker's message: cannot post environment to broker: environment staging not found.
  • Tests: 579 → 581 (body with the flag, unknown after error). The body without the flag stays covered.

Admin redesign stack (every PR targets main; merge in this order, rebasing each on main after the previous one merges):

  1. Give environments a configured order bidirekt#237 — environments have a configured order
  2. Add --after to create-environment #122 — create-environment --after
  3. Number the pages of every list bidirekt#238 — numbered pager
  4. Lead the menu with Overview bidirekt#239 — menu leads with Overview
  5. Make the check page read like the CLI bidirekt#240 — check page reads like the CLI
  6. Show every participant against every environment on the matrix bidirekt#241 — compatibility matrix
  7. Give participants an overview and redesign their tabs bidirekt#242 — participants
  8. Give environments a list with order and tabs for each one bidirekt#243 — environments
  9. Give the Overview a dashboard and add an Activity page bidirekt#244 — Overview dashboard and Activity
  10. Document the configured environment order and the new web UI site#159 — docs (merge after the broker and CLI releases)

The e2e suite stays on the pinned broker image; --after gets its e2e once a broker release carries the configured order.

🤖 Generated with Claude Code

`bidirekt create-environment production --after staging` places the new
environment right after staging. Without the flag the request is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The create-environment command now accepts an optional --after value and sends it in the create request. Integration tests cover a successful request and a broker error for a missing preceding environment.

Changes: Environment Placement

Layer / File(s) Summary
Add preceding environment to create requests
internal/features/create_environment/create_environment_wire.go, internal/features/create_environment/create_environment_command.go, tests/integration/create_environment_command_test.go
The request body adds an optional after field. The command exposes --after and passes its value in the request. Integration tests check the posted JSON, command output, and handling of a broker error.
Merge Risk: Minimal · up to 06e5b

Adds an optional --after flag to create-environment. Without the flag, requests are unchanged. No actionable merge risk was found.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c0b1f82 and 06e5bcc.

Files selected for processing: 3

  • internal/features/create_environment/create_environment_command.go
  • internal/features/create_environment/create_environment_wire.go
  • tests/integration/create_environment_command_test.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

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