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

feat(cli): warn user if setting autostart on workspace with template-level autostart#20454

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 3 commits intomainfrom15619-warn-autostart
Oct 24, 2025

Conversation

@mtojek
Copy link
Member

Description

This PR adds a warning message in the CLI when a user sets an autostart schedule for a workspace, and the workspace's template has autostart requirement restrictions (specific days of the week).

Changes

  • CLI Warning: When runningcoder schedule start <workspace> <schedule>, the CLI now checks if the template hasAutostartRequirement.DaysOfWeek restrictions and warns the user
  • Test Coverage: Added comprehensive tests for the warning functionality

Example Output

$ coder schedule start my-workspace 9:30AM Mon-FriWarning: your workspace template restricts autostart to the following days: monday, wednesday, friday.Your workspace may not autostart on days notin this list.

Technical Notes

  • The warning is sent tostderr (notstdout) following CLI conventions
  • Warning only appears when setting a schedule (not when setting to "manual")
  • In AGPL mode,AutostartRequirement always returns all days (enterprise feature), but the warning logic works for both AGPL and Enterprise editions

Testing

  • ✅ All existing schedule tests pass
  • ✅ New tests added and passing
  • ✅ Linting and formatting pass

Fixes#15619

…level autostartWhen a user sets a workspace autostart schedule via the CLI, and thetemplate has autostart requirement restrictions (days of week), warnthe user that their workspace may not autostart on days not allowedby the template.This helps users understand why their workspace might not autostartas expected when template-level restrictions are in place.Fixes#15619
This test was not applicable in AGPL mode and was always skipped.
@mtojekmtojek requested a review fromjohnstcnOctober 24, 2025 09:54
@mtojekmtojek marked this pull request as ready for reviewOctober 24, 2025 09:54
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

LGTM modulo one wording suggestion

Use positive wording 'may only autostart on these days' instead of'may not autostart on days not in this list'.Co-authored-by: Cian Johnston <cian@coder.com>
@mtojekmtojekenabled auto-merge (squash)October 24, 2025 10:13
@mtojekmtojek merged commitfb9d8e3 intomainOct 24, 2025
30 checks passed
@mtojekmtojek deleted the 15619-warn-autostart branchOctober 24, 2025 10:18
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 24, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@mtojekmtojek

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

feat: cli: warn user if setting autostart on workspace with template-level autostart

3 participants

@mtojek@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp