Ammar Bandukwala
f05609b4da
chore: format Go more aggressively
2023-02-18 18:32:09 -06:00
Marcin Tojek
3b7b96ac28
feat: Expose managed variables via API ( #6134 )
...
* WIP
* hcl
* useManagedVariables
* fix
* Fix
* Fix
* fix
* go:build
* Fix
* fix: bool flag
* Insert template variables
* API
* fix
* Expose via API
* More wiring
* CLI for testing purposes
* WIP
* Delete FIXME
* planVars
* WIP
* WIP
* UserVariableValues
* no dry run
* Dry run
* Done FIXME
* Fix
* Fix: CLI
* Fix: migration
* API tests
* Test info
* Tests
* More tests
* fix: lint
* Fix: authz
* Address PR comments
* Fix
* fix
* fix
2023-02-15 18:24:15 +01:00
Cian Johnston
f0f39b4892
chore: break down dbauthz.System into smaller roles ( #6218 )
...
- rbac: export rbac.Permissions
- dbauthz: move GetDeploymentDAUs, GetTemplateDAUs,
GetTemplateAverageBuildTime from querier.go to system.go
and removes auth checks
- dbauthz: remove AsSystem(), add individual roles for
autostart, provisionerd, add restricted system role for
everything else
2023-02-15 16:14:37 +00:00
Mathias Fredriksson
860e2829c5
fix: Prevent race between provisionerd connect and close ( #6206 )
...
* fix: Prevent race between provisionerd connect and close
* test: Add detection for provisioner creation after test completion
2023-02-14 16:37:43 +00:00
Mathias Fredriksson
41ae01d2e9
fix: Improve closure of provisioner and agent tailnet dial ( #6199 )
2023-02-14 14:57:48 +00:00
Steven Masley
6fb8aff6d0
feat: Add initial AuthzQuerier implementation ( #5919 )
...
feat: Add initial AuthzQuerier implementation
- Adds package database/dbauthz that adds a database.Store implementation where each method goes through AuthZ checks
- Implements all database.Store methods on AuthzQuerier
- Updates and fixes unit tests where required
- Updates coderd initialization to use AuthzQuerier if codersdk.ExperimentAuthzQuerier is enabled
2023-02-14 14:27:06 +00:00
Kyle Carberry
2d0a69ba47
fix: require client pipe to be closed in provisionerd test ( #6188 )
...
https://github.com/coder/coder/actions/runs/4165019548/jobs/7207442687
2023-02-14 00:46:05 +00:00
Marcin Tojek
271d68c862
feat: Disallow using legacy params with rich params ( #5974 )
...
* feat: Disallow using legacy params with rich params
* Fix
* nolint
2023-02-02 16:44:57 +01:00
Colin Adler
d2ae16dd22
fix: routinely ping agent websocket to ensure liveness ( #5824 )
2023-01-23 20:05:29 +00:00
Marcin Tojek
bbb208e29c
feat: Add CLI support for workspace build parameters ( #5768 )
...
* WIP
* WIP
* CLI: handle workspace build parameters
* fix: golintci
* Fix: dry run
* fix
* CLI: is mutable
* coderd: mutable
* fix: golanci
* fix: richParameterFile
* CLI: create unit tests
* CLI: update test
* Fix
* fix: order
* fix
2023-01-23 15:01:22 +01:00
Marcin Tojek
6ebadabe4e
feat: Add basic support for rich parameters to coderd and provisionerd ( #5710 )
2023-01-17 11:22:11 +01:00
Steven Masley
f76ef98a32
chore!: Standardize prometheus time metrics to seconds ( #5709 )
...
* chore!: Standardize prometheus time metrics to seconds
* Update prometheus docs
2023-01-13 11:15:25 -06:00
Marcin Tojek
971e36781b
chore: improve logging in provisionerd_test ( #5353 )
2022-12-09 13:11:54 +01:00
Dean Sheather
6651c1632d
fix: avoid terraform state concurrent access, remove global mutex ( #5273 )
2022-12-06 17:05:14 +00:00
Colin Adler
ab3b3d5fca
feat: add debouncing to provisionerd rpc calls ( #5198 )
2022-12-01 16:54:53 -06:00
Marcin Tojek and Mathias Fredriksson
883cf8afa9
chore: Add missing metrics description ( #5212 )
...
* chore: Add missing metrics description
* Update provisionerd/provisionerd.go
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
* Fix
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
2022-12-01 12:50:57 +01:00
Mathias Fredriksson
8ff89c4288
fix: Fix flakeyness of TestProvisionerd/ReconnectAndComplete ( #5169 )
2022-11-24 14:09:56 +02:00
Colin Adler
1f20cab110
fix: don't use yamux for in-memory provisioner{,d} streams ( #5136 )
2022-11-22 12:19:32 -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
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
Ammar Bandukwala
95fb59696e
Refactor Provisioner to distinguish Plan and Apply ( #5036 )
2022-11-11 16:45:58 -06:00
Marcin Tojek
16384f8594
feat: Add provisioner force-cancel flag ( #4947 )
...
* feat: Add provisionerd force cancel flag
* Golden files
* Fix: typesGenerated.ts
* Use single struct for Provisioner config
2022-11-08 14:19:40 +01:00
Kyle Carberry
53f2449e4f
chore: Fix changes from buffer provisioner logs ( #4924 )
...
Comments from #4918 were missed because of auto-merge.
2022-11-06 23:59:01 -06: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
e740aebf26
feat: add provisionerd prometheus metrics ( #4909 )
2022-11-04 19:03:01 -05:00
Colin Adler
dde9a43b7e
chore: fix otel dependency versions ( #4813 )
2022-10-31 19:16:16 +00:00
Colin Adler
1bd67b8064
fix: use -no-color when calling terraform show state ( #4812 )
2022-10-31 13:03:59 -05:00
Colin Adler
5de6f86959
feat: trace httpapi.{Read,Write} ( #4134 )
2022-09-21 17:07:00 -05:00
Colin Adler
b340634aaa
feat: add rbac tracing ( #4093 )
2022-09-16 18:32:15 +00:00
Colin Adler
77acf0c340
feat: provisionerd tracing, add public trace ingestion ( #4070 )
2022-09-16 11:43:22 -05:00
Ammar Bandukwala
30f8fd9b95
Daily Active User Metrics ( #3735 )
...
* agent: add StatsReporter
* Stabilize protoc
2022-09-01 14:58:23 -05:00
Kyle Carberry
b0fe9bcdd1
chore: Upgrade to Go 1.19 ( #3617 )
...
This is required as part of #3505 .
2022-08-21 22:32:53 +00:00
Mathias Fredriksson
4730c589fe
chore: Use standardized test timeouts and delays ( #3291 )
2022-08-01 15:45:05 +03:00
Spike Curtis
f310aeb4cb
Disable skipping job acquire log ( #3240 )
...
Signed-off-by: Spike Curtis <spike@coder.com >
2022-07-26 16:36:45 -07:00
Mathias Fredriksson
6916d34458
fix: Fix cleanup in test helpers, prefer defer in tests ( #3113 )
...
* fix: Change uses of t.Cleanup -> defer in test bodies
Mixing t.Cleanup and defer can lead to unexpected order of execution.
* fix: Ensure t.Cleanup is not aborted by require
* chore: Add helper annotations
2022-07-25 19:22:02 +03:00
Kyle Carberry
4f1df88529
fix: Always output job failure reason in provisioner daemon tests ( #2850 )
...
This flake can be seen here: https://github.com/coder/coder/runs/7186604615?check_suite_focus=true
2022-07-10 14:52:33 -05:00
Spike Curtis
22febc749a
provisionerd sends failed or complete last ( #2732 )
...
* provisionerd sends failed or complete last
Signed-off-by: Spike Curtis <spike@coder.com >
* Move runner into package
Signed-off-by: Spike Curtis <spike@coder.com >
* Remove jobRunner interface
Signed-off-by: Spike Curtis <spike@coder.com >
* renames and slight reworking from code review
Signed-off-by: Spike Curtis <spike@coder.com >
* Reword comment about okToSend
Signed-off-by: Spike Curtis <spike@coder.com >
2022-07-01 09:55:46 -07:00
Kyle Carberry
024ab6df57
fix: Use in-memory filesystem for echo provisioner tests ( #2408 )
...
* fix: Use in-memory filesystem for echo provisioner tests
This should reduce IO in CI to shave some time off tests!
* test: Increase timeouts to reduce flakes
It's difficult to understand what's timing out due to a lock
vs. taking a long time. This should help resolve! 🕵️
2022-06-16 15:09:22 +00:00
Kyle Carberry
ccd061652b
feat: Add built-in PostgreSQL for simple production setup ( #2345 )
...
* feat: Add built-in PostgreSQL for simple production setup
Fixes #2321 .
* Use fork of embedded-postgres for cache path
2022-06-15 16:02:18 -05:00
Dean Sheather
45eb1b4980
feat: improve terraform template parsing errors ( #2331 )
2022-06-16 04:12:17 +10:00
Dean Sheather
6be8a373e0
feat: run a terraform plan before creating workspaces with the given template parameters ( #1732 )
2022-06-02 00:44:53 +10:00
David Wahler
0c4a65b113
fix: manually fix coderd/database/dump.sql and make style/gen check run more reliably ( #1607 )
2022-05-19 22:37:22 +00:00
Garrett Delfosse
e2ed581708
Add stages to all proto.Logs ( #1563 )
2022-05-18 17:33:29 +00:00
Colin Adler
98ccd0eb89
feat: add README parsing to template versions ( #1500 )
2022-05-17 15:00:48 -05:00
Kyle Carberry
914a2f477c
fix: Restore terminal on interrupt when connecting ( #1312 )
...
Fixes #1292 .
2022-05-05 20:11:44 -05:00
Colin Adler
9319c39257
fix: additional provisionerd test double closes ( #1267 )
2022-05-03 08:02:54 -05:00
Kyle Carberry
603b7da413
test: Wrap provisionerd channel closes in sync.Once ( #1181 )
...
This caused a few flakes, so figured I'd tackle all of them:
https://github.com/coder/coder/runs/6167856950?check_suite_focus=true#step:9:246
2022-04-26 09:44:16 -05:00
Kyle Carberry
877854a2f3
fix: Display proper access URL on server start ( #1172 )
...
Fixes #1170 .
2022-04-25 23:30:22 +00:00
Kyle Carberry
947e8f9d2e
fix: Manually format external URL ( #1168 )
...
path.Join escaped the double slash!
2022-04-25 22:22:31 +00:00
Kyle Carberry
66d45f391e
test: Check if provisionerd is closed before setting run chan ( #1145 )
...
This race can be seen here:
https://github.com/coder/coder/runs/6159662393?check_suite_focus=true
2022-04-25 12:00:54 -05:00