feat: Enable workspace debug logging (#6838)

* feat: Enable workspace debug logging

* Fix

* Fix

* Fix

* fix

* fix

* Enable RBAC

* unit tests

* Fix

* fix

* fix

* fix

* more tests

* fix: workspacebuild_test use roles

* fix: swagger comment

* fix: ctx.Done

* fix: address PR comments

* break loop
This commit is contained in:
Marcin Tojek
2023-03-30 16:00:33 +02:00
committed by GitHub
parent 665b84de0d
commit 0ba200c2a1
18 changed files with 610 additions and 288 deletions
+1
View File
@@ -1166,6 +1166,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
```json
{
"dry_run": true,
"log_level": "debug",
"orphan": true,
"parameter_values": [
{
+17
View File
@@ -1463,6 +1463,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
```json
{
"dry_run": true,
"log_level": "debug",
"orphan": true,
"parameter_values": [
{
@@ -1490,6 +1491,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| Name | Type | Required | Restrictions | Description |
| ----------------------- | ----------------------------------------------------------------------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dry_run` | boolean | false | | |
| `log_level` | [codersdk.ProvisionerLogLevel](#codersdkprovisionerloglevel) | false | | Log level changes the default logging verbosity of a provider ("info" if empty). |
| `orphan` | boolean | false | | Orphan may be set for the Destroy transition. |
| `parameter_values` | array of [codersdk.CreateParameterRequest](#codersdkcreateparameterrequest) | false | | Parameter values are optional. It will write params to the 'workspace' scope. This will overwrite any existing parameters with the same name. This will not delete old params not included in this list. |
| `rich_parameter_values` | array of [codersdk.WorkspaceBuildParameter](#codersdkworkspacebuildparameter) | false | | |
@@ -1501,6 +1503,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| Property | Value |
| ------------ | -------- |
| `log_level` | `debug` |
| `transition` | `create` |
| `transition` | `start` |
| `transition` | `stop` |
@@ -3259,6 +3262,20 @@ Parameter represents a set value for the scope.
| `canceled` |
| `failed` |
## codersdk.ProvisionerLogLevel
```json
"debug"
```
### Properties
#### Enumerated Values
| Value |
| ------- |
| `debug` |
## codersdk.ProvisionerStorageMethod
```json