Commit Graph

39 Commits

Author SHA1 Message Date
Steven Masley 7fd9a75ad9
chore: nix shell to support playwright e2e tests (#12917)
* chore: nix shell to support playwright e2e tests

nix is running an older version of chromium, so had to reduce the
playwright version.

* Add to e2e readme

* add enterprise test comment

* add note about install to readme

* make fmt

* remove shellhook message

Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>

* add link to nixos playwright package to get version

* formatting

---------

Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>
2024-04-10 14:08:25 -05:00
Danny Kopping 7a7105ad66
feat: make agent stats' cardinality configurable (#12535) 2024-03-13 12:03:36 +02:00
Cian Johnston 8f40ee3465
Revert "feat: make agent stats' cardinality configurable (#12468)" (#12533)
This reverts commit 21d1873d97.
2024-03-11 14:33:36 +00:00
Danny Kopping 21d1873d97
feat: make agent stats' cardinality configurable (#12468)
Closes #12221
2024-03-11 16:04:08 +02:00
Marcin Tojek b6806bca70
fix: nix: google-chrome installed conditionally (#12029) 2024-02-06 16:46:58 +01:00
Cian Johnston 6593de3c73
fix(dogfood/flake.nix): add google-chrome (#11974) 2024-02-02 15:56:06 +00:00
Muhammad Atif Ali 215a9d1b30
chore: experiment building dogfood image with nix (#11680) 2024-01-31 14:27:11 +00:00
Asher fa99f6a200
chore: make yarn use the right version of node (#11716)
Otherwise if for example you try to run `yarn storybook` it complains
that the version of Node is wrong.

`pnpm storybook` works fine and that is probably what we should
actually use, but as long as we are installing Yarn and not restricting
its use we might as well make it use the right version of Node.
2024-01-19 12:59:38 -09:00
Marcin Tojek b8373e6fab
fix: nix: force node version v18 (#11510) 2024-01-09 12:27:56 +01:00
Marcin Tojek fd43985e94
fix: nix: switch to go1.21.5 (#11183) 2023-12-13 14:41:18 +01:00
Marcin Tojek f2a91157a9
fix: update nix to include sqlc v1.24.0 (#11182) 2023-12-13 13:35:02 +01:00
Dean Sheather b07b40b346
chore: revert nix dogfood image (#11022)
The nix image isn't used because it doesn't work, and we haven't been
updating our "pre-nix" tag since the changes were made. Reverts back to
being a regular Dockerfile.
2023-12-05 09:02:57 +00:00
Anunaya Srivastava 5f0417d14e
Fix nix-shell on macos (#10591)
strace is unavailable on macos. flake.nix is updated to handle this
scenario.
2023-11-11 12:06:26 +03:00
Kyle Carberry 2a04d15c6d
chore: downgrade dogfood image to postgres 13 (#9228) 2023-08-21 19:26:31 +00:00
Kyle Carberry 07188b123a
chore: add dependencies for js-test to our nix flake (#9224) 2023-08-21 15:03:33 +00:00
Mathias Fredriksson 509411f87c
chore(flake.nix): add kubectx (#9219) 2023-08-21 15:54:22 +03:00
Cian Johnston 4de7de420e
fix(flake.nix): add gcloud auth plugin (#9215) 2023-08-21 10:58:34 +00:00
Kyle Carberry 2c83bfdfa5
fix: set the location of `locale_archive` (#9207)
See https://nixos.wiki/wiki/Locales
2023-08-19 22:37:44 +00:00
Kyle Carberry 40ef9ff779
fix: add sapling to the nix flake (#9202) 2023-08-18 16:41:03 -05:00
Cian Johnston 0d40e7fe24
chore(flake.nix): add gcloud and kubectl to flake (#9197) 2023-08-18 18:29:24 +00:00
Kyle Carberry 9e9c79dbd3
fix: remove nix bash from the dogfood image (#9195)
This was unnecessary.
2023-08-18 17:59:25 +00:00
Kyle Carberry 4c133e7058
fix: add yarn to the dogfood image (#9193) 2023-08-18 17:15:33 +00:00
Kyle Carberry c93782aba6
fix: allow chsh in dev image (#9191) 2023-08-18 16:15:05 +00:00
Kyle Carberry 9725ec0713
fix: separate dev shell and dev image nix deps (#9189)
* fix: separate dev shell and dev image nix deps

* Add less
2023-08-18 15:58:52 +00:00
Kyle Carberry e94ebea5e9
fix: add gh cli to the dogfood image (#9184) 2023-08-18 14:49:54 +00:00
Kyle Carberry 88de63f891
fix: add locale to dogfood image (#9181)
* fix: add locale to dogfood image

* Update flake.nix

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

* Add gcc

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2023-08-18 09:16:16 -05:00
Bruno Quaresma 8db3869415
chore: add zsh to dogfood (#9178) 2023-08-18 13:05:02 +00:00
Marcin Tojek 04810cb42e
fix: do not install strace on OSX (#9167) 2023-08-18 10:07:11 +02:00
Kyle Carberry c0a78533bf
chore: reduce build time by converting docker image to build with nix (#9099)
* Add Docker image

* Try building the container in CI

* Uncomment testing lines

* Trim image step

* Hit 'em with a Docker load

* Oopsie!

* Add a tag and push!

* Fix image name 🤦

* Fix sudo

* Fix target name

* Build and push

* Fix login to docker hub

* Revert to Docker push

* Fix PATH

* Fix SHA

* Fix ca certs

* Fix ca certs

* Fix coping files in

* Fix docker init

* Fix Docker group and init

* Add comments to our Nix

* Fix build stage

* Add some more comments

* Remove old dogfood image files

* Tag and push with branch name

* Fix tag passing

* Fix tag passing

* Remove old pull triggers

* Convert gen to use Nix

* Add protobuf to the flake

* Add prettier to the dev shell

* Swap to the faster Nix cache action

* Add the correct yq

* Fix gen

* Add make to the flake

* Update extensions
2023-08-17 21:19:36 -05:00
Asher b993cab49a
fix: use screen for reconnecting terminal sessions on Linux if available (#8640)
* Add screen backend for reconnecting ptys

The screen portion is a port from wsep.  There is an interface that lets
you choose between screen and the previous method.  By default it will
choose screen if it is installed but this can be overidden (mostly for
tests).

The tests use a scanner instead of a reader now because the reader will
loop infinitely at the end of a stream.

Replace /bin/bash with bash since bash is not always in /bin.

* Remove connection_id from reconnecting PTY logger

This serves multiple connections so it makes no sense to scope it to a
single connection.

Also lets us use "connection_id" when logging write errors instead of
"other_conn_id".

* Use PATH to test buffered reconnecting pty
2023-08-14 11:19:13 -08:00
Colin Adler 4b81cfaa0d
chore: switch from `yarn` to `pnpm` (#8822) 2023-08-02 13:28:16 -05:00
Marcin Tojek 5d2b2c577b
fix: add mockgen to nix env (#7682) 2023-05-25 12:44:32 -04: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
Kyle Carberry 026b1cd2a4
chore: update to go 1.20 (#5968)
Co-authored-by: Colin Adler <colin1adler@gmail.com>
2023-02-02 12:36:27 -06: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
Kyle Carberry e61234f260
feat: Add `vscodeipc` subcommand for VS Code Extension (#5326)
* Add extio

* feat: Add `vscodeipc` subcommand for VS Code Extension

This enables the VS Code extension to communicate with a Coder client.
The extension will download the slim binary from `/bin/*` for the
respective client architecture and OS, then execute `coder vscodeipc`
for the connecting workspace.

* Add authentication header, improve comments, and add tests for the CLI

* Update cli/vscodeipc_test.go

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

* Update cli/vscodeipc_test.go

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

* Update cli/vscodeipc/vscodeipc_test.go

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

* Fix requested changes

* Fix IPC tests

* Fix shell execution

* Fix nix flake

* Silence usage

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2022-12-18 17:50:06 -06:00
Kyle Carberry db0ba8588e
chore: Refactor Enterprise code to layer on top of AGPL (#4034)
* chore: Refactor Enterprise code to layer on top of AGPL

This is an experiment to invert the import order of the Enterprise
code to layer on top of AGPL.

* Fix Garrett's comments

* Add pointer.Handle to atomically obtain references

This uses a context to ensure the same value persists through
multiple executions to `Load()`.

* Remove entitlements API from AGPL coderd

* Remove AGPL Coder entitlements endpoint test

* Fix warnings output

* Add command-line flag to toggle audit logging

* Fix hasLicense being set

* Remove features interface

* Fix audit logging default

* Add bash as a dependency

* Add comment

* Add tests for resync and pubsub, and add back previous exp backoff retry

* Separate authz code again

* Add pointer loading example from comment

* Fix duplicate test, remove pointer.Handle

* Fix expired license

* Add entitlements struct

* Fix context passing
2022-09-19 23:11:01 -05:00
Kyle Carberry fd73d6dd0d
fix: Reduce variables needed for Docker template (#3442)
* fix: Reduce variables needed for Docker template

This should make initial setup a bit simpler!

* Fix for M2 Macbooks

PostgreSQL 13 doesn't support the M series architecture.

* Fix name <-> id swap

* Update Docker provider to remove host requirement

Co-authored-by: Kyle Carberry <kyle@air.local>
2022-08-10 14:45:05 +00:00
Kyle Carberry 9c12b4ed8e
chore: Add nix shell for simple development setup (#3399)
* chore: Add nix shell for simple development setup

This enables contributors using Nix to set up their environment with ease.

* improve nix style, flake output schema

* fix error message

* Update scripts/build_go_slim.sh

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

* Update scripts/build_go_slim.sh

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

* Add UTC default for timezone and remove unnecessary goreleaser dependency

* Skip TZ test if localtime does not exist

Co-authored-by: Charlie Moog <moogcharlie@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2022-08-08 15:49:12 +00:00