-
Notifications
You must be signed in to change notification settings - Fork 894
feat: add lifecycle.Executor to manage autostart and autostop #1183
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a145d6d
feat: add lifecycle.Executor to autostart workspaces.
johnstcn 8f401ca
refactor: do not expose Store in coderdtest.Options
johnstcn 6d8f5fe
fixup! refactor: do not expose Store in coderdtest.Options
johnstcn cfd0d1e
stop accessing db directly, only query workspaces with autostart enabled
johnstcn ce63810
refactor unit tests, add tests for autostop
johnstcn 579f362
make the new tests pass with some refactoring
johnstcn 6e88f67
gitignore *.swp
johnstcn 2b1a383
remove unused methods
johnstcn f31588e
fixup! remove unused methods
johnstcn 80e0581
fix: range over channel, add continue to default switch case
johnstcn d176478
add test for deleted workspace
johnstcn bd97c1a
workspaces.sql: remove unused methods
johnstcn 0931d25
unexport test helper methods
johnstcn faebe2e
chore: rename package autostart/lifecycle to lifecycle/executor
johnstcn abc0854
add test to ensure workspaces are not autostarted before time
johnstcn e53946a
wire up executor to coderd
johnstcn 364a27c
fix: executor: skip workspaces whose last build was not successful
johnstcn e96414f
address PR comments
johnstcn b5bf50e
add goleak TestMain
johnstcn d37cc2b
fmt
johnstcn d11f5d7
mustTransitionWorkspace should return the updated workspace
johnstcn f6388b4
remove usage of require.Eventually/Never which is flaky on Windows
johnstcn fd0f8a3
make lifecycle executor spawn a new goroutine automatically
johnstcn 7b6f2e1
rename unit tests
johnstcn a7143bd
s/doBuild/build
johnstcn 7d9b696
rename parent package lifecycle to autobuild
johnstcn 5cba737
add unit test for behaviour with an updated template
johnstcn 7627372
add ticket to reference TODO
johnstcn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: rename package autostart/lifecycle to lifecycle/executor
- Loading branch information
commit faebe2e27e0917b6481a941212d8d3dec82ff2fe
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...tart/lifecycle/lifecycle_executor_test.go → ...cycle/executor/lifecycle_executor_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about calling the lifecycle package
autobuild
orcronbuild
? I'm concerned about calling itlifecycle
, since that term could be interpreted very broadly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autobuild
is better and does what it says on the tin.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment(in-support):
autobuild
seems intuitive/useful to me.