Skip to content

Commit e845140

Browse files
committed
Deprecate, not remove CLI flags
Signed-off-by: Spike Curtis <spike@coder.com>
1 parent d4070d2 commit e845140

13 files changed

+128
-0
lines changed

cli/testdata/coder_server_--help.golden

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,12 @@ updating, and deleting workspace resources.
392392
--provisioner-force-cancel-interval duration, $CODER_PROVISIONER_FORCE_CANCEL_INTERVAL (default: 10m0s)
393393
Time to force cancel provisioning tasks that are stuck.
394394

395+
--provisioner-daemon-poll-interval duration, $CODER_PROVISIONER_DAEMON_POLL_INTERVAL (default: 1s)
396+
Deprecated and ignored.
397+
398+
--provisioner-daemon-poll-jitter duration, $CODER_PROVISIONER_DAEMON_POLL_JITTER (default: 100ms)
399+
Deprecated and ignored.
400+
395401
--provisioner-daemon-psk string, $CODER_PROVISIONER_DAEMON_PSK
396402
Pre-shared key to authenticate external provisioner daemons to Coder
397403
server.

cli/testdata/server-config.yaml.golden

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ provisioning:
348348
# tests.
349349
# (default: false, type: bool)
350350
daemonsEcho: false
351+
# Deprecated and ignored.
352+
# (default: 1s, type: duration)
353+
daemonPollInterval: 1s
354+
# Deprecated and ignored.
355+
# (default: 100ms, type: duration)
356+
daemonPollJitter: 100ms
351357
# Time to force cancel provisioning tasks that are stuck.
352358
# (default: 10m0s, type: duration)
353359
forceCancelInterval: 10m0s

coderd/apidoc/docs.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ type GitAuthConfig struct {
340340
type ProvisionerConfig struct {
341341
Daemons clibase.Int64 `json:"daemons" typescript:",notnull"`
342342
DaemonsEcho clibase.Bool `json:"daemons_echo" typescript:",notnull"`
343+
DaemonPollInterval clibase.Duration `json:"daemon_poll_interval" typescript:",notnull"`
344+
DaemonPollJitter clibase.Duration `json:"daemon_poll_jitter" typescript:",notnull"`
343345
ForceCancelInterval clibase.Duration `json:"force_cancel_interval" typescript:",notnull"`
344346
DaemonPSK clibase.String `json:"daemon_psk" typescript:",notnull"`
345347
}
@@ -1268,6 +1270,26 @@ when required by your organization's security policy.`,
12681270
Group: &deploymentGroupProvisioning,
12691271
YAML: "daemonsEcho",
12701272
},
1273+
{
1274+
Name: "Poll Interval",
1275+
Description: "Deprecated and ignored.",
1276+
Flag: "provisioner-daemon-poll-interval",
1277+
Env: "CODER_PROVISIONER_DAEMON_POLL_INTERVAL",
1278+
Default: time.Second.String(),
1279+
Value: &c.Provisioner.DaemonPollInterval,
1280+
Group: &deploymentGroupProvisioning,
1281+
YAML: "daemonPollInterval",
1282+
},
1283+
{
1284+
Name: "Poll Jitter",
1285+
Description: "Deprecated and ignored.",
1286+
Flag: "provisioner-daemon-poll-jitter",
1287+
Env: "CODER_PROVISIONER_DAEMON_POLL_JITTER",
1288+
Default: (100 * time.Millisecond).String(),
1289+
Value: &c.Provisioner.DaemonPollJitter,
1290+
Group: &deploymentGroupProvisioning,
1291+
YAML: "daemonPollJitter",
1292+
},
12711293
{
12721294
Name: "Force Cancel Interval",
12731295
Description: "Time to force cancel provisioning tasks that are stuck.",

docs/api/general.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/schemas.md

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/cli/provisionerd_start.md

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/cli/server.md

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enterprise/cli/provisionerdaemons.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ func (r *RootCmd) provisionerDaemonStart() *clibase.Cmd {
4545
var (
4646
cacheDir string
4747
rawTags []string
48+
pollInterval time.Duration
49+
pollJitter time.Duration
4850
preSharedKey string
4951
)
5052
client := new(codersdk.Client)
@@ -181,6 +183,20 @@ func (r *RootCmd) provisionerDaemonStart() *clibase.Cmd {
181183
Description: "Tags to filter provisioner jobs by.",
182184
Value: clibase.StringArrayOf(&rawTags),
183185
},
186+
{
187+
Flag: "poll-interval",
188+
Env: "CODER_PROVISIONERD_POLL_INTERVAL",
189+
Default: time.Second.String(),
190+
Description: "Deprecated and ignored.",
191+
Value: clibase.DurationOf(&pollInterval),
192+
},
193+
{
194+
Flag: "poll-jitter",
195+
Env: "CODER_PROVISIONERD_POLL_JITTER",
196+
Description: "Deprecated and ignored.",
197+
Default: (100 * time.Millisecond).String(),
198+
Value: clibase.DurationOf(&pollJitter),
199+
},
184200
{
185201
Flag: "psk",
186202
Env: "CODER_PROVISIONER_DAEMON_PSK",

enterprise/cli/testdata/coder_provisionerd_start_--help.golden

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ OPTIONS:
99
-c, --cache-dir string, $CODER_CACHE_DIRECTORY (default: [cache dir])
1010
Directory to store cached data.
1111

12+
--poll-interval duration, $CODER_PROVISIONERD_POLL_INTERVAL (default: 1s)
13+
Deprecated and ignored.
14+
15+
--poll-jitter duration, $CODER_PROVISIONERD_POLL_JITTER (default: 100ms)
16+
Deprecated and ignored.
17+
1218
--psk string, $CODER_PROVISIONER_DAEMON_PSK
1319
Pre-shared key to authenticate with Coder server.
1420

enterprise/cli/testdata/coder_server_--help.golden

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ updating, and deleting workspace resources.
393393
--provisioner-force-cancel-interval duration, $CODER_PROVISIONER_FORCE_CANCEL_INTERVAL (default: 10m0s)
394394
Time to force cancel provisioning tasks that are stuck.
395395

396+
--provisioner-daemon-poll-interval duration, $CODER_PROVISIONER_DAEMON_POLL_INTERVAL (default: 1s)
397+
Deprecated and ignored.
398+
399+
--provisioner-daemon-poll-jitter duration, $CODER_PROVISIONER_DAEMON_POLL_JITTER (default: 100ms)
400+
Deprecated and ignored.
401+
396402
--provisioner-daemon-psk string, $CODER_PROVISIONER_DAEMON_PSK
397403
Pre-shared key to authenticate external provisioner daemons to Coder
398404
server.

site/src/api/typesGenerated.ts

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)