Commit Graph

168 Commits

Author SHA1 Message Date
Garrett Delfosse 8ba05a9052
feat: add switch http(s) button to error page (#12942) 2024-04-26 11:52:53 -04:00
Cian Johnston a04c76ce40
ci: release: test migrations before building (#13051) 2024-04-24 08:31:01 +01:00
Cian Johnston e57ca3cdaa
feat(scripts): add script to check schema between migrations (#13037)
- migrations: allow passing in a custom migrate.FS
- gen/dump: extract some functions to dbtestutil
- scripts: write script to test migrations
2024-04-23 12:43:14 +01:00
Kayla Washburn-Love c4b26f335a
test: verify that enterprise tests are being run (#12871) 2024-04-05 11:45:32 -06:00
elasticspoon cfb94284e0
feat(cli): add golden tests for errors (#11588) (#12698)
* feat(cli): add golden tests for errors (#11588)

Creates golden files from `coder/cli/errors.go`.
Adds a unit test to test against golden files.
Adds a make file command to regenerate golden files.
Abstracts test against golden files.
2024-04-01 09:19:26 -05:00
Cian Johnston 5454f4997b
chore(ci): clean up databases after test finishes in CI (#12702) 2024-03-21 14:53:16 +00:00
Mathias Fredriksson 5dd436c19b
feat(examples): add linting to all examples (#12595)
Fixes #12588
2024-03-14 16:49:44 +02:00
Danny Kopping 7a92154e67
Install pnpm before calling pnpm exec in make stages (#12471)
Signed-off-by: Danny Kopping <danny@coder.com>
2024-03-08 14:33:28 +02:00
Kayla Washburn-Love 0fe109d517
chore: sort imports in our typescript code (#12417) 2024-03-05 16:31:22 -07:00
Kayla Washburn-Love cbaf1c65ef
chore: clean out site/out/assets/ when building to prevent "too much data" errors (#12313) 2024-02-27 10:45:57 -07:00
Spike Curtis eb12fd7d92
feat: make ServerTailnet set peers lost when it reconnects to the coordinator (#11682)
Adds support to `ServerTailnet` to set all peers lost before attempting to reconnect to the coordinator. In practice, this only really affects `wsproxy` since coderd has a local connection to the coordinator that only goes down if we're shutting down or change licenses.
2024-01-23 13:17:56 +04:00
Spike Curtis f01cab9894
feat: use tailnet v2 API for coordination (#11638)
This one is huge, and I'm sorry.

The problem is that once I change `tailnet.Conn` to start doing v2 behavior, I kind of have to change it everywhere, including in CoderSDK (CLI), the agent, wsproxy, and ServerTailnet.

There is still a bit more cleanup to do, and I need to add code so that when we lose connection to the Coordinator, we mark all peers as LOST, but that will be in a separate PR since this is big enough!
2024-01-22 11:07:50 +04:00
Steven Masley e8be092af0
chore: add sqlc push action on releases (#11171)
* add sqlc push action on releases
* Make sqlc push optional
2023-12-19 20:31:55 +00:00
Cian Johnston fa91992976
ci: add audit docs gen dependency on db gen (#11231)
Audit docs gen depends on queries.sql.go so adding an explicit dependency
2023-12-15 11:49:19 +00:00
Steven Masley 6b4d908e7e
chore: makefile set sqlc-vet to .Phony (#11169) 2023-12-12 22:55:13 +00:00
Steven Masley e52d848d05
chore: validate queries using sqlc-vet in github actions (#11163) 2023-12-12 15:53:26 -06:00
Cian Johnston 197cd935cf
chore(Makefile): use linter version from dogfood Dockerfile (#11147)
* chore(Makefile): use golangci-lint version from dogfood Dockerfile

* chore(dogfood/Dockerfile): update golangci-lint to latest version

* chore(coderd): address linter complaints
2023-12-12 10:02:32 +00:00
Spike Curtis 2c86d0bed0
feat: support v2 Tailnet API in AGPL coordinator (#11010)
Fixes #10529
2023-12-06 15:04:28 +04:00
Mathias Fredriksson 6fe84025aa
chore(Makefile): exclude .terraform directories (#10988) 2023-12-01 15:13:51 +02:00
Spike Curtis 52901e1219
feat: implement HTMLDebug for PGCoord with v2 API (#10914)
Implements HTMLDebug for the PGCoordinator with the new v2 API and related DB tables.
2023-11-28 22:37:20 +04:00
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