Commit Graph

52 Commits

Author SHA1 Message Date
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
576aef40f2 chore: Add linter rule to catch missing return after http writes (#2702) 2022-06-28 14:13:37 -05:00
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
bbbd5241c3 develop.sh: attempt to create a Docker template automatically (#2627)
This commit makes the following changes:

- Adds two variables docker_host and docker_arch to the example docker-code-server template
- Adds an example params.yaml to docker-code-server and updates the README.md to reference these parameters
- scripts/develop.sh will now attempt to create a template using docker-code-server with the appropriate parameters for the environment
- Updated Lima example to make use of the template parameters for docker-code-server


Additional drive-bys:

- webpack.dev.ts references CODER_HOST and not CODERV2_HOST; updated develop.sh accordingly
- develop.sh should now terminate child processes upon error.
2022-06-27 09:59:08 +01:00
ac557e02b8 clean site/out and enforce make bin (#2604) 2022-06-23 15:16:27 +01:00
69b7eed7ed feat: Check decompressed coder-slim binaries via SHA1 (#2556) 2022-06-22 21:33:23 +03:00
a0c8e70d1b scripts/develop.sh: remove nc dependency (#2590) 2022-06-22 18:04:12 +00:00
c366725472 Revert changes to scripts/build_go_matrix.sh from 1778db2 (#2581) 2022-06-22 15:59:20 +00:00
1778db23cb fix: Use WebSockets to stream workspace build logs (#2569)
* fix: Use WebSockets to stream workspace build logs

This was using a streaming HTTP request before, which didn't work
on my version of Chrome. This method seemed less reliable and standard
than a WebSocket, so figured switching would be best.

* Update site/src/xServices/workspaceBuild/workspaceBuildXService.ts

Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>

* Update site/src/pages/WorkspaceBuildPage/WorkspaceBuildPage.test.tsx

Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>

* Update site/src/api/api.ts

Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>

* Remove unused prop

Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
2022-06-22 13:23:14 +00:00
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
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
64f0473499 chore: Prefer [[ over [ in bash build scripts (#2543) 2022-06-21 19:51:32 +03:00
9bdaec6a21 fix: use armhf architecture in linux packages (#2514) 2022-06-20 06:12:38 +10:00
153ffc0ee9 fix: include architecture and version information in linux packages (#2511) 2022-06-19 18:56:07 +00:00
97348b1c9d fix: replace underscores with hyphens in slim binary name (#2509) 2022-06-19 18:15:20 +00:00
8d6faa3c1a fix: login before pushing docker images in release pipeline (#2496) 2022-06-19 13:12:09 +10:00
4b3608b628 fix: run git fetch --tags --force during release (#2495) 2022-06-19 10:39:01 +10:00
167ab281e4 fix: fix ERRPIPE in build scripts, fix deploy (#2492) 2022-06-18 21:47:37 +00:00
075e891f28 Remove goreleaser in favor of build scripts (#2143) 2022-06-19 05:47:10 +10:00
ccd061652b feat: Add built-in PostgreSQL for simple production setup (#2345)
* feat: Add built-in PostgreSQL for simple production setup

Fixes #2321.

* Use fork of embedded-postgres for cache path
2022-06-15 16:02:18 -05:00
251316751e feat: Return more 404s vs 403s (#2194)
* feat: Return more 404s vs 403s
* Return vague 404 in all cases
2022-06-14 10:14:05 -05:00
7b76afb069 Revert split release (#2139)
* Revert "chore: ignore artifacts dir (#2132)"

This reverts commit 27acb98571.

* Revert "chore: split release workflow so the majority happens on Linux (#2092)"

This reverts commit b87096b500.
2022-06-07 20:57:32 +00:00
b87096b500 chore: split release workflow so the majority happens on Linux (#2092) 2022-06-07 15:24:46 +00:00
af401e3fe1 chore: Linter rule for properly formatted api errors (#2123)
* chore: Linter rule for properly formatted api errors
* Add omitempty to 'Detail' field
2022-06-07 14:33:06 +00:00
e6ee7dd652 chore: Add linting rule to help catch InTx misuse (#1980)
* chore: Add linting rule to help catch InTx misuse

This isn't perfect, as if you nest your misuse in another code block
like an if statement, it won't catch it :/. It is better
than nothing
2022-06-02 14:50:15 +00:00
4b0ed06a26 Remove set -u on yarn_install.sh to allow it to run on zsh (#1930)
Signed-off-by: Spike Curtis <spike@coder.com>
2022-05-31 13:50:18 -07:00
83edbee2e1 fix: Replace yes by true and add set -x (#1914) 2022-05-31 14:14:14 +00:00
26a2a169df fix: Suspended users cannot authenticate (#1849)
* fix: Suspended users cannot authenticate

- Merge roles and apikey extract httpmw
- Add member account to make dev
- feat: UI Shows suspended error logging into suspended account
- change 'active' route to 'activate'
2022-05-31 08:06:42 -05:00
608eb322a8 chore: Add .editorconfig, shfmt, shellcheck and subshell dir changes (#1649) 2022-05-27 20:15:19 +03:00
c2f74f3cc2 chore: avoid concurrent usage of t.FailNow (#1683)
* chore: golangci: add linter rule to report usage of t.FailNow inside goroutines
* chore: avoid t.FailNow in goroutines to appease the race detector
2022-05-24 08:58:39 +01:00
6c1117094d chore: Force codersdk to not import anything from database (#1576)
* chore: Force codersdk to not import anything from database (linter rule)
* chore: Move all database types in codersdk out
2022-05-19 13:04:44 -05:00
495c87b6c3 chore: add make dev (#1527) 2022-05-17 13:12:14 -05:00
86cba4d3f8 chore: Deploy internally accessible godoc container (#1415) 2022-05-12 19:39:18 -05:00
64e408c954 feat: Check permissions endpoint (#1389)
* feat: Check permissions endpoint

Allows FE to query backend for permission capabilities.
Batch requests supported
2022-05-12 20:56:23 +00:00
26b04cc96f chore: switch to generated types (#1394)
* Make column renderer use the same type as its key

That way the renderer only takes `string` for example when rendering the
name field instead of `string | number` when the interface has some
fields that are strings and some fields are numbers.

This will be necessary when switching to generated types since some of
the fields are numbers (like the owner count on a template).

* Switch fully to generated types

In some places the organization ID is part of the URL but not part of
the request so I separated out the ID into a separate argument in the
relevant API functions.

Otherwise this was a straightforward replacement where I mostly only
needed to change some of the interface names (User instead of
UserResponse for example) and add a few missing but required properties.

I kind of winged the template form; I am not sure what the difference
between a template and template version is or why the latter comes
before the former so the form just returns all the data required to
create both.

* Delete handwritten types

Except for UserAgent which seems to be purely frontend and
ReconnectingPTYRequest which is not in codersdk so I am just leaving it
for now.

* Remove implemented omitempty as a future idea

This was implemented in 2d3dc436a8.

* Add missing optionalities to generated request interfaces
2022-05-12 10:01:28 -05:00
f816bbe801 feat: add codegen for audit.AuditableResources entries (#1370) 2022-05-10 21:27:45 +00:00
97a95f1377 chore: upgrade golangci-lint to v1.46.0 (#1373) 2022-05-10 16:04:23 -05:00
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
e330dc1321 feat: Switch packages for typescript generation code (#1196)
* feat: Switch packages for typescript generation code

Supports a larger set of types
  - [x] Basics (string/int/etc) 
  - [x] Maps
  - [x] Slices
  - [x] Enums
  - [x] Pointers
2022-04-28 16:59:14 +00:00
e181007de1 fix: Add more golang types -> number ts type (#1108) 2022-04-22 21:01:43 +00:00
89aa39b5c8 fix: sort enum decls (#1075) 2022-04-19 16:02:32 +00:00
73b8a5a929 chore: use /usr/bin/env bash (#1070) 2022-04-19 08:45:13 -07:00
f46b4cf3da feat: generate typescript types from codersdk structs (#1047) 2022-04-19 00:45:22 +00:00
866205c145 feat: Sign MacOS binaries (#1060)
This fixes virus warnings when launching Coder on darwin.
2022-04-18 14:57:41 -05:00
86994dacb1 feat: Initial E2E test framework for v2 (#288)
This brings an initial E2E test (really, an integration test - it's only running the server locally, as opposed to against a deployment - but it'd be easy to point playwright to a deployment).

Demo gif:
![test2](https://user-images.githubusercontent.com/88213859/156078517-6cb4ef84-337b-4e16-a8bc-aea7d06dcbcb.gif)

This test exercises a minimal flow for login:
- Run the `coderd` binary to start a server on 3000
- Create an initial user as part of setup
- Go through the login flow and verify we land on the projects page

It will be useful to have to ensure that #360 doesn't introduce a regression in the login flow

Future E2E tests that would be useful:
- Create a project & verify it shows in the UI
- Create a workspace and verify it shows in the UI
2022-03-02 09:26:53 -08:00
41c3ee72e5 ci: Update DataDog GitHub branch to fallback to GITHUB_REF (#356)
This was detecting branches, but not our "main" branch before.
Hopefully this fixes it!
2022-02-24 16:47:51 +00:00
3c04c7f3e6 chore: install optional dependencies (required for swc) (#335)
* chore: install optional dependencies (required for swc)

* Use install script in Makefile

* add trailing newline
2022-02-20 13:52:14 -06:00
8f843d2364 chore: add script to install yarn dependencies
* Use frozen lockfile in build for reproducible builds
* Do not install optional dependencies
* Suppress interactive prompts in build
2022-02-20 17:43:51 +00:00
5bfdb0cf98 ci: Use GITHUB_BASE_REF as backup if branch isn't set for DataDog (#321)
The change in #313 caused PRs to report "<id>/merge" as the name.
2022-02-18 11:19:06 -06:00
dd36317bbd ci: Use GITHUB_REF_NAME to identify branch with DataDog (#313)
The "main" branch wasn't uploading properly before.
2022-02-17 17:30:44 +00:00