Commit Graph

21 Commits

Author SHA1 Message Date
Dean Sheather 452668c893
chore: avoid dbmock test errors in dbgen (#10923) 2023-11-28 17:04:25 +00:00
Kayla Washburn 619df23ad1
chore: fix linting issues and generated files (#10317) 2023-10-17 14:41:35 -06:00
Steven Masley aceedefce3
chore: add `template_with_user` view to include user contextual data (#8568)
* chore: Refactor template sql queries to use new view
* TemplateWithUser -> Template
* Add unit test to enforce good view
2023-07-19 16:07:33 -04: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 a658c94a67
chore: automatically generate dbauthz when new queries are added (#8007)
* chore: automatically generate dbauthz when new queries are added

* Merge system functions
2023-06-13 13:40:46 -05:00
Kyle Carberry 794a551176
chore: generate dbmetrics automatically when adding new queries (#7999)
* chore: rename dbgen package files and remove small file

* chore: automatically generate dbmetrics when new queries are added
2023-06-13 12:35:12 -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 5304b4e483
feat: add connection statistics for workspace agents (#6469)
* fix: don't make session counts cumulative

This made for some weird tracking... we want the point-in-time
number of counts!

* Add databasefake query for getting agent stats

* Add deployment stats endpoint

* The query... works?!?

* Fix aggregation query

* Select from multiple tables instead

* Fix continuous stats

* Increase period of stat refreshes

* Add workspace counts to deployment stats

* fmt

* Add a slight bit of responsiveness

* Fix template version editor overflow

* Add refresh button

* Fix font family on button

* Fix latest stat being reported

* Revert agent conn stats

* Fix linting error

* Fix tests

* Fix gen

* Fix migrations

* Block on sending stat updates

* Add test fixtures

* Fix response structure

* make gen
2023-03-08 21:05:45 -06:00
Mathias Fredriksson 8afdf24d10
chore: Update sqlc to v1.16.0 (#5788)
* chore: Update sqlc to v1.16.0

* chore: Fix cases where types became Null-types

* chore: Set parameter_schemas default_destination_scheme and default_source_scheme to NOT NULL

* chore: Add enum validation to database fake

* chore: Fix all tests that skipping enum values

* fix: Use correct err in providionerdserver audit log failure log
2023-01-23 13:14:47 +02:00
Dean Sheather 8e5af82275
feat: add api-rate-limit flag (#5013) 2022-11-10 21:53:48 +00:00
Mathias Fredriksson 4885ecc3ad
fix: Allow dumping db with pg_dump, utilize make cache (#4964) 2022-11-10 12:54:47 +02:00
Jon Ayers 3120c94c22
feat: add template RBAC/groups (#4235) 2022-10-10 15:37:06 -05:00
Kyle Carberry 65d63f9167 Use `go run` for executing `goimports` 2022-09-06 19:53:39 -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
Jon Ayers c3eea98db0
fix: use unique ID for linked accounts (#3441)
- move OAuth-related fields off of api_keys into a new user_links table
- restrict users to single form of login
- process updates to user email/usernames for OIDC
- added a login_type column to users
2022-08-17 18:00:53 -05:00
Mathias Fredriksson 608eb322a8
chore: Add .editorconfig, shfmt, shellcheck and subshell dir changes (#1649) 2022-05-27 20:15:19 +03:00
Colin Adler 0ccf0102d7
fix: ensure correct version of sqlc is executed (#1287)
If `/usr/local/bin` is searched before `$GOPATH/bin` in your `$PATH` the
wrong version of `sqlc` can be executed.
2022-05-04 20:09:13 +00:00
Colin Adler 81bef1c83e
feat: add audit logging database schema (#1225) 2022-05-02 19:30:46 +00:00
Colin Adler b621c59a03
fix: update models.go in generate.go (#865) 2022-04-04 19:53:04 +00:00
Colin Adler e0eae49f52
fix: update querier.go in generate.sh (#864)
I accidentally forgot to copy this out.
2022-04-04 19:21:48 +00:00
Colin Adler fd523100bf
chore: split queries.sql into files by table (#762) 2022-04-01 15:45:23 -05:00