Commit Graph

148 Commits

Author SHA1 Message Date
Kyle Carberry 5abfe5afd0
chore: rename dbfake to dbmem (#10432) 2023-10-30 17:42:20 +00:00
Spike Curtis 2a6fd90140
feat: add tailnet and agent API definitions (#10324)
Adds API definitions and packages for Tailnet and Agent APIs (API version 2.0)
2023-10-30 12:14:45 +04:00
Kayla Washburn 619df23ad1
chore: fix linting issues and generated files (#10317) 2023-10-17 14:41:35 -06:00
Kayla Washburn 71ad5909f2
chore: add icons.json file (#10085) 2023-10-06 13:46:37 -06: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
Kayla Washburn 2b5428e95f
refactor: start using emotion for styling (#9909) 2023-09-29 13:08:17 -06:00
Marcin Tojek 67fe3ae8d6
feat: clean stale provisioner files (#9545) 2023-09-11 07:37:14 +00:00
Ammar Bandukwala dd97fe2bce
chore(cli): replace lipgloss with coder/pretty (#9564)
This change will improve over CLI performance and "snappiness" as well as
substantially reduce our test times. Preliminary benchmarks show
`coder server --help` times cut from 300ms to 120ms on my dogfood
instance.

The inefficiency of lipgloss disproportionately impacts our system, as all help
text for every command is generated whenever any command is invoked.

The `pretty` API could clean up a lot of the code (e.g., by replacing
complex string concatenations with Printf), but this commit is too
expansive as is so that work will be done in a follow up.
2023-09-07 16:28:22 -05:00
Kyle Carberry da0ef92f77
Revert "feat: add boringcrypto builds for linux (#9528)" (#9529)
This reverts commit 79cd6047dc.
2023-09-05 08:37:07 -05:00
Spike Curtis 79cd6047dc
feat: add boringcrypto builds for linux (#9528)
* feat: add boringcrypto builds for linux

Signed-off-by: Spike Curtis <spike@coder.com>

* strip debug symbols, add BoringCryto to buildinfo

Signed-off-by: Spike Curtis <spike@coder.com>

* Fix TestVersion

Signed-off-by: Spike Curtis <spike@coder.com>

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2023-09-05 13:12:38 +00:00
Mathias Fredriksson a1025f92af
refactor(examples): pre-parse frontmatter via scripts/examplegen (#9514)
* refactor(examples): pre-parse frontmatter via scripts/examplegen

This removes 2 MB from the slim binary.

Ref: #9380
2023-09-04 20:15:29 +03:00
Spike Curtis 60d5002eb6
refactor: change template archive extraction to be on provisioner (#9264)
* refactor provisionersdk protocol

Signed-off-by: Spike Curtis <spike@coder.com>

* refactor provisioners to use new protocol

Signed-off-by: Spike Curtis <spike@coder.com>

* refactor provisionerd to use new protocol

Signed-off-by: Spike Curtis <spike@coder.com>

* refactor tests & proto renames

* Fixes from self-review

Signed-off-by: Spike Curtis <spike@coder.com>

* appease fmt & link

Signed-off-by: Spike Curtis <spike@coder.com>

* code review fixes & e2e fixes

Signed-off-by: Spike Curtis <spike@coder.com>

* More fmt

Signed-off-by: Spike Curtis <spike@coder.com>

* Code review fixes

Signed-off-by: Spike Curtis <spike@coder.com>

* new gen; use uuid for session workdir

Signed-off-by: Spike Curtis <spike@coder.com>

* Revert nix-based gen CI task until dogfood is on nix

Signed-off-by: Spike Curtis <spike@coder.com>

* revert deleting dogfood Docker stuff

Signed-off-by: Spike Curtis <spike@coder.com>

* Revert "revert deleting dogfood Docker stuff"

This reverts commit 9762158167.

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2023-08-25 06:10:15 +00:00
Mathias Fredriksson 6b69abfec7
fix(coderd): use stable sorting for insights and improve test coverage (#9250)
Fixes #9213
2023-08-24 13:36:40 +03:00
Kyle Carberry 22e781eced
chore: add /v2 to import module path (#9072)
* chore: add /v2 to import module path

go mod requires semantic versioning with versions greater than 1.x

This was a mechanical update by running:
```
go install github.com/marwan-at-work/mod/cmd/mod@latest
mod upgrade
```

Migrate generated files to import /v2

* Fix gen
2023-08-18 18:55:43 +00:00
Marcin Tojek ea34ec7538
chore(site): regenerate provisioner stub (#9151) 2023-08-18 10:50:43 +02:00
Spike Curtis ff9252c706
feat: add provisioner chart to release and docs (#9050)
* Add provisioner chart to release and docs

Signed-off-by: Spike Curtis <spike@coder.com>

* Update docs/admin/provisioners.md

Co-authored-by: Muhammad Atif Ali <atif@coder.com>

* Prettier

Signed-off-by: Spike Curtis <spike@coder.com>

* spell out PSK first time per section

Co-authored-by: Cian Johnston <cian@coder.com>

---------

Signed-off-by: Spike Curtis <spike@coder.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
Co-authored-by: Cian Johnston <cian@coder.com>
2023-08-16 16:26:38 +04:00
Spike Curtis 21af020386
feat: add external provisioner daemon helm chart (#8939)
* Refactor helm to extract common templates to libcoder

Signed-off-by: Spike Curtis <spike@coder.com>

* Remove comment from libcoder Chart.yaml

Signed-off-by: Spike Curtis <spike@coder.com>

* Add provisioner helm chart

* Fix prettier, linting, docs

Signed-off-by: Spike Curtis <spike@coder.com>

* Log at INFO when provisionerd connects to coderd

Signed-off-by: Spike Curtis <spike@coder.com>

* remove unnecessary exports in helm tests

Signed-off-by: Spike Curtis <spike@coder.com>

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2023-08-10 13:59:43 +04:00
Colin Adler 4b81cfaa0d
chore: switch from `yarn` to `pnpm` (#8822) 2023-08-02 13:28:16 -05:00
Ammar Bandukwala c9ade6f6c5
chore: enforce that site icons are .svg (#8684) 2023-07-23 16:27:11 -05:00
Bruno Quaresma acc12d3426
feat: add offline docs (#8527) 2023-07-19 13:57:57 -03:00
Cian Johnston 4e42c33769
chore(Makefile): specify count=1 instead of cleaning test cache (#8359)
* chore(Makefile): specify count=1 instead of cleaning test cache

* Update Makefile

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>

* add comment to test-clean target

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2023-07-07 12:16:16 +01:00
Cian Johnston 259453007e
chore(Makefile): add test-race target (#8357)
* chore(Makefile): add test-race target

* fixup! chore(Makefile): add test-race target
2023-07-07 10:15:50 +00:00
Mathias Fredriksson 1d746b901b
fix(Makefile): add dbmock to swagger deps and improve performance (#8332) 2023-07-06 10:59:08 +03:00
Kyle Carberry bbb0fab1de
chore: merge database gen scripts (#8073)
* chore: merge database gen scripts

* Fix type params gen

* Merge enum into dbgen
2023-06-20 16:24:33 +00:00
Kyle Carberry 8ac68c95a4
chore: lazily initialize find commands in makefile (#8030)
Improves make performance for small targets!
2023-06-14 13:17:16 -05:00
Kyle Carberry 7d54fd5e0d
chore: rename store to dbmock for consistency (#8013) 2023-06-13 13:57:43 -05:00
Kyle Carberry 28f35393e7
chore: generate and order dbfake funcs automatically (#7986)
* chore: rename `databasefake` to `dbfake`

* Remove unused method

* chore: add generation to dbfake

* Auto gen on make gen

* Fix preserving imports

* gen dbfake

* Add goimports

* Fix the makefile

* Make it panic instead of a comment
2023-06-12 17:40:58 -05:00
Kyle Carberry 6ac7d86c93
chore: prevent gen from rerunning every time (#7985) 2023-06-12 14:45:17 -05:00
Ammar Bandukwala a540e629e5
ci: improve caching (#7954) 2023-06-12 12:09:54 -05:00
Ammar Bandukwala 71c908974c
ci: improve caching (#7943) 2023-06-09 16:46:44 -05:00
Steven Masley 065206345e
test: add golden files to enterprise cli (#7924)
* test: Add golden files to enterprise cli
2023-06-09 11:35:20 -05:00
Dean Sheather c60ea38691
chore: use gcr.io for postgres image in CI (#7935) 2023-06-09 13:39:55 +00:00
Ammar Bandukwala 555ea64669
ci: deduplicate language setup (#7753)
* Deduplicate actions

* Split up go-race and go-pg
2023-06-01 08:20:49 +00: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
Kyle Carberry a08e8a16ab
chore: switch `make test` to use the standard go format (#7519)
I find it easier to read.
2023-05-14 21:20:19 -05:00
Kyle Carberry 26490aecca
chore: improve postgres test time by removing cleanup (#7522)
We don't need to delete databases on cleanup... and we don't need to
always run without a cache either!
2023-05-14 15:32:44 -05:00
Dean Sheather 667d9a7557
chore: add workspaceProxy to helm chart (#7398) 2023-05-05 07:07:49 +10:00
Dean Sheather fa5387ce07
chore: fix make gen (#7190) 2023-04-18 17:56:52 +00:00
Steven Masley 9d39371ee0
feat: Option to remove WorkspaceExec from `owner` role (#7050)
* chore: Add AllResources option for listing all RBAC objects
* Owners cannot do workspace exec site wide
* Fix FE authchecks to valid RBAC resources
2023-04-11 08:57:23 -05:00
Ammar Bandukwala 4b99e2d07e
feat: add YAML support to server (#6934) 2023-04-07 22:58:21 +00:00
Mathias Fredriksson d9d44c1188
ci: Print go test stats (#6855)
Fixes #6676
2023-04-03 11:07:25 +00:00
Ammar Bandukwala 2bd6d2908e
feat: convert entire CLI to clibase (#6491)
I'm sorry.
2023-03-23 17:42:20 -05:00
Cian Johnston 9b2abf0952
chore(helm): add unit tests for helm chart (#6557)
This PR adds a minimum set of Helm tests for the Helm chart.
It's heavily based on the approach in [1], but uses a golden-files-based approach instead.
It also runs helm template directly instead of importing the entire Kubernetes API.
Golden files can be updated by running go test ./helm/tests -update or by running make update-golden-files.

[1] https://github.com/coder/enterprise-helm

Fixes #6552
2023-03-13 13:48:44 +00:00
Ammar Bandukwala 3b73321a6c
feat: refactor deployment config (#6347) 2023-03-07 15:10:01 -06:00
Kyle Carberry 8a4a179565
fix: use proper generated cli.md for deploy (#6323) 2023-02-23 11:07:57 -06:00
Ammar Bandukwala f6a8c360e5
feat(docs): rework CLI docs (#6312) 2023-02-23 01:53:21 +00:00
Ammar Bandukwala f05609b4da
chore: format Go more aggressively 2023-02-18 18:32:09 -06:00
Cian Johnston 571f5d0e02
chore: add log_statement=all for test-postgres-docker (#6025) 2023-02-03 18:58:31 +00:00
Mathias Fredriksson 981cac5e28
chore: Invert `delay_login_until_ready`, now `login_before_ready` (#5893) 2023-01-27 20:07:47 +00:00