forked from coder/coder
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] main from coder:main #154
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
Conversation
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
Closes #17791 This PR adds ability to cancel workspace builds that are in "pending" status. Breaking changes: - CancelWorkspaceBuild method in codersdk now accepts an optional request parameter API: - Added `expect_status` query parameter to the cancel workspace build endpoint - This parameter ensures the job hasn't changed state before canceling - API returns `412 Precondition Failed` if the job is not in the expected status - Valid values: `running` or `pending` - Wrapped the entire cancel method in a database transaction UI: - Added confirmation dialog to the `Cancel` button, since it's a destructive operation   - Enabled cancel action for pending workspaces (`expect_status=pending` is sent if workspace is in pending status)  --------- Co-authored-by: Dean Sheather <dean@deansheather.com>
Relates to coder/internal#720 * Reduces workspaces data refetch interval if no builds are pending * Sets `refetchOnWindowFocus: always` to mitigate impact of reduced polling duration
It appears we accidentally broke this logic in a previous PR. This should now correctly disable the agent api as we'd expect.
## Description This PR updates the lifecycle executor to explicitly exclude prebuilt workspaces from being considered for lifecycle operations such as `autostart`, `autostop`, `dormancy`, `default TTL` and `failure TTL`. Prebuilt workspaces (i.e., those owned by the prebuild system user) are handled separately by the prebuild reconciliation loop. Including them in the lifecycle executor could lead to unintended behavior such as incorrect scheduling or state transitions. ## Changes * Updated the lifecycle executor query `GetWorkspacesEligibleForTransition` to exclude workspaces with `owner_id = 'c42fdf75-3097-471c-8c33-fb52454d81c0'` (prebuilds). * Added tests to verify prebuilt workspaces are not considered in: * Autostop * Autostart * Default TTL * Dormancy * Failure TTL Fixes: #18740 Related to: #18658
Fixes coder/internal#695 PostgreSQL tests are getting run in a non-postgres CI job because the tests don't get skipped if the `DB=` env is unset. This PR adds a skip for them. They are flaking in the `test-go-race` CI job. They run fine in the `test-go-race-pg` job, which pre-creates the postgres server, so the flakiness is almost certainly related to spinning up the database server.
Workspaces with `Write Coder on Coder` template are failing with an error in the agent related to File Browser: ``` 2025/07/08 14:00:29 Using database: /home/coder/filebrowser.db 2025/07/08 14:00:29 password is too short, minimum length is 12 ``` Updating filebrowser module version to 1.1.1: coder/registry#173
…18765) This change allows a devcontainer to be opened via the agent syntax, `coder open vscode <workspace>.<agent>` and removes the `--container` option to simplify the subcommand. Accessing the subagent will behave similarly to how the `--container` option behaved. Fixes coder/internal#748
…#18754) Fixes #18751 Use `postgresql` as the Helm release name instead of `coder-db` to make the service name more intuitive and eliminate confusion entirely. ## Changes - Changed `helm install coder-db bitnami/postgresql` to `helm install postgresql bitnami/postgresql` - Updated PostgreSQL URLs from `coder-db-postgresql.coder.svc.cluster.local` to `postgresql.coder.svc.cluster.local` - Removed explanatory notes about service naming (no longer needed) ## Benefits ✅ Makes examples work out-of-the-box for most users ✅ Uses the most straightforward and intuitive release name ✅ Eliminates confusion about service naming entirely ✅ Simpler documentation without complex explanations ## Testing - Verified that `helm install postgresql bitnami/postgresql` creates service named `postgresql` - Confirmed this approach works with the connection URL `postgresql.coder.svc.cluster.local` Suggested by @EdwardAngert as a cleaner solution than explaining the service naming dependency. --------- Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: matifali <10648092+matifali@users.noreply.github.com> Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.2)
Can you help keep this open source service alive? 💖 Please sponsor : )