Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita5234bf

Browse files
authored
chore: fix autoversion script and update experiments/docs to v2.22.1 (#17954)
1 parent53e8e9c commita5234bf

File tree

3 files changed

+95
-74
lines changed

3 files changed

+95
-74
lines changed

‎docs/install/kubernetes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ We support two release channels: mainline and stable - read the
133133
helm install coder coder-v2/coder \
134134
--namespace coder \
135135
--values values.yaml \
136-
--version 2.20.0
136+
--version 2.22.1
137137
```
138138

139139
-**Stable** Coder release:

‎docs/install/releases/feature-stages.md

Lines changed: 58 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,37 @@ If you encounter an issue with any Coder feature, please submit a
2424
Early access features are neither feature-complete nor stable. We do not
2525
recommend using early access features in production deployments.
2626

27-
Coder sometimes releases early access features that are available for use, but are disabled by default.
28-
You shouldn't use early access features in production because they might cause performance or stability issues.
29-
Early access features can be mostly feature-complete, but require further internal testing and remain in the early access stage for at least one month.
27+
Coder sometimes releases early access features that are available for use, but
28+
are disabled by default. You shouldn't use early access features in production
29+
because they might cause performance or stability issues. Early access features
30+
can be mostly feature-complete, but require further internal testing and remain
31+
in the early access stage for at least one month.
3032

31-
Coder may make significant changes or revert features to a feature flag at any time.
33+
Coder may make significant changes or revert features to a feature flag at any
34+
time.
3235

3336
If you plan to activate an early access feature, we suggest that you use a
3437
staging deployment.
3538

3639
<details><summary>To enable early access features:</summary>
3740

38-
Use the[Coder CLI](../../install/cli.md)`--experiments` flag to enable early access features:
41+
Use the[Coder CLI](../../install/cli.md)`--experiments` flag to enable early
42+
access features:
3943

4044
- Enable all early access features:
4145

42-
```shell
43-
coder server --experiments=*
44-
```
46+
```shell
47+
coder server --experiments=*
48+
```
4549

4650
- Enable multiple early access features:
4751

48-
```shell
49-
coder server --experiments=feature1,feature2
50-
```
52+
```shell
53+
coder server --experiments=feature1,feature2
54+
```
5155

52-
You can also use the`CODER_EXPERIMENTS`[environment variable](../../admin/setup/index.md).
56+
You can also use the`CODER_EXPERIMENTS`
57+
[environment variable](../../admin/setup/index.md).
5358

5459
You can opt-out of a feature after you've enabled it.
5560

@@ -60,49 +65,68 @@ You can opt-out of a feature after you've enabled it.
6065
<!-- Code generated by scripts/release/docs_update_experiments.sh. DO NOT EDIT.-->
6166
<!-- BEGIN: available-experimental-features-->
6267

63-
Currently no experimental features are available in the latest mainline or stable release.
68+
| Feature| Description| Available in|
69+
|-----------------------|----------------------------------------------|--------------|
70+
|`workspace-prebuilds`| Enables the new workspace prebuilds feature.| mainline|
6471

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

6774
##Beta
6875

6976
-**Stable**: No
7077
-**Production-ready**: Not fully
71-
-**Support**: Documentation,[Discord](https://discord.gg/coder), and[GitHub issues](https://github.com/coder/coder/issues)
78+
-**Support**: Documentation,[Discord](https://discord.gg/coder), and
79+
[GitHub issues](https://github.com/coder/coder/issues)
7280

7381
Beta features are open to the public and are tagged with a`Beta` label.
7482

75-
They’re in active development and subject to minor changes.
76-
They might containminor bugs, but are generally ready for use.
83+
They’re in active development and subject to minor changes. They might contain
84+
minor bugs, but are generally ready for use.
7785

78-
Beta features are often ready for general availability within two-three releases.
79-
You should test beta features in staging environments.
80-
You can use beta features in production, but should set expectations and inform users that some features may be incomplete.
86+
Beta features are often ready for general availability within two-three
87+
releases. You should test beta features in staging environments. You can use
88+
beta features in production, but should set expectations and inform users that
89+
some features may be incomplete.
8190

82-
We keep documentation about beta features up-to-date with the latest information, including planned features, limitations, and workarounds.
83-
If you encounter an issue, please contact your[Coder account team](https://coder.com/contact), reach out on[Discord](https://discord.gg/coder), or create a[GitHub issues](https://github.com/coder/coder/issues) if there isn't one already.
84-
While we will do our best to provide support with beta features, most issues will be escalated to the product team.
85-
Beta features are not covered within service-level agreements (SLA).
91+
We keep documentation about beta features up-to-date with the latest
92+
information, including planned features, limitations, and workarounds. If you
93+
encounter an issue, please contact your
94+
[Coder account team](https://coder.com/contact), reach out on
95+
[Discord](https://discord.gg/coder), or create a
96+
[GitHub issues](https://github.com/coder/coder/issues) if there isn't one
97+
already. While we will do our best to provide support with beta features, most
98+
issues will be escalated to the product team. Beta features are not covered
99+
within service-level agreements (SLA).
86100

87-
Most beta features are enabled by default.
88-
Beta features are announced through the[Coder Changelog](https://coder.com/changelog), and more information is available in the documentation.
101+
Most beta features are enabled by default. Beta features are announced through
102+
the[Coder Changelog](https://coder.com/changelog), and more information is
103+
available in the documentation.
89104

90105
##General Availability (GA)
91106

92107
-**Stable**: Yes
93108
-**Production-ready**: Yes
94109
-**Support**: Yes,[based on license](https://coder.com/pricing).
95110

96-
All features that are not explicitly tagged as`Early access` or`Beta` are considered generally available (GA).
97-
They have been tested, are stable, and are enabled by default.
111+
All features that are not explicitly tagged as`Early access` or`Beta` are
112+
considered generally available (GA). They have been tested, are stable, and are
113+
enabled by default.
98114

99-
If your Coder license includes an SLA, please consult it for an outline of specific expectations.
115+
If your Coder license includes an SLA, please consult it for an outline of
116+
specific expectations.
100117

101-
For support, consult our knowledgeable and growing community on[Discord](https://discord.gg/coder), or create a[GitHub issue](https://github.com/coder/coder/issues) if one doesn't exist already.
102-
Customers with a valid Coder license, can submit a support request or contact your[account team](https://coder.com/contact).
118+
For support, consult our knowledgeable and growing community on
119+
[Discord](https://discord.gg/coder), or create a
120+
[GitHub issue](https://github.com/coder/coder/issues) if one doesn't exist
121+
already. Customers with a valid Coder license, can submit a support request or
122+
contact your[account team](https://coder.com/contact).
103123

104-
We intend[Coder documentation](../../README.md) to be the[single source of truth](https://en.wikipedia.org/wiki/Single_source_of_truth) and all features should have some form of complete documentation that outlines how to use or implement a feature.
105-
If you discover an error or if you have a suggestion that could improve the documentation, please[submit a GitHub issue](https://github.com/coder/internal/issues/new?title=request%28docs%29%3A+request+title+here&labels=["customer-feedback","docs"]&body=please+enter+your+request+here).
124+
We intend[Coder documentation](../../README.md) to be the
125+
[single source of truth](https://en.wikipedia.org/wiki/Single_source_of_truth)
126+
and all features should have some form of complete documentation that outlines
127+
how to use or implement a feature. If you discover an error or if you have a
128+
suggestion that could improve the documentation, please
129+
[submit a GitHub issue](https://github.com/coder/internal/issues/new?title=request%28docs%29%3A+request+title+here&labels=["customer-feedback","docs"]&body=please+enter+your+request+here).
106130

107-
Some GA features can be disabled for air-gapped deployments.
108-
Consult thefeature's documentation or submit a support ticket for assistance.
131+
Some GA features can be disabled for air-gapped deployments. Consult the
132+
feature's documentation or submit a support ticket for assistance.

‎scripts/release/docs_update_experiments.sh

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,33 @@ set -euo pipefail
1212
source"$(dirname"${BASH_SOURCE[0]}")/../lib.sh"
1313
cdroot
1414

15+
# Ensure GITHUB_TOKEN is available
16+
if [[-z"${GITHUB_TOKEN:-}" ]];then
17+
if GITHUB_TOKEN="$(gh auth token2>/dev/null)";then
18+
export GITHUB_TOKEN
19+
else
20+
echo"Error: GitHub token not found. Please run 'gh auth login' to authenticate.">&2
21+
exit 1
22+
fi
23+
fi
24+
1525
if isdarwin;then
1626
dependencies gsed gawk
1727
sed() { gsed"$@"; }
1828
awk() { gawk"$@"; }
1929
fi
2030

21-
# From install.sh
2231
echo_latest_stable_version() {
23-
#https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
32+
#Extract redirect URL to determine latest stable tag
2433
version="$(curl -fsSLI -o /dev/null -w"%{url_effective}" https://github.com/coder/coder/releases/latest)"
2534
version="${version#https://github.com/coder/coder/releases/tag/v}"
2635
echo"v${version}"
2736
}
2837

2938
echo_latest_mainline_version() {
30-
# Fetch the releases from the GitHub API, sort by version number,
31-
# and take the first result. Note that we're sorting by space-
32-
# separated numbers and without utilizing the sort -V flag for the
33-
# best compatibility.
39+
# Use GitHub API to get latest release version, authenticated
3440
echo"v$(
35-
curl -fsSL https://api.github.com/repos/coder/coder/releases|
41+
curl -fsSL-H"Authorization: token${GITHUB_TOKEN}"https://api.github.com/repos/coder/coder/releases|
3642
awk -F'"''/"tag_name"/ {print $4}'|
3743
tr -d v|
3844
tr.''|
@@ -42,7 +48,6 @@ echo_latest_mainline_version() {
4248
)"
4349
}
4450

45-
# For testing or including experiments from `main`.
4651
echo_latest_main_version() {
4752
echo origin/main
4853
}
@@ -59,33 +64,29 @@ sparse_clone_codersdk() {
5964
}
6065

6166
parse_all_experiments() {
62-
# Go doc doesn't include inline array comments, so this parsing should be
63-
# good enough. We remove all whitespaces so that we can extract a plain
64-
# string that looks like {}, {ExpA}, or {ExpA,ExpB,}.
65-
#
66-
# Example: ExperimentsAll=Experiments{ExperimentNotifications,ExperimentAutoFillParameters,}
67-
go doc -all -C"${dir}" ./codersdk ExperimentsAll|
67+
# Try ExperimentsSafe first, then fall back to ExperimentsAll if needed
68+
experiments_var="ExperimentsSafe"
69+
experiments_output=$(go doc -all -C"${dir}" ./codersdk"${experiments_var}"2>/dev/null|| true)
70+
71+
if [[-z"${experiments_output}" ]];then
72+
# Fall back to ExperimentsAll if ExperimentsSafe is not found
73+
experiments_var="ExperimentsAll"
74+
experiments_output=$(go doc -all -C"${dir}" ./codersdk"${experiments_var}"2>/dev/null|| true)
75+
76+
if [[-z"${experiments_output}" ]];then
77+
log"Warning: Neither ExperimentsSafe nor ExperimentsAll found in${dir}"
78+
return
79+
fi
80+
fi
81+
82+
echo"${experiments_output}"|
6883
tr -d$'\n\t'|
69-
grep -E -o'ExperimentsAll=Experiments\{[^}]*\}'|
84+
grep -E -o"${experiments_var}=Experiments\{[^}]*\}"|
7085
sed -e's/.*{\(.*\)}.*/\1/'|
7186
tr',''\n'
7287
}
7388

7489
parse_experiments() {
75-
# Extracts the experiment name and description from the Go doc output.
76-
# The output is in the format:
77-
#
78-
# ||Add new experiments here!
79-
# ExperimentExample|example|This isn't used for anything.
80-
# ExperimentAutoFillParameters|auto-fill-parameters|This should not be taken out of experiments until we have redesigned the feature.
81-
# ExperimentMultiOrganization|multi-organization|Requires organization context for interactions, default org is assumed.
82-
# ExperimentCustomRoles|custom-roles|Allows creating runtime custom roles.
83-
# ExperimentNotifications|notifications|Sends notifications via SMTP and webhooks following certain events.
84-
# ExperimentWorkspaceUsage|workspace-usage|Enables the new workspace usage tracking.
85-
# ||ExperimentTest is an experiment with
86-
# ||a preceding multi line comment!?
87-
# ExperimentTest|test|
88-
#
8990
go doc -all -C"${1}" ./codersdk Experiment|
9091
sed \
9192
-e's/\t\(Experiment[^ ]*\)\ \ *Experiment = "\([^"]*\)"\(.*\/\/ \(.*\)\)\?/\1|\2|\4/' \
@@ -104,6 +105,11 @@ for channel in mainline stable; do
104105
log"Fetching experiments from${channel}"
105106

106107
tag=$(echo_latest_"${channel}"_version)
108+
if [[-z"${tag}"||"${tag}"=="v" ]];then
109+
echo"Error: Failed to retrieve valid${channel} version tag. Check your GitHub token or rate limit.">&2
110+
exit 1
111+
fi
112+
107113
dir="$(sparse_clone_codersdk"${workdir}""${channel}""${tag}")"
108114

109115
declare -A all_experiments=()
@@ -115,14 +121,12 @@ for channel in mainline stable; do
115121
done
116122
fi
117123

118-
# Track preceding/multiline comments.
119124
maybe_desc=
120125

121126
whileread -r line;do
122127
line=${line//$'\n'/}
123128
readarray -d'|' -t parts<<<"$line"
124129

125-
# Missing var/key, this is a comment or description.
126130
if [[-z${parts[0]} ]];then
127131
maybe_desc+="${parts[2]//$'\n'/ }"
128132
continue
@@ -133,24 +137,20 @@ for channel in mainline stable; do
133137
desc="${parts[2]}"
134138
desc=${desc//$'\n'/}
135139

136-
# If desc (trailing comment) is empty, use the preceding/multiline comment.
137140
if [[-z"${desc}" ]];then
138141
desc="${maybe_desc% }"
139142
fi
140143
maybe_desc=
141144

142-
# Skip experiments not listed in ExperimentsAll.
143145
if [[! -v all_experiments[$var] ]];then
144-
log"Skipping${var}, not listed inExperimentsAll"
146+
log"Skipping${var}, not listed inexperiments list"
145147
continue
146148
fi
147149

148-
# Don't overwrite desc, prefer first come, first served (i.e. mainline > stable).
149150
if [[! -v experiments[$key] ]];then
150151
experiments[$key]="$desc"
151152
fi
152153

153-
# Track the release channels where the experiment is available.
154154
experiment_tags[$key]+="${channel},"
155155
done<<(parse_experiments"${dir}")
156156
done
@@ -170,14 +170,11 @@ table="$(
170170
done
171171
)"
172172

173-
# Use awk to print everything outside the BEING/END block and insert the
174-
# table in between.
175173
awk \
176174
-v table="${table}" \
177175
'BEGIN{include=1} /BEGIN: available-experimental-features/{print; print table; include=0} /END: available-experimental-features/{include=1} include' \
178176
"${dest}" \
179177
>"${dest}".tmp
180178
mv"${dest}".tmp"${dest}"
181179

182-
# Format the file for a pretty table (target single file for speed).
183180
(cd site&& pnpmexec prettier --cache --write ../"${dest}")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp