Cian Johnston
aca5be5e50
feat(provisionersdk): allow variadic tags in provisionersdk.MutateTags ( #15518 )
...
Relates to https://github.com/coder/coder/issues/15087 and
https://github.com/coder/coder/issues/15427
Allows specifying multiple sets of provisioner tags into `MutateTags`.
These tags get additively merged.
This will simplify handling tags from multiple sources when sniffing
tags from the template.
2024-11-15 12:31:02 +00:00
Marcin Tojek
23470789f1
fix: ignore cancellation error in test ( #15532 )
...
Fixes: https://github.com/coder/internal/issues/211
2024-11-15 12:20:35 +01:00
Marcin Tojek
e7ab3e1b6a
chore: log cancellation error in test ( #15511 )
...
Related: https://github.com/coder/internal/issues/211
2024-11-14 12:47:00 +01:00
Cian Johnston
4a6b28f5df
feat(provisioner): add support for workspace_owner_login_type ( #15499 )
...
- Adds support for the `coder_workspace_owner.login_type` attribute.
- Adds a currently disabled test for `coder_workspace_owner.login_type`
2024-11-13 15:34:58 +00:00
Danny Kopping
b9d441ff5f
fix: use concurrency-safe bytes buffer to avoid race ( #15142 )
...
Fixes https://github.com/coder/internal/issues/93
`bytes.Buffer` is not concurrency-safe.
`cmd` could write to the buffer concurrently while we're reading the
buffer in
```
require.Eventually(t, func() bool {
return bytes.Contains(output.Bytes(), []byte("ERROR: Downloaded agent binary returned unexpected version output"))
}, testutil.WaitShort, testutil.IntervalSlow)
```
Not sure about the `os: process already finished` flake, though.
---------
Signed-off-by: Danny Kopping <danny@coder.com >
2024-10-21 17:24:18 +11:00
Marcin Tojek
bab17a3556
test: improve logging around TestAgentScript ( #15121 )
2024-10-17 13:06:34 +02:00
Danielle Maywood
25f1ddbf5e
feat: add 'hidden' option to 'coder_app' to hide app from UI ( #14570 )
...
Add 'hidden' property to 'coder_app' resource to allow hiding apps from the UI.
2024-09-09 14:39:32 +01:00
Danny Kopping
6960d194ae
feat: add provisioning timings to understand slow build times ( #14274 )
2024-08-21 14:18:58 +02:00
Kyle Carberry
893169c83b
fix: duplicate tags map in mutation to resolve race ( #14047 )
...
* fix: duplicate tags map in mutation to resolve race
See: https://github.com/coder/coder/actions/runs/10149619748/job/28064952716?pr=14046
* Fix deployment values race
2024-07-30 07:37:13 +00:00
Marcin Tojek
c4f1676055
feat: expose workspace build ID to terraform-plugin-coder ( #13680 )
2024-06-27 10:07:30 +02:00
Danny Kopping
59ab5053b1
fix: return error if agent init script fails to download valid binary ( #13280 )
2024-05-30 13:33:00 +02:00
Cian Johnston
cca3cb1c55
feat(provisioner): pass owner git ssh key ( #13366 )
2024-05-29 11:43:08 +01:00
Marcin Tojek
b8b80fe6d2
feat: store coder_workspace_tags in the database ( #13294 )
2024-05-20 13:30:19 +00:00
Steven Masley
4dc293d930
chore: add date information to windows startup logs ( #12905 )
2024-04-10 09:41:05 -05:00
Garrett Delfosse
f96ce80ab9
feat: add owner groups to workspace data ( #12841 )
2024-04-05 15:06:17 -04:00
Kyle Carberry
7698cfda72
chore: remove unnecessary extraction library ( #12847 )
...
This was allocating ~256KB on init.
2024-04-02 11:19:54 -04:00
Spike Curtis
51491fc01b
fix(provisionersdk): change test to use bash script instead of binary echo ( #12759 )
...
Just upgraded to macOS 14.4 and TestAgentScript/Run fails for me with error `signal: killed`. I opened the test directory in a terminal and sure enough, when you execute the `echo` binary, it is immediately killed. The binary has no extended attributes and is byte-identical to the one in `/bin/`.
This fix uses a different strategy: instead of copying the `echo` binary from the system around, we just copy a small bash script that _calls_ the `echo` command.
2024-03-26 14:37:20 +04:00
Kyle Carberry
a6b8f381f0
feat: support windows containers in bootstrap script ( #12662 )
...
Fixes #7462 .
2024-03-22 14:48:51 +00:00
Cian Johnston
bed61f7d2a
fix(coderd): correctly handle tar dir entries with missing path separator ( #12479 )
...
* coderd: add test to reproduce trailing directory issue
* coderd: add trailing path separator to dir entries when converting to zip
* provisionersdk: add trailing path separator to directory entries
2024-03-11 14:06:41 +00:00
Kayla Washburn-Love
475c3650ca
feat: add support for optional external auth providers ( #12021 )
2024-02-21 11:18:38 -07:00
Cian Johnston
643c3ee54b
refactor(provisionerd): move provisionersdk.VersionCurrent -> provisionerdproto.VersionCurrent ( #12225 )
2024-02-20 12:44:19 +00:00
Cian Johnston
a2cbb0f87f
fix(enterprise/coderd): check provisionerd API version on connection ( #12191 )
2024-02-16 18:43:07 +00:00
Marcin Tojek
7a453608c9
feat: support order property of coder_agent ( #12121 )
2024-02-15 13:33:13 +01:00
Marcin Tojek
3e68650791
feat: support order property of coder_app resource ( #12077 )
2024-02-12 15:11:31 +01:00
Marcin Tojek
c0e169ebf9
feat: support custom order of agent metadata ( #12066 )
2024-02-08 17:29:34 +01:00
Marcin Tojek
5eb3e1cdaa
feat: expose owner_name in coder_workspace resource ( #11639 )
2024-01-17 13:20:45 +01:00
Cian Johnston
04fd96a014
feat(coderd): add provisioner_daemons to /debug/health endpoint ( #11393 )
...
Adds a healthcheck for provisioner daemons to /debug/health endpoint.
2024-01-08 09:29:04 +00:00
Cian Johnston
4355894b2b
fix(coderd/database): revert addition of v prefix to provisioner_daemons.api_version ( #11403 )
...
"Reverts" #11385 by adding an inverse migration.
2024-01-04 11:47:31 +00:00
Cian Johnston
f80a1cf3c8
fix(coderd/database): add missing v prefix to provisioner_daemons.api_version ( #11385 )
2024-01-03 14:11:02 +00:00
Cian Johnston
1ef96022b0
feat(coderd): add provisioner build version and api_version on serve ( #11369 )
...
* assert provisioner daemon version and api_version in unit tests
* add build info in HTTP header, extract codersdk.BuildVersionHeader
* add api_version to codersdk.ProvisionerDaemon
* testutil.MustString -> testutil.MustRandString
2024-01-03 09:01:57 +00:00
Cian Johnston
213b768785
feat(coderd): insert provisioner daemons ( #11207 )
...
* Adds UpdateProvisionerDaemonLastSeenAt
* Adds heartbeat to provisioner daemons
* Inserts provisioner daemons to database upon start
* Ensures TagOwner is an empty string and not nil
* Adds COALESCE() in idx_provisioner_daemons_name_owner_key
2023-12-18 16:44:52 +00:00
Marcin Tojek
89d8a293f0
fix: tar: do not archive .tfvars ( #11208 )
2023-12-15 11:15:12 +01:00
Spike Curtis
9a4e1100fa
chore: move drpc transport tools to codersdk/drpc ( #11224 )
...
Part of #10532
DRPC transport over yamux and in-mem pipes was previously only used on the provisioner APIs, but now will also be used in tailnet. Moved to subpackage of codersdk to avoid import loops.
2023-12-15 12:41:39 +04:00
Jon Ayers
06394a5b8c
Revert "fix: prevent data race when mutating tags ( #11200 )" ( #11216 )
...
This reverts commit 82f7b0cef4 .
2023-12-14 12:37:55 -06:00
Jon Ayers
82f7b0cef4
fix: prevent data race when mutating tags ( #11200 )
2023-12-14 08:56:59 +00:00
Cian Johnston and Marcin Tojek
4f7ae6461b
feat(coderd/database): add UpsertProvisionerDaemons query ( #11178 )
...
Co-authored-by: Marcin Tojek <marcin@coder.com >
2023-12-13 12:31:40 +00:00
Ammar Bandukwala
19c0cfdabf
chore(provisionersdk): add test for not following symlinks ( #11165 )
2023-12-12 14:44:50 -06:00
Mathias Fredriksson
3e5d292135
feat: add support for coder_env ( #11102 )
...
Fixes #10166
2023-12-11 16:10:18 +02:00
Cian Johnston
2b19a2369f
chore(coderd): move provisionerd tags to provisionersdk ( #11100 )
2023-12-08 12:10:25 +00:00
Cian Johnston
0534f8f59b
fix(provisionersdk): use mtime instead of atime for session cleanup ( #10893 )
...
See #10892
- Updates provisionersdk session cleanup to use mtime instead of atime.
- Also runs go mod tidy.
2023-11-27 16:21:59 +00:00
Marcin Tojek
0e5eecd7da
feat: add more logging around echo tar ( #10731 )
2023-11-16 16:52:04 +01:00
Colin Adler
39846d69d3
feat: modify agent install script to give CAP_NET_ADMIN if available ( #9908 )
2023-10-03 17:34:29 -05:00
Kyle Carberry
5596fb20b5
chore: move /gitauth to /externalauth on the frontend ( #9954 )
...
* chore: move `/gitauth` to `/externalauth` on the frontend
This actually took a lot more jank than anticipated,
so I wanted to split this up before adding the ability
to embed new providers.
* Rename FE
* Fix em' up
* Fix linting error
* Fix e2e tests
* chore: update helm golden files
2023-09-30 14:30:01 -05:00
Kyle Carberry
8abca9bea7
chore: rename git_auth to external_auth in our schema ( #9935 )
...
* chore: rename `git_auth` to `external_auth` in our schema
We're changing Git auth to be external auth. It will support
any OAuth2 or OIDC provider.
To split up the larger change I want to contribute the schema
changes first, and I'll add the feature itself in another PR.
* Fix names
* Fix outdated view
* Rename some additional places
* Fix sort order
* Fix template versions auth route
* Fix types
* Fix dbauthz
2023-09-29 19:13:20 +00:00
Kyle Carberry and Muhammad Atif Ali
1262eef2c0
feat: add support for coder_script ( #9584 )
...
* Add basic migrations
* Improve schema
* Refactor agent scripts into it's own package
* Support legacy start and stop script format
* Pipe the scripts!
* Finish the piping
* Fix context usage
* It works!
* Fix sql query
* Fix SQL query
* Rename `LogSourceID` -> `SourceID`
* Fix the FE
* fmt
* Rename migrations
* Fix log tests
* Fix lint err
* Fix gen
* Fix story type
* Rename source to script
* Fix schema jank
* Uncomment test
* Rename proto to TimeoutSeconds
* Fix comments
* Fix comments
* Fix legacy endpoint without specified log_source
* Fix non-blocking by default in agent
* Fix resources tests
* Fix dbfake
* Fix resources
* Fix linting I think
* Add fixtures
* fmt
* Fix startup script behavior
* Fix comments
* Fix context
* Fix cancel
* Fix SQL tests
* Fix e2e tests
* Interrupt on Windows
* Fix agent leaking script process
* Fix migrations
* Fix stories
* Fix duplicate logs appearing
* Gen
* Fix log location
* Fix tests
* Fix tests
* Fix log output
* Show display name in output
* Fix print
* Return timeout on start context
* Gen
* Fix fixture
* Fix the agent status
* Fix startup timeout msg
* Fix command using shared context
* Fix timeout draining
* Change signal type
* Add deterministic colors to startup script logs
---------
Co-authored-by: Muhammad Atif Ali <atif@coder.com >
2023-09-25 16:47:17 -05:00
Ammar Bandukwala
b63dfe7b75
perf(cli): optimize CPU consumption of help pages ( #9607 )
...
This change reduces the CPU consumption of --help by ~50%.
Also, this change removes ANSI escape codes from our golden files. I
don't think those were worth the inability to parallelize golden file tests and
global state fragility.
2023-09-14 19:48:29 -05:00
Steven Masley
0e4d6896e3
test: fix cleanup order on provisioner daemon work dir ( #9668 )
...
* test: fix cleanup order on provisioner daemon work dir
* Reduce the test race condition
2023-09-13 13:13:08 -05:00
Jon Ayers
3dc1e22d56
feat: add template_id and template_name to workspace data source ( #9655 )
2023-09-13 11:09:08 -05:00
Marcin Tojek
67fe3ae8d6
feat: clean stale provisioner files ( #9545 )
2023-09-11 07:37:14 +00:00
Spike Curtis
11b6068112
feat: add support for networked provisioners ( #9593 )
...
* Refactor provisionerd to use interface to connect to provisioners
Signed-off-by: Spike Curtis <spike@coder.com >
* feat: add support for networked provisioners
Signed-off-by: Spike Curtis <spike@coder.com >
* fix token length and linting
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-09-08 09:53:48 +00:00