Spike Curtis
e0f644c598
test(coderd): fix TestWorkspaceWatcher hang waiting for update ( #8992 )
...
Signed-off-by: Spike Curtis <spike@coder.com >
2023-08-09 16:09:25 +04:00
Jon Ayers
e43608395c
feat: add frontend for locked workspaces ( #8655 )
...
- Fix workspaces query for locked workspaces.
2023-08-03 19:46:02 -05:00
Jon Ayers
b47d076756
feat: add deleting_at column to workspaces ( #8333 )
2023-07-20 22:01:11 -05:00
Dean Sheather
dc8b73168e
feat: add user quiet hours schedule and restart requirement feature flag ( #8115 )
2023-07-20 23:35:41 +10:00
Colin Adler
39889179ea
test(coderd): fix TestWorkspaceWatcher flake ( #8612 )
2023-07-19 18:03:56 -05:00
Josh Vawdrey
6318c4c09f
feat(site): increase TTL and max TTL validation to 30 days ( #8258 )
...
Co-authored-by: Dean Sheather <dean@deansheather.com >
2023-07-19 23:43:10 +10:00
Mathias Fredriksson
611fbd8215
test(coderd): fix TestWorkspaceWatcher skipped pending state ( #8584 )
2023-07-18 21:58:50 +03:00
Asher
7ed17b2605
fix: add some missing workspace updates ( #7790 )
...
* Standardize on function to get workspace channel name
There were two, now there is one.
* Add some missing workspace updates
There are some failure cases where we do not set the type as a workspace
build which causes the workspace update to never be published.
* Make build failures warnings
Otherwise the associated test fails due to the logger fataling on
error messages.
2023-07-14 15:07:48 -08:00
Marcin Tojek
9f2a931eb8
feat(coderd): support ephemeral parameters ( #8367 )
2023-07-10 13:44:03 +02:00
Mathias Fredriksson
b73f9d8e86
feat: add computed workspace and agent health fields to the api ( #8280 )
2023-07-10 12:40:11 +03:00
Jon Ayers
4a9c8f407a
feat: add auto-locking/deleting workspace based on template config ( #8240 )
2023-07-02 21:29:52 -05:00
Jon Ayers
749307ef08
feat: provide endpoint to lock/unlock workspace ( #8239 )
2023-06-28 16:12:49 -05:00
Kyle Carberry
8c4b7c01e2
chore: remove redundant dbtype package ( #8014 )
...
* chore: rename store to dbmock for consistency
* chore: remove redundant dbtype package
This wasn't necessary and forked how we do DB types.
2023-06-13 19:14:55 +00:00
Kira Pilot
f13632cea8
feat: add impending deletion filter to workspaces page ( #7860 )
...
* add workspace deletion dialog
* add deleting_by query param
* added test
* filtering on workspaces to be deleted
* cleaned up form
* added story
* added banner filter
* PR feedback
* fix lint and stories
* PR feedback
* added enterprise test
* added unit tests in search_test.go
* remove unused fn
* unstaged changes
2023-06-12 11:55:51 -07:00
Steven Masley
fa8f50a169
fix: fix workspace status filter returning more statuses that requested ( #7732 )
2023-06-05 18:12:10 -05:00
Marcin Tojek
702c9081e0
fix: do not skip parameter validation if min or max = 0 ( #7707 )
2023-05-30 14:57:06 +02:00
Rodrigo Maia
d9299caa12
feat: order workspaces by running first ( #7656 )
...
* wip
* use updated sql
* wip
* Implement sorting in databasefake.go
* More fixes
* sql fmt
---------
Co-authored-by: Marcin Tojek <marcin@coder.com >
2023-05-25 13:35:47 -03:00
Spike Curtis
cd416c86dd
refactor: workspace builds ( #7541 )
...
* refactor workspace builds
Signed-off-by: Spike Curtis <spike@coder.com >
* make gen
Signed-off-by: Spike Curtis <spike@coder.com >
* Remove ParameterResolver from typescript
Signed-off-by: Spike Curtis <spike@coder.com >
* rename conversion -> database/db2sdk
Signed-off-by: Spike Curtis <spike@coder.com >
* tests for db2sdk
Signed-off-by: Spike Curtis <spike@coder.com >
* Tests for ParameterResolver
Signed-off-by: Spike Curtis <spike@coder.com >
* wsbuilder tests
Signed-off-by: Spike Curtis <spike@coder.com >
* Move parameter validation tests to richparameters_test.go
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix CI generation; rename mock->dbmock
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix test imports
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-05-23 12:06:33 +04:00
Mathias Fredriksson
ad0070354f
test: Fix generated workspace name length ( #7228 )
2023-04-20 18:40:36 +00:00
Dean Sheather
e33941b7c2
feat: allow disabling autostart and custom autostop for template ( #6933 )
...
API only, frontend in upcoming PR.
2023-04-04 12:48:35 +00:00
Marcin Tojek
633dfbdb2e
feat: rich parameters: introduce display_name ( #6919 )
...
* model
* DB
* fix: DisplayName
* proto
* Proto
* Update go dep
* fixme
* fix format
* config
* fmt
* fix
* Fix
* fix
* chore(UI): redirecting from workspace page if 404 (#6880 )
* model
* CLI: Display parameter
* fix
* update dep
* fix
* fix
* fix
* UI changes
* fmt
---------
Co-authored-by: Kira Pilot <kira@coder.com >
2023-04-03 14:37:47 +02:00
Kyle Carberry
a63c97b8de
chore: wrap audit logs in a mutex to fix data race ( #6898 )
...
This was seen in `main`!
2023-03-30 12:13:03 -05:00
Kyle Carberry
ad9c9b468f
fix: block updating mutable parameters ( #6717 )
2023-03-22 11:05:04 -05:00
Kyle Carberry
7e854adbb3
fix: poll audit logs to ensure write is last ( #6708 )
2023-03-21 19:19:09 +00:00
Kyle Carberry
aaa3b31a0b
chore: add echo helper to create an agent with token ( #6576 )
...
This should reduce some LOC and duplication in tests!
2023-03-21 18:03:38 +00:00
Kyle Carberry
1b35ac80f2
fix: ensure agent DisconnectedAt is greater than or equal LastConnectedAt ( #6692 )
...
See https://github.com/coder/coder/actions/runs/4471502401/jobs/7856475920
2023-03-21 11:08:39 -05:00
Steven Masley
2321160c62
feat: Dbauthz is now default, remove out of experimental ( #6650 )
...
* feat: dbauthz always on, out of experimental
* Add ability to do rbac checks in unit tests
* Remove AuthorizeAllEndpoints
* Remove duplicate rbac checks
2023-03-21 09:10:22 -05:00
Kyle Carberry
b693b9f599
chore: fix workspace audit log flake ( #6494 )
...
This happened because sometimes a build would be queued
and completed intermittently in CI.
See https://github.com/coder/coder/actions/runs/4358121985/jobs/7618290591
2023-03-16 12:47:54 -05:00
Marcin Tojek
2d4706ac33
feat: mark coder_parameter as "required" ( #6433 )
...
* Add required column
* Pass through providerd
* Pass the required property down
* Optional
* Fix
* Fix
* Fix
* fix
* CLI create: support for optional fields
* Use HTML API to mark fields required
* Fix
* Improve validation
* more fixes
* make fmt
* Fix
* WIP
* Fix: test
* CLI update tets
* OptionalParameterAdded
* Fix: migration
2023-03-07 16:38:31 +01:00
Dean Sheather
66a6b590a1
feat: add template max_ttl ( #6114 )
...
Co-authored-by: Bruno Quaresma <bruno@coder.com >
2023-03-07 14:14:58 +00:00
Ammar Bandukwala
f05609b4da
chore: format Go more aggressively
2023-02-18 18:32:09 -06:00
Mathias Fredriksson
a56df46d0f
fix: Update github.com/coder/retry to remove initial delay ( #6160 )
2023-02-13 11:54:43 +02:00
Marcin Tojek
1dc477819e
feat: render Markdown in rich parameter descriptions ( #6098 )
2023-02-08 12:57:12 +01:00
Marcin Tojek
b86bce8494
feat!: Validate monotonic numbers for rich parameters ( #6046 )
...
* Database changes
* protobuf
* Fix: docs
* workspaces_test
* Validation in coderd
* Fix: resources
* omitempty
* UI changes
* UI tests
* fix
2023-02-07 09:36:13 +01:00
Kyle Carberry
71a893764e
chore: remove CreateAnotherUserWithUser ( #6068 )
...
This was not idiomatic Go!
2023-02-06 23:48:21 +00:00
Kira Pilot
46fe59f5e7
feat: audit login ( #5925 )
...
* added migration for api key resource
* sort of working
* auditing login
* passing the correct user id
* added and fixed tests
* gen documentation
* formatting and lint
* lint
* audit Github oauth and write tests
* audit oauth and write tests
* added defer fn for login error auditing
* fixed test
* feat: audit logout (#5998 )
* Update coderd/userauth.go
Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com >
* fix test
* bypassing diff generation if login/logout
* lint
---------
Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com >
2023-02-06 15:12:50 -05:00
Kyle Carberry
7ad87505c8
chore: move agent functions from codersdk into agentsdk ( #5903 )
...
* chore: rename `AgentConn` to `WorkspaceAgentConn`
The codersdk was becoming bloated with consts for the workspace
agent that made no sense to a reader. `Tailnet*` is an example
of these consts.
* chore: remove `Get` prefix from *Client functions
* chore: remove `BypassRatelimits` option in `codersdk.Client`
It feels wrong to have this as a direct option because it's so infrequently
needed by API callers. It's better to directly modify headers in the two
places that we actually use it.
* Merge `appearance.go` and `buildinfo.go` into `deployment.go`
* Merge `experiments.go` and `features.go` into `deployment.go`
* Fix `make gen` referencing old type names
* Merge `error.go` into `client.go`
`codersdk.Response` lived in `error.go`, which is wrong.
* chore: refactor workspace agent functions into agentsdk
It was odd conflating the codersdk that clients should use
with functions that only the agent should use. This separates
them into two SDKs that are closely coupled, but separate.
* Merge `insights.go` into `deployment.go`
* Merge `organizationmember.go` into `organizations.go`
* Merge `quota.go` into `workspaces.go`
* Rename `sse.go` to `serversentevents.go`
* Rename `codersdk.WorkspaceAppHostResponse` to `codersdk.AppHostResponse`
* Format `.vscode/settings.json`
* Fix outdated naming in `api.ts`
* Fix app host response
* Fix unsupported type
* Fix imported type
2023-01-29 15:47:24 -06:00
Marcin Tojek
1b0560ceb4
feat: Expose workspace build parameters via API ( #5743 )
2023-01-17 16:24:45 +01:00
Ben A
54cc587dad
Updated PreconditionFailed status occurences to more appropriate statuses. ( #5513 )
2023-01-13 08:30:48 -06:00
Kyle Carberry
84995b7320
fix: preserve workspace resource metadata order ( #5421 )
...
Fixes #4511 .
2022-12-14 19:08:22 +00:00
Marcin Tojek
25da224513
Filter query: has-agent connecting, connected, disconnected, timeout ( #5145 )
...
* WIP
* has-agent:connecting, connected
* Fix
* Fix
* has-agent:disconnected, timeout
* Fix: typo
* Fix
* TODOs
* databasefake
* Fix: typo
* More TODOs
* databasefake
* Timeout tests
* Address PR comments
* Implement FIXMEs
* Renamings
* Address PR comments
* Fix: readability
* Fix: refactor CASE logic
* CASE logic
* Fix
* Use CTE
* Polishing
* Comment
* WIP
* IS NOT NULL
* Without CTE
* One more optimization
* 2nd optimization
2022-11-24 15:33:13 +01:00
Presley Pizzo
913e461f79
Don't override 0 ttl with template default ( #5151 )
2022-11-23 10:30:38 -05:00
Kira Pilot
6786ca2854
Audit build outcomes/kira pilot ( #5143 )
...
* auditing failed builds
* logging workspace build successes
* remove duplicate workspace build entry
* fixed workspacebuilds_test
* PR feedback
* lint and migrations
* fix nil auditors
* workspace_build test
* fixed workspaces_teest
Co-authored-by: Colin Adler <colin1adler@gmail.com >
2022-11-22 13:22:56 -05:00
Mathias Fredriksson
2b6c229e4e
fix: Trigger workspace event after agent timeout seconds ( #5141 )
...
Fixes #5116
2022-11-22 11:01:28 +00:00
Marcin Tojek
e86539db11
feat: Allow user to cancel workspace jobs ( #5115 )
...
* Add database column allow_user_cancel_workspace_jobs
* Adjust API
* site: typesGenerated.ts
* Expose template.allow_ in Workspaces API
* Fix: site tests
* Fix: make fmt/prettier
* Fix: enterprise
* Database tests
* Add CLI tests
* Add checkbox
* i18n
* Logic: block cancelling
* Unit tests for conditional cancel
* Fix: message
* Address PR comment
* Address PR comments
* Fix: make
2022-11-21 11:43:53 +01:00
Steven Masley
015a6f9e26
fix: RBAC should default deny missing variables. ( #5105 )
...
* fix: RBAC should default deny missing variables.
The default behavior was to use 'true' for missing variables. This
was an incorrect assumption. If the variable is missing, the new
default is to deny (fail secure).
* Assert 1 workspace is returned for the owners
2022-11-16 11:01:09 -06:00
Marcin Tojek
32927b1a24
feat: show template.display_name on Workspace pages ( #5082 )
...
* feat: expose template.display_name via Workspaces endpoint
* Fix: MockWorkspace
* UI: Workspace stats and row
* Show template.display_name on pages
* Fix: address PR comments
* Add helper function: getDisplayWorkspaceTemplateName
2022-11-16 15:50:32 +01:00
Ammar Bandukwala
95fb59696e
Refactor Provisioner to distinguish Plan and Apply ( #5036 )
2022-11-11 16:45:58 -06:00
Kyle Carberry
4b7c710755
fix: Block creating workspaces with deleted templates ( #5019 )
...
@coadler and @deansheather bricked a Coder deployment with this...
2022-11-10 16:53:14 -06:00
Garrett Delfosse
766a2ad590
chore: refactor workspace count to single route ( #4809 )
...
Co-authored-by: Presley Pizzo <presley@coder.com >
2022-11-10 13:25:46 -05:00