Commit Graph

348 Commits

Author SHA1 Message Date
29d804e692 feat: add API key scopes and application_connect scope (#4067) 2022-09-19 17:39:02 +00:00
adad347902 refactor: Refactor audit logs count to support filtering (#4113) 2022-09-19 17:08:25 +00:00
bf8d823ae3 feat: Add audit log filters in the API (#4078) 2022-09-19 10:37:33 -03:00
63fd4945a2 chore: watch workspace endpoint (#4060) 2022-09-16 18:54:23 +00:00
214e59452f feat: Show custom resource icons in the UI (#4020) 2022-09-13 11:32:59 -03:00
850a83097c feat: Allow deleting users (#4028)
* Add deleted column to the users table

* Fix user indexes

* Add frontend

* Add test
2022-09-12 23:24:20 +00:00
8a94b72c7d feat: Allow hide resources (#3977) 2022-09-09 16:38:00 -03:00
f6aa025a01 feat: use active users instead of total users in Template views (#3900) 2022-09-09 19:30:31 +00:00
abb804f2de feat: add template/template version auditing (#3965) 2022-09-09 11:34:23 -05:00
720c9dadcf fix: Remove name from workspace builds (#3937)
Fixes #1561.
2022-09-07 19:49:57 +00:00
762063ed8f fix: add avatar_url to user object in audit log response (#3939) 2022-09-07 19:22:04 +00:00
3d6d51fbd0 feat: audit log api (#3898) 2022-09-07 16:38:19 +00:00
05e2806ff3 feat: Add profile pictures to OAuth users (#3855)
This supports GitHub and OIDC login for profile pictures!
2022-09-04 11:44:27 -05:00
4c18034260 fix: Prevent autobuild executor from slowing down API requests (#3726)
With just a few workspaces, the autobuild executor can slow down API
requests every time it runs. This is because we started a long running
transaction and checked all eligible (for autostart) workspaces inside
that transaction. PostgreSQL doesn't know if we're modifying rows and as
such is locking the tables for read operations.

This commit changes the behavior so each workspace is checked in its own
transaction reducing the time the table/rows needs to stay locked.

For now concurrency has been arbitrarily limited to 10 workspaces at a
time, this could be made configurable or adjusted as the need arises.
2022-09-02 13:24:47 +03:00
04b03792cb feat: add last used to Workspaces page (#3816) 2022-09-02 00:08:51 +00:00
30f8fd9b95 Daily Active User Metrics (#3735)
* agent: add StatsReporter

* Stabilize protoc
2022-09-01 14:58:23 -05:00
9bd83e5ec7 feat: Add Tailscale networking (#3505)
* fix: Add coder user to docker group on installation

This makes for a simpler setup, and reduces the likelihood
a user runs into a strange issue.

* Add wgnet

* Add ping

* Add listening

* Finish refactor to make this work

* Add interface for swapping

* Fix conncache with interface

* chore: update gvisor

* fix tailscale types

* linting

* more linting

* Add coordinator

* Add coordinator tests

* Fix coordination

* It compiles!

* Move all connection negotiation in-memory

* Migrate coordinator to use net.conn

* Add closed func

* Fix close listener func

* Make reconnecting PTY work

* Fix reconnecting PTY

* Update CI to Go 1.19

* Add CLI flags for DERP mapping

* Fix Tailnet test

* Rename ConnCoordinator to TailnetCoordinator

* Remove print statement from workspace agent test

* Refactor wsconncache to use tailnet

* Remove STUN from unit tests

* Add migrate back to dump

* chore: Upgrade to Go 1.19

This is required as part of #3505.

* Fix reconnecting PTY tests

* fix: update wireguard-go to fix devtunnel

* fix migration numbers

* linting

* Return early for status if endpoints are empty

* Update cli/server.go

Co-authored-by: Colin Adler <colin1adler@gmail.com>

* Update cli/server.go

Co-authored-by: Colin Adler <colin1adler@gmail.com>

* Fix frontend entites

* Fix agent bicopy

* Fix race condition for the last node

* Fix down migration

* Fix connection RBAC

* Fix migration numbers

* Fix forwarding TCP to a local port

* Implement ping for tailnet

* Rename to ForceHTTP

* Add external derpmapping

* Expose DERP region names to the API

* Add global option to enable Tailscale networking for web

* Mark DERP flags hidden while testing

* Update DERP map on reconnect

* Add close func to workspace agents

* Fix race condition in upstream dependency

* Fix feature columns race condition

Co-authored-by: Colin Adler <colin1adler@gmail.com>
2022-08-31 20:09:44 -05:00
00da01fdf7 chore: rearrange audit logging code into enterprise folder (#3741) 2022-08-31 21:12:54 +00:00
5362f4636e feat: show agent version in UI and CLI (#3709)
This commit adds the ability for agents to set their version upon start.
This is then reported in the UI and CLI.
2022-08-31 16:33:50 +01:00
cc346afce6 Use licenses to populate the Entitlements API (#3715)
* Use licenses for entitlements API

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

* Tests for entitlements API

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

* Add commentary about FeatureService

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

* Lint

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

* Quiet down the logs

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

* Tell revive it's ok

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

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-29 16:45:40 -07:00
c8f8c95f6a feat: Add support for renaming workspaces (#3409)
* feat: Implement workspace renaming

* feat: Add hidden rename command (and data loss warning)

* feat: Implement database.IsUniqueViolation
2022-08-26 12:28:38 +03:00
ca3811499e DELETE license API endpoint (#3697)
* DELETE license API endpoint

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

* Fix new lint stuff

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

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-25 14:04:31 -07:00
c9bce19d88 GET license endpoint (#3651)
* GET license endpoint

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

* SDK GetLicenses -> Licenses

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

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-24 18:44:22 +00:00
b101a6f3f4 POST license API endpoint (#3570)
* POST license API

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

* Support interface{} types in generated Typescript

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

* Disable linting on empty interface any

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

* Code review updates

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

* Enforce unique licenses

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

* Renames from code review

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

* Code review renames and comments

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

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-22 15:02:50 -07:00
80f042f01b feat: Add icon to templates (#3561) 2022-08-19 13:17:35 +00:00
c43297937b feat: Add Kubernetes and resource metadata telemetry (#3548)
Fixes #3524.
2022-08-18 15:57:46 +00:00
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
546157b63e feat: Make template name editable (#3538) 2022-08-17 19:04:00 +00:00
7bdb8ff9cf feat: Add workspace metrics export to Prometheus (#3421)
This adds workspace totals indexed by status. It could be any
codersdk.ProvisionerJobStatus.
2022-08-09 01:08:42 +00:00
f14efd1a2b chore: alphabetize template list (#3363) 2022-08-05 13:03:22 -05:00
8a2811210a feat: Add backend API support for resource metadata (#3242)
* Initial support for metadata in provisioner API and Terraform provisioner

* add support for nullable metadata fields

* handle metadata fields in provisionerd and API
2022-08-01 16:53:05 -05:00
cef622d77c fix: Order database queries for templates (#3249)
* fix: Order database queries for templates

Fixes a race in a test where the order of templates varies.

* fix: Add sorting to databasefake as well
2022-07-27 15:04:29 +00:00
d04ba2cc02 feat: add template version creator (#3001) 2022-07-15 14:12:39 -07:00
680e24a14b Revert "feat: add template version creator (#2991)" (#2999)
This reverts commit aea3b3b83e.
2022-07-14 21:57:42 +00:00
aea3b3b83e feat: add template version creator (#2991) 2022-07-14 20:44:33 +00:00
b5f5e909bd Return template parameters in consistent order (#2975)
* return parameters from Terraform provisioner in sorted order

* persist parameter indices in database and return them in correct order from API

* don't re-sort parameters by name when creating templates
2022-07-13 15:29:34 -05:00
c07a45e610 fix: Fix workspace count to exclude deleted workspaces (#2916) 2022-07-12 12:52:28 -05:00
9df6bc7ba1 fix: update template updated_at value (#2729)
* fix: update template updated_at value

* use Go time for all updated_at updates
2022-06-30 12:14:51 +00:00
01c31b47a3 fix: Adjust pagination limit to be zero-based (#2663)
There isn't a use-case for querying a limit of zero. Using
-1 led to issues when using default parameters for querying.
2022-06-26 20:23:25 +00:00
3312c814bd feat: Workspace filters case insensitive (#2646) 2022-06-25 06:22:59 -05:00
90815e5119 feat: improve Users filter API (#2645) 2022-06-24 23:55:28 +00:00
26e85b0bbc fix: use typed wireguard public keys in database structs (#2639) 2022-06-24 15:45:28 -05:00
05b67ab1cf feat: peer wireguard (#2445) 2022-06-24 10:25:01 -05:00
d21ab2115d feat: Backend api for filtering users using filter query string (#2553)
* User search query string
2022-06-24 10:02:23 -05:00
0bcdfd584f fix: order apps by name (#2614) 2022-06-23 19:18:03 +00:00
b7eeb436ad feat: Add ip_address to API keys (#2580)
Fixes #2561.
2022-06-22 17:32:21 +00:00
289b98978f Add reason field for workspace builds (#2438)
* add reason field for workspace build

* add the reason field to FE via API

* update BuildReasonMember to BuildReasonInitiator

* add unit tests

* add more unit tests

* add error for unknown transition

* fix lint

* add documentation

* fix unit tests

* fix generated types

* remove nested transaction

* rename migration file
2022-06-17 13:41:11 -04:00
64b92eea67 feat: Allow inheriting parameters from previous template_versions when updating a template (#2397)
* WIP: feat: Update templates also updates parameters
* Insert params for template version update
* Working implementation of inherited params
* Add "--always-prompt" flag and logging info
2022-06-17 12:22:28 -05:00
4cce969018 feat: Add anonymized telemetry to report product usage (#2273)
* feat: Add anonymized telemetry to report product usage

This adds a background service to report telemetry to a Coder
server for usage data. There will be realtime event data sent
in the future, but for now usage will report on a CRON.

* Fix flake and requested changes

* Add reporting options for setup

* Add reporting for workspaces

* Add resources as they are reported

* Track API key usage

* Ensure telemetry is tracked prior to exit
2022-06-17 00:26:40 -05:00
dc1de58857 feat: workspace filter query supported in backend (#2232)
* feat: add support for template in workspace filter
* feat: Implement workspace search filter to support names
* Use new query param parser for pagination fields
* Remove excessive calls, use filters on a single query

Co-authored-by: Garrett <garrett@coder.com>
2022-06-14 08:46:33 -05:00