mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
feat: allow users to pause prebuilt workspace reconciliation (#18700)
This PR provides two commands: * `coder prebuilds pause` * `coder prebuilds resume` These allow the suspension of all prebuilds activity, intended for use if prebuilds are misbehaving.
This commit is contained in:
79
docs/reference/api/prebuilds.md
generated
Normal file
79
docs/reference/api/prebuilds.md
generated
Normal file
@ -0,0 +1,79 @@
|
||||
# Prebuilds
|
||||
|
||||
## Get prebuilds settings
|
||||
|
||||
### Code samples
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X GET http://coder-server:8080/api/v2/prebuilds/settings \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`GET /prebuilds/settings`
|
||||
|
||||
### Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
{
|
||||
"reconciliation_paused": true
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
|--------|---------------------------------------------------------|-------------|--------------------------------------------------------------------|
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.PrebuildsSettings](schemas.md#codersdkprebuildssettings) |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
## Update prebuilds settings
|
||||
|
||||
### Code samples
|
||||
|
||||
```shell
|
||||
# Example request using curl
|
||||
curl -X PUT http://coder-server:8080/api/v2/prebuilds/settings \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Coder-Session-Token: API_KEY'
|
||||
```
|
||||
|
||||
`PUT /prebuilds/settings`
|
||||
|
||||
> Body parameter
|
||||
|
||||
```json
|
||||
{
|
||||
"reconciliation_paused": true
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|--------|------|--------------------------------------------------------------------|----------|----------------------------|
|
||||
| `body` | body | [codersdk.PrebuildsSettings](schemas.md#codersdkprebuildssettings) | true | Prebuilds settings request |
|
||||
|
||||
### Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
{
|
||||
"reconciliation_paused": true
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
|--------|-----------------------------------------------------------------|--------------|--------------------------------------------------------------------|
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.PrebuildsSettings](schemas.md#codersdkprebuildssettings) |
|
||||
| 304 | [Not Modified](https://tools.ietf.org/html/rfc7232#section-4.1) | Not Modified | |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
15
docs/reference/api/schemas.md
generated
15
docs/reference/api/schemas.md
generated
@ -4980,6 +4980,20 @@ Git clone makes use of this by parsing the URL from: 'Username for "https://gith
|
||||
| `reconciliation_backoff_lookback` | integer | false | | Reconciliation backoff lookback determines the time window to look back when calculating the number of failed prebuilds, which influences the backoff strategy. |
|
||||
| `reconciliation_interval` | integer | false | | Reconciliation interval defines how often the workspace prebuilds state should be reconciled. |
|
||||
|
||||
## codersdk.PrebuildsSettings
|
||||
|
||||
```json
|
||||
{
|
||||
"reconciliation_paused": true
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|-------------------------|---------|----------|--------------|-------------|
|
||||
| `reconciliation_paused` | boolean | false | | |
|
||||
|
||||
## codersdk.Preset
|
||||
|
||||
```json
|
||||
@ -6058,6 +6072,7 @@ Git clone makes use of this by parsing the URL from: 'Username for "https://gith
|
||||
| `convert_login` |
|
||||
| `health_settings` |
|
||||
| `notifications_settings` |
|
||||
| `prebuilds_settings` |
|
||||
| `workspace_proxy` |
|
||||
| `organization` |
|
||||
| `oauth2_provider_app` |
|
||||
|
Reference in New Issue
Block a user