Commit Graph

335 Commits

Author SHA1 Message Date
Dean Sheather 167ab281e4
fix: fix ERRPIPE in build scripts, fix deploy (#2492) 2022-06-18 21:47:37 +00:00
Dean Sheather 075e891f28
Remove goreleaser in favor of build scripts (#2143) 2022-06-19 05:47:10 +10:00
Kyle Carberry 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
Steven Masley 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
Dean Sheather 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
Dean Sheather b87096b500
chore: split release workflow so the majority happens on Linux (#2092) 2022-06-07 15:24:46 +00:00
Steven Masley 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
Steven Masley 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
Spike Curtis 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
Bruno Quaresma 83edbee2e1
fix: Replace yes by true and add set -x (#1914) 2022-05-31 14:14:14 +00:00
Steven Masley 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
Mathias Fredriksson 608eb322a8
chore: Add .editorconfig, shfmt, shellcheck and subshell dir changes (#1649) 2022-05-27 20:15:19 +03:00
Cian Johnston 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
Steven Masley 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
Garrett Delfosse 495c87b6c3
chore: add make dev (#1527) 2022-05-17 13:12:14 -05:00
David Wahler 86cba4d3f8
chore: Deploy internally accessible godoc container (#1415) 2022-05-12 19:39:18 -05:00
Steven Masley 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
Asher 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
Colin Adler f816bbe801
feat: add codegen for audit.AuditableResources entries (#1370) 2022-05-10 21:27:45 +00:00
Colin Adler 97a95f1377
chore: upgrade golangci-lint to v1.46.0 (#1373) 2022-05-10 16:04:23 -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
Steven Masley 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
Garrett Delfosse e181007de1
fix: Add more golang types -> number ts type (#1108) 2022-04-22 21:01:43 +00:00
Garrett Delfosse 89aa39b5c8
fix: sort enum decls (#1075) 2022-04-19 16:02:32 +00:00
Joe Previte 73b8a5a929
chore: use /usr/bin/env bash (#1070) 2022-04-19 08:45:13 -07: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
Bryan 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
Kyle Carberry 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
Jonathan Yu 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
Jonathan Yu 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
Kyle Carberry 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
Kyle Carberry 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
Kyle Carberry 3002a27dd1
ci: Replace DataDog CI with custom upload script (#169)
* ci: Replace DataDog CI with custom upload script

This will reduce CI time by ~6 minutes across all of
our runners. It's a bit janky, but I believe worth
the slight maintainance burden.

* Fix test race when job would complete too early

* Fix job cancelation override

* Fix race where provisioner job is inserted before project version
2022-02-07 17:32:32 +00:00
Kyle Carberry 7c260f88d1
feat: Create provisioner abstraction (#12)
* feat: Create provisioner abstraction

Creates a provisioner abstraction that takes prior art from the Terraform plugin system. It's safe to assume this code will change a lot when it becomes integrated with provisionerd.

Closes #10.

* Ignore generated files in diff view

* Check for unstaged file changes

* Install protoc-gen-go

* Use proper drpc plugin version

* Fix serve closed pipe

* Install sqlc with curl for speed

* Fix install command

* Format CI action

* Add linguist-generated and closed pipe test

* Cleanup code from comments

* Add dRPC comment

* Add Terraform installer for cross-platform

* Build provisioner tests on Linux only
2022-01-08 11:24:02 -06:00