Commit Graph

170 Commits

Author SHA1 Message Date
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
Bruno Quaresma e0d48e7d79
docs: Add CLI docs (#5879) 2023-01-27 18:10:40 +00:00
Kira Pilot e2bea2d20f
chore: autogenerate audit log documentation (#5862)
* added script for table creation

* added tags to audit-logs.md

* removed log

* removed empty block line

* PR feedback

* modify check_unstaged

* third times the charm maybe

* spelling

* relative path

* excluding from the right script this time

* sorted resources to ensure table order

* running make cmd

* running make again

* ensuring order on subtable
2023-01-26 18:12:12 -05:00
Mathias Fredriksson 2ed70c7af9
chore: Fix make gen for docs/manifest.json (#5792) 2023-01-19 18:16:36 +00:00
Dean Sheather b55cb0cc73
chore: add trivy vulnerability scanning (#5729) 2023-01-17 03:43:37 +10:00
Mathias Fredriksson f3bbf627a3
chore: Update gotestsum to v1.9.0 and remove debugging (#5726)
* chore: Update gotestsum to v1.9.0 and remove debugging

* chore: Update cloud.google.gpg to fix dogfood build
2023-01-16 17:58:57 +02:00
Marcin Tojek d9436fab69
docs: API enterprise (#5625)
* docs: audit, deploymentconfig, files, parameters

* Swagger comments in workspacebuilds.go

* structs in workspacebuilds.go

* workspaceagents: instance identity

* workspaceagents.go in progress

* workspaceagents.go in progress

* Agents

* workspacebuilds.go

* /workspaces

* templates.go, templateversions.go

* templateversion.go in progress

* cancel

* templateversions

* wip

* Merge

* x-apidocgen

* NullTime hack not needed anymore

* Fix: x-apidocgen

* Members

* Fixes

* Fix

* WIP

* WIP

* Users

* Logout

* User profile

* Status suspend activate

* User roles

* User tokens

* Keys

* SSH key

* All

* Typo

* Fix

* Entitlements

* Groups

* SCIM

* Fix

* Fix

* Clean templates

* Sort API pages

* Fix: HashedSecret

* General is first
2023-01-11 16:05:42 +01:00
Marcin Tojek e67d131514
docs: audit, deploymentconfig, files, parameters (#5506)
* docs: audit, deploymentconfig, files, parameters

* Fix: mark as binary

* Fix: show format in docs

* Fix: use .swaggo

* Fix: swagger notice

* Swagger notice
2023-01-03 19:21:10 +01:00
Mathias Fredriksson 856f0ab6f5
chore: Improve project-wide prettier formatting and ignored files (#5505)
* chore: Improve project-wide prettier formatting and ignored files

* chore: `Run make fmt/prettier`

* Fix gitignore for `.vscode` folder so that ! works

* Add comment in `.prettierrc.yaml` to explain `.editorconfig`

* Remove scripts/apidocgen/markdown-template/README.md

* Use `yq` for processing prettierrc, update lib.sh dependency check

* Add `yq` to Dockerfile and Nix
2023-01-03 15:11:13 +02:00
Mathias Fredriksson bae69df8f9
build: Fix site/bin tar/zstd build step in rare error cases (#5495) 2022-12-21 22:59:49 +02:00
Marcin Tojek dc6d271293
feat: Build framework for generating API docs (#5383)
* WIP

* Gen

* WIP

* chi swagger

* WIP

* WIP

* WIP

* GetWorkspaces

* GetWorkspaces

* Markdown

* Use widdershins

* WIP

* WIP

* WIP

* Markdown template

* Fix: makefile

* fmt

* Fix: comment

* Enable swagger conditionally

* fix: site

* Default false

* Flag tests

* fix

* fix

* template fixes

* Fix

* Fix

* Fix

* WIP

* Formatted

* Cleanup

* Templates

* BEGIN END SECTION

* subshell exit code

* Fix

* Fix merge

* WIP

* Fix

* Fix fmt

* Fix

* Generic api.md page

* Fix merge

* Link pages

* Fix

* Fix

* Fix: links

* Add icon

* Write manifest file

* Fix fmt

* Fix: enterprise

* Fix: Swagger.Enable

* Fix: rename apidocs to apidoc

* Fix: find -not -prune

* Fix: json not available

* Fix: rename Coderd API to Coder API

* Fix: npm exec

* Fix: api dir

* Fix: by ID

* Fix: string uuid

* Fix: include deleted

* Fix: indirect go.mod

* Fix: source lib.sh

* Fix: shellcheck

* Fix: pushd popd

* Fix: fmt

* Fix: improve workspaces

* Fix: swagger-enable

* Fix

* Fix: mention only HTTP 200

* Fix: IDs

* Fix: https

* Fix: icon

* More APis

* Fix: format swagger.json

* Fix: SwaggerEndpoint

* Fix: SCRIPT_DIR

* Fix: PROJECT_ROOT

* Fix: use code tags in schemas.md

* Fix: examples

* Fix: examples

* Fix: improve format

* Fix: date-time,enums

* Fix: include_deleted

* Fix: array of

* Fix: parameter, response

* Fix: string time or null

* Workspaces: more docs

* Workspaces: more docs

* Fix: renderDisplayName

* Fix: ActiveUserCount

* Fix

* Fix: typo

* Templates: docs

* Notice: incomplete
2022-12-19 18:43:46 +01:00
Mathias Fredriksson 9983c07e13
build: Improve speed of `find` commands in Makefile (#5463) 2022-12-19 14:41:36 +02:00
Mathias Fredriksson 44c10bbe3c
build: Fix parallelism of make -j build (#5438) 2022-12-15 18:36:37 +02:00
Marcin Tojek a973c35a02
chore: collect gotestsum TestEvents as workflow artifacts (#5336) 2022-12-07 15:04:39 +01:00
Marcin Tojek cec667d309
fix: prettier misses docs directory (#5285)
* chore: keep admin/prometheus.md if make target fails

* Address PR comments

* Formatted

* fix: prettier misses docs

* make fmt

* More md files
2022-12-05 12:21:09 +01:00
Marcin Tojek ee4f0fc592
chore: enable debug logging for gotestsum (#5248) 2022-12-02 12:35:14 +01:00
Marcin Tojek 38bdae7016
docs: Prometheus metrics + generator (#5179)
* docs: Prometheus metrics

* Fix

* Typo

* Typo

* Typo

* Fix: link

* Update docs/admin/prometheus.md

Co-authored-by: Dean Sheather <dean@deansheather.com>

* Update docs/admin/prometheus.md

Co-authored-by: Dean Sheather <dean@deansheather.com>

* Update docs/admin/prometheus.md

Co-authored-by: Dean Sheather <dean@deansheather.com>

* Update docs/admin/prometheus.md

Co-authored-by: Dean Sheather <dean@deansheather.com>

* Update docs/admin/prometheus.md

Co-authored-by: Dean Sheather <dean@deansheather.com>

* Rephrase

* notice

* use ```shell

* Generator

* gosec

* fix: lint

* PR comments

* not needed anymore

Co-authored-by: Dean Sheather <dean@deansheather.com>
Co-authored-by: Geoffrey Huntley <ghuntley@ghuntley.com>
2022-11-30 17:39:51 +01:00
Ammar Bandukwala 73f91e4690
ci: use big runners (#4990)
* chore: Close idle connections on test cleanup

It's possible that this was the source of a leak on Windows...

* ci: use big runners

* fix: Improve tailnet connections by reducing timeouts

This awaits connection ping before running a dial. Before,
we were hitting the TCP retransmission and handshake timeouts,
which could intermittently add 1 or 5 seconds to a connection
being initialized.

* Add logging to Startupscript test

* Add better logging

* Write startup script logs to fs dir

* Fix startup script test

* Fix startup script test

* Reduce test timeout

* Use central tmp dir in agent

* Adjust output

* Skip startup script test on Windows

Co-authored-by: Kyle Carberry <kyle@carberry.com>
2022-11-13 14:23:23 -06:00
Mathias Fredriksson 5592f85c11
chore: Find source files once in Makefile targets (#4968) 2022-11-09 18:39:42 +02:00
Mathias Fredriksson 587924fc42
feat: Add golden files to test cli help output (#4897) 2022-11-04 19:48:36 +02:00
Dean Sheather 067362cf31
feat: add windows amd64 installer (#4719) 2022-10-26 00:19:54 +10:00
Bruno Quaresma 2a7fe13397
chore: Remove extra typegen (#4243) 2022-09-28 16:58:50 +00:00
Dean Sheather 6deef06ad2
feat: secure and cross-domain subdomain-based proxying (#4136)
Co-authored-by: Kyle Carberry <kyle@carberry.com>
2022-09-22 22:30:32 +00:00
Kyle Carberry 714c366d16
chore: Remove WebRTC networking (#3881)
* chore: Remove WebRTC networking

* Fix race condition

* Fix WebSocket not closing
2022-09-19 19:46:29 -05:00
Dean Sheather 6e9c05f859
chore: use zstd -6 in dev (#4092) 2022-09-16 16:03:16 +00:00
Mathias Fredriksson 21664c5c58
fix: Revert change from zstd level 22 to level 6 compression (#4086) 2022-09-16 18:36:11 +03:00
Dean Sheather 819622182b
chore: parallel makefile attempt 3 (#3926)
* Revert "chore: Revert parallel Makefile builds (#3918)"

This reverts commit b077f71015.

* fix: fix release workflow with parallel makefile

* fix: mark generated files as fresh during releases
2022-09-08 02:40:17 +10:00
Kyle Carberry b077f71015
chore: Revert parallel Makefile builds (#3918)
This was breaking the release process. Namely it was running
the `gen` targets due to the dependency tree, which was failing
on macOS and Linux runners. This revert can be reverted once
we fix that up.
2022-09-07 01:56:51 +00:00
Dean Sheather 419d701927
chore: parallel builds with Makefile (#3854)
* Revert "revert: Makefile buff-ification (#3700) (#3848)"

This reverts commit e490bdd531.

* fix: fix slim targets in makefile

* fix: don't clobber slim binaries, make sure they're in the correct location
2022-09-06 17:27:06 +00:00
Kyle Carberry e490bdd531
revert: Makefile buff-ification (#3700) (#3848)
This caused the following issues:
- Slim binaries weren't being updated.
- The coder.tar.ztd was misplaced.
- There is no coder.sha1 file with proper filenames.

This should be reintroduced in a future change with those fixes.
2022-09-02 14:46:58 -05:00
Dean Sheather e1a4f3a16b
Makefile buff-ification (#3700)
Remove old go_build_matrix and go_build_slim scripts in favor of full makefile-ification.
2022-09-02 12:58:23 +00:00
Ammar Bandukwala 30f8fd9b95
Daily Active User Metrics (#3735)
* agent: add StatsReporter

* Stabilize protoc
2022-09-01 14:58:23 -05:00
Mathias Fredriksson dc9b4155e0
feat: Generate DB unique constraints as enums (#3701)
* feat: Generate DB unique constraints as enums

This fixes a TODO from #3409.
2022-08-29 14:56:51 +03:00
Mathias Fredriksson 7a71180ae6
chore: Enable comments for database dump / models (#3661) 2022-08-24 12:44:30 +00:00
Spike Curtis 690e6c6585
Check AGPL code doesn't import enterprise (#3602)
* Check AGPL code doesn't import enterprise

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

* use error/log instead of echo/exit

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

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-19 17:49:08 +00:00
Joe Previte aabb72783c
docs: update CONTRIBUTING requirements (#3541)
* docs: update CONTRIBUTING requirements

* Update docs/CONTRIBUTING.md

* refactor: remove dev from Makefile

* fixup: add linux section
2022-08-18 17:11:58 +00:00
Mathias Fredriksson d7dee2c069
fix: Improve code coverage reporting in codecov (#2715)
* fix: Remove explicit coverpkg github.com/coder/coder/codersdk

This package is already covered by ./...

* fix: Ignore test utils in coverage (clitest, coderdtest, ptytest)
2022-07-25 19:55:19 +03:00
Mathias Fredriksson 75ff579051
fix: Decrease postgres test timeout (`make test-postgres`) (#3108)
This commit lowers the postgres test timeout from 30m to 20m, currently
our postgres tests seem to take 8-10m, a 2x factor should suffice.
Comments were updated in both places to reflect the reasoning and
necessity of keeping these values in sync.

They used to take longer but the `count` was lowered in
3d40cb85b7.

The actual timeout value of `make test-postgres` got overlooked in
https://github.com/coder/coder/pull/3079.
2022-07-22 12:47:03 +03:00
Kyle Carberry 3d40cb85b7
fix: Reduce count to 1 for PostgreSQL tests (#2852)
It's unnecessary for these to run twice. It increases CI times  without
providing much additional assurance tests don't have race conditions.
This already runs with `-race` too.
2022-07-07 23:14:35 -05:00
Spike Curtis cb2d1f488a
fix: ci uses a migrated DB template (#2696)
Signed-off-by: Spike Curtis <spike@coder.com>
2022-06-28 14:42:19 -07:00
Kyle Carberry 6429dfee1f
test: Use a template to prevent migrations from running for every test (#2462)
* test: Use a template to prevent migrations from running for every test

* Create a single makefile target

* Fix built-in race

* Extend timeout of built-in PostgreSQL fetch
2022-06-27 17:07:39 +00:00
Colin Adler 05b67ab1cf
feat: peer wireguard (#2445) 2022-06-24 10:25:01 -05:00
Cian Johnston ac557e02b8
clean site/out and enforce make bin (#2604) 2022-06-23 15:16:27 +01:00
Cian Johnston dc7d6def8e
improve develop.sh (#2572)
- Running make dev now prompts you to run ./scripts/develop.sh manually, as GNU make does not appear to pass SIGINT to subprocesses.
- Added checks to develop.sh to ensure that coderd is listening before running our initial setup steps
- Add some more troubleshooting/debugging output to develop.sh
2022-06-22 14:02:31 +01:00
Mathias Fredriksson e2785ada5e
feat: Compress and extract slim binaries with zstd (#2533)
Fixes #2202

Co-authored-by: Dean Sheather <dean@deansheather.com>
2022-06-21 19:53:36 +03:00
Dean Sheather 075e891f28
Remove goreleaser in favor of build scripts (#2143) 2022-06-19 05:47:10 +10:00
Cian Johnston 0d2f0d7f8c
chore: apply non-durability settings to test postgres container (#2479)
This commit applies some recommended settings to sacrifice durability
for speed for our testing database:
  - Mount PGDATA dir on a tmpfs (--tmpfs /tmp)
  - Turn off fsync
  - Turn off synchronous_commit
  - Turn off full_page_writes

  Ref: https://www.postgresql.org/docs/current/non-durability.html
2022-06-17 20:57:38 +01:00
Spike Curtis a82c0eb560
Fix socket leak, clean up single use postgres databases (#2413)
* Fix socket leak, clean up single use postgres databases

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

* Move migrate close defer until after we know it is not nil

Signed-off-by: Spike Curtis <spike@coder.com>
2022-06-16 09:01:33 -07:00
Kyle Carberry 5e673cc544
test: Increase timeouts to reduce flakes (#2406)
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 14:52:45 +00:00
Ben Potter 46ffb67d60
feat: one-line install script (#1924)
* feat: one-line install script

* remove homebrew support

* remove arch linux

* use proper filename for packages

* fix variable format

* fix systemd instructions

* fixes to standalone script

* fix missing var bugs

* fix standalone install

* fix for MacOS

* format

* fix armv7 assets and zips

* remove windows

* update install docs

* support external sources with shellcheck

* shfmt

* add external sources to GitHub action & unfold

* change wording

* first template docs

* default to /usr/local instead

* add option for binary name
2022-06-01 14:15:09 -05:00
Mathias Fredriksson 608eb322a8
chore: Add .editorconfig, shfmt, shellcheck and subshell dir changes (#1649) 2022-05-27 20:15:19 +03:00
Mathias Fredriksson 12227874a8
fix: Detect changes to examples/templates in Makefile (#1829) 2022-05-27 16:34:32 +03:00
Cian Johnston a8a8f9dbf3
chore: skip some flaky tests (#1643)
* chore: skip some flaky tests

* Update peer/conn_test.go

* add makefile targets, reduce parallelism in go test
2022-05-21 00:39:51 +01:00
Garrett Delfosse 89fb59aa9a
chore: remove make build dep from make dev (#1557) 2022-05-18 16:00:20 +00:00
Garrett Delfosse 495c87b6c3
chore: add make dev (#1527) 2022-05-17 13:12:14 -05:00
Mathias Fredriksson 2d3dc436a8
feat: Implement unified pagination and add template versions support (#1308)
* feat: Implement pagination for template versions

* feat: Use unified pagination between users and template versions

* Sync codepaths between users and template versions

* Create requestOption type in codersdk and add test

* Fix created_at edge case for pagination cursor in queries

* feat: Add support for json omitempty and embedded structs in apitypings (#1318)

* Add scripts/apitypings/main.go to Makefile
2022-05-10 07:44:09 +00:00
Kyle Carberry 4c35b8174a
fix: Prefix paths in find on macOS (#1284)
This fixes paths not resolving in macOS, causing
the build target to fail. This also renames the
site target to specify the index.html, which is
the output artifact of building the site.
2022-05-04 09:47:48 -05:00
Kyle Carberry e4e60256ac
fix: Use "make build" on deploy (#1261)
This was a missed item in https://github.com/coder/coder/pull/1259.
2022-05-02 14:04:45 -05:00
Kyle Carberry dacc025cf3
fix: Adjust Makefile tagets to use dependencies (#1259)
It was getting slow to run `make gen` and other operations,
but this resolves it by targeting files properly.
2022-05-02 13:23:13 -05:00
Colin Adler 0c9f27c63b
fix: ensure frontend is built in `make install` (#1157) 2022-04-25 15:24:23 -05:00
Colin Adler d6c1c49868
fix: `make install` references incorrect folders (#1105) 2022-04-22 15:41:45 -05:00
Steven Masley 548de7d6f3
feat: User pagination using offsets (#1062)
Offset pagination and cursor pagination supported
2022-04-22 15:27:55 -05:00
Kyle Carberry 2a95917557
fix: Add site to release build (#1094)
This was accidentally removed when adding MacOS signing.
2022-04-20 14:06:07 -04:00
Bruno Quaresma b9933d493a
refactor: camel case files (#1081) 2022-04-19 11:18:12 -05:00
G r e y 5ce06769cd
chore: replace todos with issues (#1066) 2022-04-19 12:16:57 -04:00
Garrett Delfosse f46b4cf3da
feat: generate typescript types from codersdk structs (#1047) 2022-04-19 00:45:22 +00:00
Kyle Carberry 866205c145
feat: Sign MacOS binaries (#1060)
This fixes virus warnings when launching Coder on darwin.
2022-04-18 14:57:41 -05:00
Kyle Carberry 19b4323512
feat: Allow workspace resources to attach multiple agents (#942)
This enables a "kubernetes_pod" to attach multiple agents that
could be for multiple services. Each agent is required to have
a unique name, so SSH syntax is:

`coder ssh <workspace>.<agent>`

A resource can have zero agents too, they aren't required.
2022-04-11 16:06:15 -05:00
Colin Adler fd523100bf
chore: split queries.sql into files by table (#762) 2022-04-01 15:45:23 -05:00
Colin Adler 2b1a0ee126
chore: update v1 schema (#643) 2022-04-01 14:42:36 -05:00
Kyle Carberry e0172dd4d5
feat: Update README with highlights and getting started guide (#627) 2022-03-28 15:21:00 -05:00
Kyle Carberry a502a5fa14
feat: Add AWS instance identity authentication (#570)
* feat: Add AWS instance identity authentication

This allows zero-trust authentication for all AWS instances.

Prior to this, AWS instances could be used by passing `CODER_TOKEN`
as an environment variable to the startup script. AWS explicitly
states that secrets should not be passed in startup scripts because
it's user-readable.

* Fix sha256 verbosity

* Fix HTTP client being exposed on auth
2022-03-28 19:31:03 +00:00
Colin Adler be8389fd74
chore: update to go 1.18 (#628)
* add make lint to Makefile
2022-03-28 19:14:40 +00:00
Steven Masley 591523a078
chore: Move httpapi, httpmw, & database into `coderd` (#568)
* chore: Move httpmw to /coderd directory
httpmw is specific to coderd and should be scoped under coderd

* chore: Move httpapi to /coderd directory
httpapi is specific to coderd and should be scoped under coderd

* chore: Move database  to /coderd directory
database is specific to coderd and should be scoped under coderd

* chore: Update codecov & gitattributes for generated files
* chore: Update Makefile
2022-03-25 16:07:45 -05:00
Kyle Carberry 8c0f403546
fix: Build site in release (#561)
The static site wasn't being built before, resulting
in a directory listing!
2022-03-24 20:16:30 -05:00
Kyle Carberry ddd86ab547
feat: Add systemd service and production deployment (#545)
* feat: Add systemd service and production deployment

This modifies CI to use a dpkg produced from release to update and
run Coder on a tiny VM in GCP.

It's intentionally kept simple, because customers should
be able to get this same easy install experience.

* Update globalSetup.ts

* Update globalSetup.ts

* Update globalSetup.ts

* Update coder.yaml

* Use pinned version of Go
2022-03-24 15:07:33 +00:00
Kyle Carberry c451f4e685
feat: Add templates to create working release (#422)
* Add templates

* Move API structs to codersdk

* Back to green tests!

* It all works, but now with tea! 🧋

* It works!

* Add cancellation to provisionerd

* Tests pass!

* Add deletion of workspaces and projects

* Fix agent lock

* Add clog

* Fix linting errors

* Remove unused CLI tests

* Rename daemon to start

* Fix leaking command

* Fix promptui test

* Update agent connection frequency

* Skip login tests on Windows

* Increase tunnel connect timeout

* Fix templater

* Lower test requirements

* Fix embed

* Disable promptui tests for Windows

* Fix write newline

* Fix PTY write newline

* Fix CloseReader

* Fix compilation on Windows

* Fix linting error

* Remove bubbletea

* Cleanup readwriter

* Use embedded templates instead of serving over API

* Move templates to examples

* Improve workspace create flow

* Fix Windows build

* Fix tests

* Fix linting errors

* Fix untar with extracting max size

* Fix newline char
2022-03-22 13:17:50 -06:00
Colin Adler 01ab48724e
fix: correctly copy binaries in `make install` (#517)
Since it copied to a nested directory, it's very confusing if you
already had a `coder` binary in your `~/go/bin`, since it would always
prefer the `coder` in the higher directory.
2022-03-22 01:13:52 +00:00
Presley Pizzo 22f820c69b
refactor(site): replace UserContext with userXService (#465)
* Install and configure XState

* userXService - typegen not working yet

* Lint, fix error transitions

* Lint

* Change initial state to handle loss of state

* Fix gitignore

* Fix types by hook or by crook

* Use xservice in all pages

* Glue/visual component separation

* Fix dependency merge

* Lint

* Remove UserContext

* Remove inspector

* Add typegen command to site/out

* Fix index page redirects

* DRY up nav and redirects

* Moves based on merge

* Moving Page helpers into Page dir

* Move xservice into src, update script

* Move and storybook navbarview

* Update docs

* Install MSW

* Reorganization, with apologies

* Missed spots

* Add mock handlers

* Configure jest for msw

* Fix typos

* Shift unit test to NavbarView

* Fix test types

* Rename NavbarView test

* Attempt at test, wip

* Fix config

* Be logged out, only warn

* Conditionally show text to help test

* Use a Context for MSW's sake

* mocks -> test_helpers

* Enable dev tools

* Format

* Fix import

* Fixes

* Lint

* run typegen postinstall

Co-authored-by: Bryan Phelps <bryan@coder.com>
2022-03-18 14:07:08 -04:00