Skip to content

Add top-level Deployment docs page#684

Merged
phinze merged 3 commits intomainfrom
phinze/mir-725-add-a-top-level-deployment-docs-page
Mar 19, 2026
Merged

Add top-level Deployment docs page#684
phinze merged 3 commits intomainfrom
phinze/mir-725-add-a-top-level-deployment-docs-page

Conversation

@phinze
Copy link
Copy Markdown
Contributor

@phinze phinze commented Mar 17, 2026

Deployment is the core thing Miren does, but we didn't have a dedicated docs page for it. This came up while writing the changelog — we wanted to link "first-class rollbacks" somewhere and realized there was nothing to link to.

This adds a Deployment page as the first item under Features, covering the full deploy lifecycle: how miren deploy works (upload → server-side detection → build → activate), build detection and --analyze, deploy-time env vars, --version redeploys, miren rollback, miren app history, cancellation, and git provenance tracking.

We went through a few rounds of trimming to keep it focused on what users actually need — implementation details like deployment phases, upload caching internals, and the entity system are left out in favor of the user-facing workflow.

Closes MIR-725

Deployment is the core Miren workflow but had no dedicated docs page.
Add one as the first item under Features, covering the full lifecycle:
deploying, build detection, deploy-time env vars, redeploying existing
versions, rollback, history, cancellation, and git provenance.
@phinze phinze requested a review from a team as a code owner March 17, 2026 15:21
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ac41eb69-1fd4-4a06-942f-a67b72e26536

📥 Commits

Reviewing files that changed from the base of the PR and between 00a2cf9 and 2408dcf.

📒 Files selected for processing (1)
  • docs/docs/deployment.md
✅ Files skipped from review due to trivial changes (1)
  • docs/docs/deployment.md

📝 Walkthrough

Walkthrough

Adds a new documentation page docs/docs/deployment.md that describes the miren deploy workflow end-to-end: uploading (with incremental transfers), server-side language/framework/service detection and container build (or using a user Dockerfile), activation, and version tracking (ID, status, originating git commit/branch/author/dirty state). Documents project-dir defaults and .miren/app.toml, -d for alternate directories, interactive cluster confirmation and --force/CI behavior, --analyze/--explain build inspection, env var flags (-e, -s, @file, secret masking), --version redeploy, miren rollback, history viewing/filtering/JSON, cancellation, and per-app concurrency. Updates docs/sidebars.ts to add the deployment page under Features.

📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/docs/deployment.md`:
- Around line 128-134: The status filter docs are inconsistent with the server
validation (servers/deployment/server.go) which accepts six values; update the
filter description near the "Status filter" section (around the current
three-value list) to either enumerate all six supported statuses with their
icons — active (✓), succeeded (✓), failed (✗), rolled_back (↩), in progress (⟳),
cancelled (⊘) — or explicitly state that only a subset is exposed and which
ones; ensure the language matches the legend above and mentions the exact status
tokens (active, succeeded, failed, rolled_back, in progress, cancelled) so the
docs align with the server validation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0675d40c-5e84-4637-9408-769eba7d8fa5

📥 Commits

Reviewing files that changed from the base of the PR and between b9072fa and 63a8c5a.

📒 Files selected for processing (2)
  • docs/docs/deployment.md
  • docs/sidebars.ts

Comment on lines +128 to +134
Status icons:
- **✓** — active (currently running) or succeeded
- **✗** — failed
- **↩** — rolled back
- **⟳** — in progress
- **⊘** — cancelled

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify which status values are actually accepted by `miren app history --status`
# Expected: find enum/validation/help text that defines canonical allowed values.
rg -nP -C3 --glob '!docs/**' -- '--status|rolled_back|succeeded|in_progress|cancelled|active|failed'

Repository: mirendev/runtime

Length of output: 50374


🏁 Script executed:

cd docs/docs && cat -n deployment.md | sed -n '125,145p'

Repository: mirendev/runtime

Length of output: 890


🏁 Script executed:

# Search for the CLI implementation of the status filter in the app history command
# Look for status enum/validation definitions
rg -n 'app.*history|history.*status' --glob '!docs/**' -t go | head -20

Repository: mirendev/runtime

Length of output: 717


🏁 Script executed:

# Search more broadly for status-related constants or enums
rg -n 'active|rolled_back|in_progress|succeeded' --glob '!docs/**' -t go | grep -i 'const\|enum\|status' | head -30

Repository: mirendev/runtime

Length of output: 2701


🏁 Script executed:

# Find the AppHistory command implementation
rg -n 'AppHistory|func.*History' cli/commands/app_*.go -A 20 | head -50

Repository: mirendev/runtime

Length of output: 3659


🏁 Script executed:

# Look for status validation or filter implementation in the app history command
find cli -name '*.go' -exec grep -l 'app.*history\|history.*status' {} \;

Repository: mirendev/runtime

Length of output: 142


🏁 Script executed:

# Check the app_status.go file more thoroughly for status filter handling
cat -n cli/commands/app_status.go | head -100

Repository: mirendev/runtime

Length of output: 3948


🏁 Script executed:

# Search for deployment status enum/constants
find . -name '*.go' -path '*/deployment*' ! -path './docs/**' | xargs grep -l 'status.*active\|status.*failed\|rolled_back' | head -10

Repository: mirendev/runtime

Length of output: 126


🏁 Script executed:

# Look for deployment status type definitions
rg -n 'type.*Status|const.*Status' --glob '!docs/**' -t go | grep -i deploy | head -20

Repository: mirendev/runtime

Length of output: 1000


🏁 Script executed:

# Check proto definitions for deployment status
find . -name '*.proto' | xargs grep -l 'deployment\|status' 2>/dev/null | head -5

Repository: mirendev/runtime

Length of output: 42


🏁 Script executed:

# Check the deployment server for status handling and validation
rg -n 'active|failed|rolled_back|succeeded|in_progress|cancelled' servers/deployment/server.go -C 2 | head -80

Repository: mirendev/runtime

Length of output: 2891


🏁 Script executed:

# Look at the test file to see which statuses are tested
rg -n '"active"|"failed"|"rolled_back"|"succeeded"|"in_progress"|"cancelled"' servers/deployment/server_test.go | head -30

Repository: mirendev/runtime

Length of output: 1528


🏁 Script executed:

# Search for status string literals in deployment code more carefully
rg -n 'Status.*=.*"' servers/deployment/ --glob '*.go' | grep -E '(active|failed|succeeded|rolled_back|in_progress|cancelled)'

Repository: mirendev/runtime

Length of output: 1823


🏁 Script executed:

# Check how status filter is used in ListDeployments
rg -n 'ListDeployments|listDeploymentsInternal' servers/deployment/server.go -A 10 | head -60

Repository: mirendev/runtime

Length of output: 2096


🏁 Script executed:

# Look for where the status filter parameter is validated or used
rg -n 'args\.Status|status filter' servers/deployment/server.go -B 2 -A 5

Repository: mirendev/runtime

Length of output: 645


🏁 Script executed:

# Check if the CLI does any validation on the status flag before sending to server
rg -n 'opts\.Status|status.*validation\|status.*check' cli/commands/app_history.go -B 3 -A 5

Repository: mirendev/runtime

Length of output: 580


Status filter documentation is incomplete and may mislead users.

The legend (lines 128-133) lists six status values: active, succeeded, failed, rolled_back, in progress, and cancelled. However, the filter documentation (line 141) describes only three: active, failed, rolled_back. The server accepts all six values (verified in servers/deployment/server.go validation). Update the filter description to either list all six supported values or explicitly document that only a subset is intentionally exposed.

Also applies to: 141-143

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docs/deployment.md` around lines 128 - 134, The status filter docs are
inconsistent with the server validation (servers/deployment/server.go) which
accepts six values; update the filter description near the "Status filter"
section (around the current three-value list) to either enumerate all six
supported statuses with their icons — active (✓), succeeded (✓), failed (✗),
rolled_back (↩), in progress (⟳), cancelled (⊘) — or explicitly state that only
a subset is exposed and which ones; ensure the language matches the legend above
and mentions the exact status tokens (active, succeeded, failed, rolled_back, in
progress, cancelled) so the docs align with the server validation.

The flags table for `miren app history` was already drifting from
the actual CLI (CodeRabbit caught a missing status value). Link out
to the generated reference page instead of maintaining a copy.
Copy link
Copy Markdown
Contributor

@evanphx evanphx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor confusion, otherwise looks great!

Evan pointed out that redeploying an existing version doesn't pick
up env var changes — it redeploys the old version as-is. Replaced
with a more accurate description.
@phinze phinze merged commit 2c1cc8e into main Mar 19, 2026
13 checks passed
@phinze phinze deleted the phinze/mir-725-add-a-top-level-deployment-docs-page branch March 19, 2026 13:50
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