e482d39052
chore: fix duplicate migration ( #8866 )
2023-08-02 15:09:10 +00:00
cd1e088f7c
feat: add --derp-only flag to wsproxy ( #8850 )
2023-08-03 00:35:06 +10:00
d6e9870209
feat: add "dormant" user state ( #8644 )
2023-08-02 16:31:25 +02:00
bd944e0d21
chore: rename startup logs to agent logs ( #8649 )
...
* chore: rename startup logs to agent logs
This also adds a `source` property to every agent log. It
should allow us to group logs and display them nicer in
the UI as they stream in.
* Fix migration order
* Fix naming
* Rename the frontend
* Fix tests
* Fix down migration
* Match enums for workspace agent logs
* Fix inserting log source
* Fix migration order
* Fix logs tests
* Fix psql insert
2023-07-28 15:57:23 +00:00
2f0a9996e7
chore: add derpserver to wsproxy, add proxies to derpmap ( #7311 )
2023-07-27 02:21:04 +10:00
de1a7a9210
chore: join user information to workspace_build and template_version ( #8625 )
...
* include minimial user on template version and build
* Add unit test to ensure join is superset
2023-07-25 09:14:38 -04:00
b47d076756
feat: add deleting_at column to workspaces ( #8333 )
2023-07-20 22:01:11 -05:00
dc8b73168e
feat: add user quiet hours schedule and restart requirement feature flag ( #8115 )
2023-07-20 23:35:41 +10:00
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
6318c4c09f
feat(site): increase TTL and max TTL validation to 30 days ( #8258 )
...
Co-authored-by: Dean Sheather <dean@deansheather.com >
2023-07-19 23:43:10 +10:00
75f62dc39d
feat: add support for template version messages in api and cli ( #8336 )
2023-07-11 13:11:08 +03:00
9f2a931eb8
feat(coderd): support ephemeral parameters ( #8367 )
2023-07-10 13:44:03 +02:00
e088303382
feat!: drop LegacyVariableName from coder parameter ( #8360 )
2023-07-07 14:14:29 +02:00
9a0ba1bdc3
fix(coderd): remove CREATE INDEX CONCURRENTLY
from migrations ( #8353 )
2023-07-06 16:44:29 -05:00
4a9c8f407a
feat: add auto-locking/deleting workspace based on template config ( #8240 )
2023-07-02 21:29:52 -05:00
9f76dab348
chore: Bump migration to remove conflict ( #8273 )
2023-06-30 13:12:40 +00:00
b5f26d9bdf
feat: add ability for users to convert their password login type to oauth/github login ( #8105 )
...
* Currently toggled by experiment flag
---------
Co-authored-by: Bruno Quaresma <bruno@coder.com >
2023-06-30 08:38:48 -04:00
6639c69fad
feat: add "display_order" column to coder_parameter to keep parameters sorted in UI ( #8227 )
2023-06-30 12:41:55 +02:00
749307ef08
feat: provide endpoint to lock/unlock workspace ( #8239 )
2023-06-28 16:12:49 -05:00
cc17d2feea
refactor: add postgres tailnet coordinator ( #8044 )
...
* postgres tailnet coordinator
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix db migration; tests
Signed-off-by: Spike Curtis <spike@coder.com >
* Add fixture, regenerate
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix fixtures
Signed-off-by: Spike Curtis <spike@coder.com >
* review comments, run clean gen
Signed-off-by: Spike Curtis <spike@coder.com >
* Rename waitForConn -> cleanupConn
Signed-off-by: Spike Curtis <spike@coder.com >
* code review updates
Signed-off-by: Spike Curtis <spike@coder.com >
* db migration order
Signed-off-by: Spike Curtis <spike@coder.com >
* fix log field name last_heartbeat
Signed-off-by: Spike Curtis <spike@coder.com >
* fix heartbeat_from log field
Signed-off-by: Spike Curtis <spike@coder.com >
* fix slog fields for linting
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-06-21 16:20:58 +04:00
8dac0356ed
refactor: replace startup script logs EOF with starting/ready time ( #8082 )
...
This commit reverts some of the changes in #8029 and implements an
alternative method of keeping track of when the startup script has ended
and there will be no more logs.
This is achieved by adding new agent fields for tracking when the agent
enters the "starting" and "ready"/"start_error" lifecycle states. The
timestamps simplify logic since we don't need understand if the current
state is before or after the state we're interested in. They can also be
used to show data like how long the startup script took to execute. This
also allowed us to remove the EOF field from the logs as the
implementation was problematic when we returned the EOF log entry in the
response since requesting _after_ that ID would give no logs and the API
would thus lose track of EOF.
2023-06-20 14:41:55 +03:00
c3aef9363b
feat: add locked TTL field to template meta ( #8020 )
2023-06-19 22:37:55 -04:00
0c5077464b
fix: avoid missed logs when streaming startup logs ( #8029 )
...
* feat(coderd,agent): send startup log eof at the end
* fix(coderd): fix edge case in startup log pubsub
* fix(coderd): ensure startup logs are closed on lifecycle state change (fallback)
* fix(codersdk): fix startup log channel shared memory bug
* fix(site): remove the EOF log line
2023-06-16 17:14:22 +03:00
6c4c3d6ce5
feat: add login type 'none' to prevent password login ( #8009 )
...
* feat: add login type 'none' to prevent login
Users with this login type must use tokens to authenticate.
Tokens must come from some other source, not a /login with password
authentication
2023-06-14 12:48:43 -05:00
f6db95e71c
test(coderd/database/migrations): increase fixture test timeout
2023-06-07 23:17:29 +00:00
660bbb8d38
refactor: deprecate login_before_ready
in favor of startup_script_behavior
( #7837 )
...
Fixes #7758
2023-06-06 11:58:07 +03:00
702c9081e0
fix: do not skip parameter validation if min or max = 0 ( #7707 )
2023-05-30 14:57:06 +02:00
00a2413c03
feat: add telemetry support for workspace agent subsystem ( #7579 )
2023-05-17 22:49:25 -05:00
70d2203b9e
chore: reduce the log output of skipped tests ( #7520 )
...
With the introduction of the workspace proxy tests there was a lot
of output if a test was eventually skipped.
2023-05-14 19:37:00 -05:00
5ffa6dae50
feat: add inactivity cleanup and failure cleanup configuration fields to Template Schedule Form ( #7402 )
...
* added workspace actions entitlement
* added workspace actions experiment
* added new route for template enterprise meta
* removing new route; repurposing old
* add new fields to get endpoints
* removed workspace actions experiment
* added logic to enterprise template store
* added new form fields
* feature flagged new fields
* fix validation
* fixed submit btn
* fix tests
* changed ttl defaults
* added FE tests
* added BE tests
* fixed lint
* adjusted comment language
* fixing unstaged changes check
* fix test
* Update coderd/database/migrations/000122_add_template_cleanup_ttls.down.sql
Co-authored-by: Dean Sheather <dean@deansheather.com >
* Update coderd/database/migrations/000122_add_template_cleanup_ttls.up.sql
Co-authored-by: Dean Sheather <dean@deansheather.com >
---------
Co-authored-by: Dean Sheather <dean@deansheather.com >
2023-05-05 08:19:26 -07:00
8bd9f9c351
feat: unified tracing between coderd<->provisionerd ( #7370 )
2023-05-03 23:02:35 +00:00
8fc8559076
fix(coderd): ensure that user API keys are deleted when a user is ( #7270 )
...
Fixes an issue where API tokens belonging to a deleted user were
not invalidated:
- Adds a trigger to delete rows from the api_key stable when the
column deleted is set to true in the users table.
- Adds a trigger to the api_keys table to ensure that new rows
may not be added where user_id corresponds to a deleted user.
- Adds a migration to delete all API keys from deleted users.
- Adds tests + dbfake implementation for the above.
2023-04-24 21:48:26 +01:00
7fa1112958
chore: Enforce workspace proxy unique name case insensitive ( #7202 )
...
* chore: Enforce workspace proxy unique name case insensitive
2023-04-20 11:30:52 -05:00
658246d5f2
chore: add workspace proxies to the backend ( #7032 )
...
Co-authored-by: Dean Sheather <dean@deansheather.com >
2023-04-17 19:57:21 +00:00
f6c89a2615
feat: differentiate new user registration from user login in the audit log ( #7096 )
...
* auditing register events
* fix tests
* update docs
* update comments
* Update coderd/audit/request.go
Co-authored-by: Colin Adler <colin1adler@gmail.com >
---------
Co-authored-by: Colin Adler <colin1adler@gmail.com >
2023-04-12 11:46:16 -07:00
81e2b2500a
feat: add level support for startup logs ( #7067 )
...
This allows external services like our devcontainer support to display
errors and warnings with custom styles to indicate failures to users.
2023-04-10 14:29:59 -05:00
b2892c3d17
test: Increase test coverage on auditable resources ( #7038 )
...
* test: Increase test coverage on auditable resources
When adding a new audit resource, we also need to add it to the
function switch statements. This is a likely mistake, now a unit
test will check this for you
2023-04-06 16:16:53 -05:00
b4afbe7720
feat: Implement experiment gated CRUD for workspace proxies ( #6928 )
...
* feat: Implement basic moon crud
* chore: Implement enterprise endpoints for moons
2023-04-04 15:07:29 -05:00
e33941b7c2
feat: allow disabling autostart and custom autostop for template ( #6933 )
...
API only, frontend in upcoming PR.
2023-04-04 12:48:35 +00:00
633dfbdb2e
feat: rich parameters: introduce display_name ( #6919 )
...
* model
* DB
* fix: DisplayName
* proto
* Proto
* Update go dep
* fixme
* fix format
* config
* fmt
* fix
* Fix
* fix
* chore(UI): redirecting from workspace page if 404 (#6880 )
* model
* CLI: Display parameter
* fix
* update dep
* fix
* fix
* fix
* UI changes
* fmt
---------
Co-authored-by: Kira Pilot <kira@coder.com >
2023-04-03 14:37:47 +02:00
ca4fa81570
feat: add agent metadata ( #6614 )
2023-03-31 15:26:19 -05:00
2bd6d2908e
feat: convert entire CLI to clibase ( #6491 )
...
I'm sorry.
2023-03-23 17:42:20 -05:00
cb7375450b
feat: add startup script logs to the ui ( #6558 )
...
* Add startup script logs to the database
* Add coderd endpoints for startup script logs
* Push startup script logs from agent
* Pull startup script logs on frontend
* Rename queries
* Add constraint
* Start creating log sending loop
* Add log sending to the agent
* Add tests for streaming logs
* Shorten notify channel name
* Add FE
* Improve bulk log performance
* Finish UI display
* Fix startup log visibility
* Add warning for overflow
* Fix agent queue logs overflow
* Display staartup logs in a virtual DOM for performance
* Fix agent queue with loads of logs
* Fix authorize test
* Remove faulty test
* Fix startup and shutdown reporting error
* Fix gen
* Fix comments
* Periodically purge old database entries
* Add test fixture for migration
* Add Storybook
* Check if there are logs when displaying features
* Fix startup component overflow gap
* Fix startup log wrapping
---------
Co-authored-by: Asher <ash@coder.com >
2023-03-23 14:09:13 -05:00
7587850a1c
feat: import value from legacy variable to build parameter ( #6556 )
2023-03-14 12:02:44 +00:00
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
3b87316ad7
feat: propagate job error codes ( #6507 )
...
* feat: propagate job error_code
* fix
* Fix
* Fix
* Fix
* add errors to typesGenerated
* Address PR comments
* Fix
2023-03-08 16:32:00 +01:00
23bebb40e2
fix: bump migration to resolve duplicate id ( #6486 )
...
This happened because two PRs with different migrations
merged at the same time!
2023-03-07 10:04:06 -06:00
2d4706ac33
feat: mark coder_parameter as "required" ( #6433 )
...
* Add required column
* Pass through providerd
* Pass the required property down
* Optional
* Fix
* Fix
* Fix
* fix
* CLI create: support for optional fields
* Use HTML API to mark fields required
* Fix
* Improve validation
* more fixes
* make fmt
* Fix
* WIP
* Fix: test
* CLI update tets
* OptionalParameterAdded
* Fix: migration
2023-03-07 16:38:31 +01:00
66a6b590a1
feat: add template max_ttl ( #6114 )
...
Co-authored-by: Bruno Quaresma <bruno@coder.com >
2023-03-07 14:14:58 +00:00
0c2b432c1b
feat: Add migration fixer script (for branches) ( #6466 )
2023-03-07 14:47:33 +02:00