Skip to content

docs: update deployment.go feature stages and script to reflect current stages #17975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a8a640f
chore: fall back to `gh auth login` for update_experiments.sh script
bpmct May 20, 2025
b4ed9d2
refactor: update experiment parsing script to use ExperimentsSafe ins…
bpmct May 20, 2025
89144e9
docs: add prebuilds experiment
bpmct May 20, 2025
6bc8796
bump version
bpmct May 20, 2025
ba5ce86
chore: reduce `ignore_changes` suggestion scope (#17947)
EdwardAngert May 20, 2025
83424ed
chore(coderd/rbac): add `Action{Create,Delete}Agent` to `ResourceWork…
EdwardAngert May 20, 2025
068a293
fmt (🤞)
bpmct May 20, 2025
38b093d
fmt
bpmct May 20, 2025
f6e5735
chore: replace MUI icons with Lucide icons - 17 (#17957)
EdwardAngert May 21, 2025
030d77e
docs: explain coder:// link for RDP (#17901)
EdwardAngert May 21, 2025
4b347db
feat: add Claude.md initial draft (#17785)
EdwardAngert May 21, 2025
a707538
chore: ignore 'session shutdown' yamux error in tests (#17964)
EdwardAngert May 21, 2025
1727e42
refactor: update provisioners column copy (#17949)
EdwardAngert May 21, 2025
312eacb
feat: improve transaction safety in CompleteJob function (#17970)
EdwardAngert May 21, 2025
df73eca
fix: show diagnostics if there are no parameters (#17967)
EdwardAngert May 21, 2025
6cc69c0
fix: update textarea to fit content height and set a max height (#17946)
EdwardAngert May 21, 2025
8dfd38b
Add feature stages documentation and update script
EdwardAngert May 20, 2025
e576175
Improve docs script to avoid duplicate end markers
EdwardAngert May 21, 2025
3405d6c
Refactor feature stages to use deployment.go as source of truth
EdwardAngert May 21, 2025
509c2fb
Remove unused workdir variable in docs_update_experiments.sh
May 21, 2025
6028875
Update deployment.go and feature-stages.md for feature stages documen…
May 21, 2025
2f6a564
update documentation script to fix spacing in tables
EdwardAngert May 21, 2025
422586f
make
EdwardAngert May 21, 2025
1011f34
feat: add experimental workspace parameters page for dynamic params (…
EdwardAngert May 21, 2025
44370a7
refactor: show unhealthy status on workspace status indicator (#17956)
EdwardAngert May 21, 2025
dad7d9c
chore: replace MUI Button - 3 (#17955)
EdwardAngert May 21, 2025
a3cbf87
chore: replace MUI icons with Lucide icons - update 18 (#17958)
EdwardAngert May 21, 2025
d9d2263
fix: reduce cost of prebuild failure (#17697)
EdwardAngert May 21, 2025
becaee6
remove GetDocsPath
EdwardAngert May 21, 2025
39a2876
remove GetDocsPath comment
EdwardAngert May 21, 2025
21635c8
all beta and ea
EdwardAngert May 21, 2025
4a21d5a
chore: fix autoversion script and update experiments/docs to v2.22.1 …
EdwardAngert May 22, 2025
cb82ecc
Merge branch 'main' into update-feature-stages
EdwardAngert May 22, 2025
27ea63d
fix: resolve merge conflict in feature-stages docs
EdwardAngert May 22, 2025
144fa64
make
EdwardAngert May 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove GetDocsPath
  • Loading branch information
EdwardAngert committed May 21, 2025
commit becaee61fbdaf83b3d1269be49ef8c2137771dfe
15 changes: 2 additions & 13 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -3374,19 +3374,8 @@ func (e Experiment) GetDescription() string {
}
}

// GetDocsPath returns the path to documentation for the feature
func (e Experiment) GetDocsPath() string {
switch e {
case ExperimentDevContainers:
return "ai-coder/dev-containers.md"
case ExperimentAgenticChat:
return "ai-coder/agents.md"
case ExperimentWorkspacePrebuilds:
return "workspaces/prebuilds.md"
default:
return ""
}
}
// GetDocsPath is removed to simplify the process for adding new features
// Documentation paths are now managed directly in the documentation itself

// ExperimentsSafe should include all experiments that are safe for
// users to opt-in to via --experimental='*'.
Expand Down
32 changes: 9 additions & 23 deletions docs/install/releases/feature-stages.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If you encounter an issue with any Coder feature, please submit a
## Feature stages

| Feature stage | Stable | Production-ready | Support | Description |
|----------------------------------------|--------|------------------|-----------------------|-------------------------------------------------------------------------------------------------------------------------------|
| -------------------------------------- | ------ | ---------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [Early Access](#early-access-features) | No | No | GitHub issues | For staging only. Not feature-complete or stable. Disabled by default. |
| [Beta](#beta) | No | Not fully | Docs, Discord, GitHub | Publicly available. In active development with minor bugs. Suitable for staging; optional for production. Not covered by SLA. |
| [GA](#general-availability-ga) | Yes | Yes | License-based | Stable and tested. Enabled by default. Fully documented. Support based on license. |
Expand Down Expand Up @@ -65,25 +65,12 @@ You can opt-out of a feature after you've enabled it.
<!-- Code generated by scripts/release/docs_update_experiments.sh. DO NOT EDIT. -->
<!-- BEGIN: available-experimental-features -->

| Feature | Description | Available in |
|-----------------------|----------------------------------------------|------------------|
| `dev-containers` | Enables dev containers support. | mainline, stable |
| `agentic-chat` | Enables the new agentic AI chat feature. | mainline, stable |
| `workspace-prebuilds` | Enables the new workspace prebuilds feature. | mainline, stable |
| Feature Flag | Name | Available in |
| ---------------- | -------------------------- | ---------------- |
| `dev-containers` | Dev Containers Integration | mainline, stable |

<!-- END: available-experimental-features -->

### Early access features in documentation

<!-- Code generated by scripts/release/docs_update_experiments.sh. DO NOT EDIT. -->
<!-- BEGIN: early-access-features -->

| Feature | Description | Documentation Path |
|----------------------------|----------------------------|----------------------------|
| Dev Containers Integration | Dev Containers Integration | ai-coder/dev-containers.md |

<!-- END: early-access-features -->

## Beta

- **Stable**: No
Expand Down Expand Up @@ -115,15 +102,14 @@ Most beta features are enabled by default. Beta features are announced through
the [Coder Changelog](https://coder.com/changelog), and more information is
available in the documentation.

### Beta features in documentation
### Beta features

<!-- Code generated by scripts/release/docs_update_experiments.sh. DO NOT EDIT. -->
<!-- BEGIN: beta-features -->

| Feature | Description | Documentation Path |
|---------------------|---------------------|-------------------------|
| AI Coding Agents | AI Coding Agents | ai-coder/agents.md |
| Prebuilt workspaces | Prebuilt workspaces | workspaces/prebuilds.md |
| Feature Flag | Name |
| --------------------- | ------------------- |
| `workspace-prebuilds` | Prebuilt workspaces |
| `agentic-chat` | AI Coding Agents |

<!-- END: beta-features -->

Expand Down
156 changes: 107 additions & 49 deletions scripts/release/docs_update_experiments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,71 @@ if isdarwin; then
awk() { gawk "$@"; }
fi

# Generate the experimental features table
generate_experiments_table() {
# Get ExperimentsSafe entries from deployment.go
echo "| Feature | Description | Available in |"
echo "|---------|-------------|--------------|"

# For now, hardcode the features we know are in ExperimentsSafe
# This is simpler and more reliable than trying to parse the Go code
echo "| \`dev-containers\` | Enables dev containers support. | mainline, stable |"
echo "| \`agentic-chat\` | Enables the new agentic AI chat feature. | mainline, stable |"
echo "| \`workspace-prebuilds\` | Enables the new workspace prebuilds feature. | mainline, stable |"
DEPLOYMENT_GO_FILE="codersdk/deployment.go"

# Extract and parse experiment information from deployment.go
extract_experiment_info() {
# Extract the experiment descriptions, stages, and doc paths
# We'll use Go code to capture this information and print it in a structured format
cat > /tmp/extract_experiment_info.go << 'EOT'
package main

import (
"encoding/json"
"os"

"github.com/coder/coder/v2/codersdk"
)

func main() {
experiments := []struct {
Name string `json:"name"`
Value string `json:"value"`
Description string `json:"description"`
Stage string `json:"stage"`
}{}

// Get experiments from ExperimentsSafe
for _, exp := range codersdk.ExperimentsSafe {
experiments = append(experiments, struct {
Name string `json:"name"`
Value string `json:"value"`
Description string `json:"description"`
Stage string `json:"stage"`
}{
Name: string(exp),
Value: string(exp),
Description: exp.GetDescription(),
Stage: string(exp.GetStage()),
})
}

json.NewEncoder(os.Stdout).Encode(experiments)
}
EOT

# Extract early access features from deployment.go
generate_early_access_table() {
echo "| Feature | Description | Documentation Path |"
echo "|---------|-------------|------------------|"
# Run the Go code to extract the information
cd /home/coder/coder
go run /tmp/extract_experiment_info.go
rm /tmp/extract_experiment_info.go
}

# For now, hardcode the Dev Containers as early access feature
# This is simpler and more reliable than complex grep/awk parsing
echo "| Dev Containers Integration | Dev Containers Integration | ai-coder/dev-containers.md |"
# Generate the experimental features table with flag name
generate_experiments_table() {
echo "| Feature Flag | Name | Available in |"
echo "|-------------|------|--------------|"

# Extract the experiment information
extract_experiment_info | jq -r '.[] | select(.stage=="early access") | "| `\(.value)` | \(.description) | mainline, stable |"'
}

# Extract beta features from deployment.go
generate_beta_table() {
echo "| Feature | Description | Documentation Path |"
echo "|---------|-------------|------------------|"
echo "| Feature Flag | Name |"
echo "|-------------|------|"

# For now, hardcode the beta features
# This is simpler and more reliable than complex grep/awk parsing
echo "| AI Coding Agents | AI Coding Agents | ai-coder/agents.md |"
echo "| Prebuilt workspaces | Prebuilt workspaces | workspaces/prebuilds.md |"
# Extract beta features with flag name only
extract_experiment_info | jq -r '.[] | select(.stage=="beta") | "| `\(.value)` | \(.description) |"'
}

dest=docs/install/releases/feature-stages.md
Expand All @@ -60,49 +93,74 @@ log "Updating feature stages documentation in ${dest}"

# Generate the tables
experiments_table=$(generate_experiments_table)
early_access_table=$(generate_early_access_table)
beta_table=$(generate_beta_table)

# We're using a single-pass awk script that replaces content between markers
# No need for cleanup operations

# Create a single awk script to update all sections without requiring multiple temp files
awk -v exp_table="${experiments_table}" -v ea_table="${early_access_table}" -v beta_table="${beta_table}" '
# State variables to track which section we are in
BEGIN { in_exp = 0; in_ea = 0; in_beta = 0; }
# Create temporary files with the new content
cat > /tmp/ea_content.md << EOT
<!-- BEGIN: available-experimental-features -->

# For experimental features section
/<!-- BEGIN: available-experimental-features -->/ {
print; print exp_table; in_exp = 1; next;
}
/<!-- END: available-experimental-features -->/ {
in_exp = 0; print; next;
}
$(echo "$experiments_table")

<!-- END: available-experimental-features -->
EOT

cat > /tmp/beta_content.md << EOT
<!-- BEGIN: beta-features -->

# For early access features section
/<!-- BEGIN: early-access-features -->/ {
print; print ea_table; in_ea = 1; next;
$(echo "$beta_table")

<!-- END: beta-features -->
EOT

# Use awk to replace the sections
awk '
BEGIN {
ea = 0; beta = 0;
while (getline < "/tmp/ea_content.md") ea_lines[++ea] = $0;
while (getline < "/tmp/beta_content.md") beta_lines[++beta] = $0;
ea = beta = 0;
}
/<!-- END: early-access-features -->/ {
in_ea = 0; print; next;

/<!-- BEGIN: available-experimental-features -->/ {
for (i = 1; i <= length(ea_lines); i++) print ea_lines[i];
ea = 1;
next;
}

# For beta features section

/<!-- END: available-experimental-features -->/ {
ea = 0;
next;
}

/<!-- BEGIN: beta-features -->/ {
print; print beta_table; in_beta = 1; next;
for (i = 1; i <= length(beta_lines); i++) print beta_lines[i];
beta = 1;
next;
}

/<!-- END: beta-features -->/ {
in_beta = 0; print; next;
beta = 0;
next;
}

# Skip lines between markers
(in_exp || in_ea || in_beta) { next; }

(ea || beta) { next; }
# Print all other lines
{ print; }
' "${dest}" >"${dest}.new"
' "${dest}" > "${dest}.new"

# Move the new file into place
mv "${dest}.new" "${dest}"

# Clean up temporary files
rm -f /tmp/ea_content.md /tmp/beta_content.md

# Clean up backup files
rm -f "${dest}.bak"

# Format the file with prettier
(cd site && pnpm exec prettier --cache --write ../"${dest}")
Loading