Kyle Carberry
84995b7320
fix: preserve workspace resource metadata order ( #5421 )
...
Fixes #4511 .
2022-12-14 19:08:22 +00:00
Steven Masley
27386d49d0
fix: No org admins until organizations are in the UI ( #5414 )
...
* fix: No org admins until organizations are in the UI
Until organizations have management UI, we should not set any org
admins. This goes around the site wide perms transparently and
is confusing to users.
Default user is no longer an org admin, so the demotion test makes
no sense
2022-12-14 11:05:42 -06:00
Bruno Quaresma
ce76d9d5a3
feat: Add diff and Dockerfile support for template version page ( #5339 )
2022-12-08 10:24:15 -05:00
Ammar Bandukwala
1cfe5de1c5
Add Service Banners ( #5272 )
2022-12-06 18:38:38 +00:00
Bruno Quaresma
e17fd0bb25
feat: Add GET previous template version endpoint ( #5230 )
2022-12-06 14:15:03 +00:00
Colin Adler
a02617b66b
fix: remove unnecessary WHEREs from AcquireProvisionerJob ( #5257 )
2022-12-02 23:53:49 +00:00
Colin Adler
8469dbc045
fix: add index to provisioner_jobs.started_at ( #5245 )
2022-12-01 19:29:15 -06:00
Colin Adler
92c217bd85
fix: add index on workspace_agents.auth_token ( #5244 )
2022-12-02 01:29:05 +00:00
Mathias Fredriksson
d9f2aaf3b4
feat: Add support for update checks and notifications ( #4810 )
...
Co-authored-by: Kira Pilot <kira@coder.com >
2022-12-01 19:43:28 +02:00
Bruno Quaresma
d402914eb7
refactor: Return template version name in the workspace build API ( #5178 )
2022-11-28 19:53:56 +00:00
Steven Masley
ab9298f382
chore: Rewrite rbac rego -> SQL clause ( #5138 )
...
* chore: Rewrite rbac rego -> SQL clause
Previous code was challenging to read with edge cases
- bug: OrgAdmin could not make new groups
- Also refactor some function names
2022-11-28 12:12:34 -06: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
Mathias Fredriksson
eff99f78fa
feat: Add support for MOTD file in coder agents ( #5147 )
2022-11-24 12:22:20 +00: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
Presley Pizzo
67941b4f80
chore: refactor audit page to use window function for count ( #5133 )
...
* Move count query to window function
* Unpack count and update types
* Remove count endpoint
* Update tests, wip
* Fix tests
* Update frontend, wip
* Remove space
* Fix frontend test
* Don't hang on error
* Handle no results
* Don't omit count
* Fix frontend tests
2022-11-21 11:30:41 -05: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
Colin Adler
ae38bbeab6
chore: refactor agent stats streaming ( #5112 )
2022-11-18 16:46:53 -06:00
Ammar Bandukwala
acf34d4295
site: support high build time variation in progress bar ( #4941 )
2022-11-17 16:56:56 +00:00
Kyle Carberry
fb9ca7b830
feat: Add the option to generate a trial license during setup ( #5110 )
...
This allows users to generate a 30 day free license during setup to
test out Enterprise features.
2022-11-16 17:09:49 -06:00
Kyle Carberry
b6703b11c6
feat: Add external provisioner daemons ( #4935 )
...
* Start to port over provisioner daemons PR
* Move to Enterprise
* Begin adding tests for external registration
* Move provisioner daemons query to enterprise
* Move around provisioner daemons schema
* Add tags to provisioner daemons
* make gen
* Add user local provisioner daemons
* Add provisioner daemons
* Add feature for external daemons
* Add command to start a provisioner daemon
* Add provisioner tags to template push and create
* Rename migration files
* Fix tests
* Fix entitlements test
* PR comments
* Update migration
* Fix FE types
2022-11-16 16:34:06 -06:00
Colin Adler
66d20cabac
fix: index GetWorkspaceAgentsByResourceIDs query ( #5021 )
2022-11-16 14:40:57 -06:00
Colin Adler
e7f1192614
fix: add index for GetProvisionerLogsByIDBetween ( #5020 )
2022-11-16 14:32:29 -06:00
Presley Pizzo
e6ead7d915
chore: refactor workspaces query to use window function ( #5079 )
...
* Use window function in query
* Convert workspace rows and unpack count
* Update types
* Fix Scan bug
* Remove getCountError
2022-11-16 10:16:37 -05:00
Bruno Quaresma
f262fb4811
feat: Add template version page ( #5071 )
2022-11-15 16:24:13 +00:00
Garrett Delfosse
88f3691dcc
feat: add count to get users endpoint ( #5016 )
2022-11-14 17:22:57 -05:00
Mathias Fredriksson
e872e18883
chore: Set initialism for DefaultTTL (from DefaultTtl) ( #4996 )
2022-11-14 20:14:08 +02:00
Ammar Bandukwala
97dbd4dc5d
Implement Quotas v3 ( #5012 )
...
* provisioner/terraform: add cost to resource_metadata
* provisionerd/runner: use Options struct
* Complete provisionerd implementation
* Add quota_allowance to groups
* Combine Quota and RBAC licenses
* Add Opts to InTx
2022-11-14 17:57:33 +00:00
Marcin Tojek
cf5d48bb5a
fix: do not skip properties on creating templates ( #5060 )
...
* fix: do not skip properties while creating templates
* test: empty edit
2022-11-14 15:32:18 +01:00
Dean Sheather
8e5af82275
feat: add api-rate-limit flag ( #5013 )
2022-11-10 21:53:48 +00:00
Marcin Tojek
2042b575dc
feat: Add template display name (backend) ( #4966 )
...
* Rename to nameValidator
* Refactor: NameValid
* Fix: comment
* Define new migration
* Include display_name
* Update typesGenerated.ts
* Update meta
* Adjust tests
* CLI tests
* Fix: audit
* Fix: omitempty
* site: display_name is optional
* unit: TestUsernameValid
* entities.ts: add display_name
* site: TemplateSettingsPage.test.tsx
* Fix: TemplateSettingsForm.tsx
* Adjust tests
* Add comment to display_name column
* Fix: rename
* Fix: make
* Loosen regexp
* Fix: err check
* Fix: template name length
* Allow for whitespaces
* Update migration number
2022-11-10 21:51:09 +01:00
Colin Adler
f3eb662208
fix: add index for workspace_resource.job_id column ( #5009 )
2022-11-10 20:09:44 +00: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
Mathias Fredriksson
4885ecc3ad
fix: Allow dumping db with pg_dump, utilize make cache ( #4964 )
2022-11-10 12:54:47 +02:00
Garrett Delfosse
d277e28427
feat: change template max_ttl to default_ttl ( #4843 )
2022-11-09 19:36:25 +00:00
Kyle Carberry
089659ffb1
fix: Move SQL connection limits to initialization ( #4981 )
...
The connection limit wasn't being applied to pubsub, which would
overload the server if a ton of logs were being published at once.
This should fix it, and improve scale a lot!
2022-11-09 16:25:25 +00:00
Mathias Fredriksson
90c34b74de
feat: Add connection_timeout and troubleshooting_url to agent ( #4937 )
...
* feat: Add connection_timeout and troubleshooting_url to agent
This commit adds the connection timeout and troubleshooting url fields
to coder agents.
If an initial connection cannot be established within connection timeout
seconds, then the agent status will be marked as `"timeout"`.
The troubleshooting URL will be present, if configured in the Terraform
template, it can be presented to the user when the agent state is either
`"timeout"` or `"disconnected"`.
Fixes #4678
2022-11-09 17:27:05 +02:00
Mathias Fredriksson
e906d0dc54
feat: Add database fixtures for testing migrations ( #4858 )
2022-11-08 19:59:44 +02:00
Presley Pizzo
f496b149df
feat: add count endpoint for users, enabling better pagination ( #4848 )
...
* Start on backend
* Hook up frontend
* Add to frontend test
* Add go test, wip
* Fix some test bugs
* Fix test
* Format
* Add to authorize.go
* copy user array into local variable
* Authorize route
* Log count error
* Authorize better
* Tweaks to authorization
* More authorization tweaks
* Make gen
* Fix test
Co-authored-by: Garrett <garrett@coder.com >
2022-11-08 10:58:44 -05:00
Kyle Carberry
56b963a940
feat: Make workspace watching realtime instead of polling ( #4922 )
...
* feat: Make workspace watching realtime instead of polling
This was leading to performance issues on the frontend, where
the page should only be rendered if changes occur. While this
could be changed on the frontend, it was always the intention
to make this socket ~realtime anyways.
* Fix workspace tests waiting, erroring on workspace update, and add comments to workspace events
2022-11-07 15:25:18 +00:00
Kyle Carberry
30281852d6
feat: Add buffering to provisioner job logs ( #4918 )
...
* feat: Add bufferring to provisioner job logs
This should improve overall build performance, and especially under load.
It removes the old `id` column on the `provisioner_job_logs` table
and replaces it with an auto-incrementing big integer to preserve order.
Funny enough, we never had to care about order before because inserts
would at minimum be 1ms different. Now they aren't, so the order needs
to be preserved.
* Fix log bufferring
* Fix frontend log streaming
* Fix JS test
2022-11-06 20:50:34 -06:00
Colin Adler
65ffa20ba2
fix: use correct empty uuids ( #4917 )
2022-11-06 16:49:43 -06:00
Kyle Carberry
5be6c7071e
feat: Associate connected workspace agents with replicas ( #4914 )
...
This will enable displaying a graph that associates agents
to running replicas.
2022-11-06 15:27:09 -06:00
Marcin Tojek
3f6c4486f7
Allow changing db schema from public ( #4873 )
...
* Remove public schema from enum defs
* Update queries
* Fix
2022-11-04 09:15:17 +01:00
Kira Pilot
a73dd4f45d
Audit date filter/kira pilot ( #4845 )
...
* sql query
* added time_to
* added validation error
* documentation
* attempt to add test
* removed whiitespace
* fix: ensure date_from and date_to are applied correct audit logs
* added more tests
* ran make gen
* PR feedback
Co-authored-by: Dean Sheather <dean@deansheather.com >
2022-11-03 11:04:36 -04:00
Colin Adler
e26bc20723
fix: actually fix template version created by migration ( #4850 )
2022-11-01 22:19:58 +00:00
Kyle Carberry
a672ae8c7d
feat: Extract instance type when provisioning VMs ( #4839 )
...
This should help us identify what instances our users consume.
2022-11-01 21:51:57 +00:00
Colin Adler
a930cf42b4
fix: templates created_by migration ( #4838 )
2022-11-01 16:35:14 +00:00
Bruno Quaresma
46e0953876
refactor: Show template versions as timeline ( #4800 )
2022-10-31 16:38:07 +00:00
Dean Sheather
10df2fd4fb
feat: add new required slug property to coder_app, use in URLs ( #4573 )
2022-10-28 17:41:31 +00:00
Kira Pilot
3c5e292c5a
feat: add workspace build start/stop to audit log ( #4744 )
...
* adding workspace_build resource
* added migration
* fix keyword
* got rid oof diffs for workspace builds
* adding workspace name to string
* renamed migrations
* fixed lint
* pass throough AdditionalFields and fix tests
* no need to pass through each handler
* cleaned up migrations
* generated types; fixed missing cases
* logging error
2022-10-25 15:34:48 -04:00