* feat: Add app support
This adds apps as a property to a workspace agent.
The resource is added to the Terraform provider here:
https://github.com/coder/terraform-provider-coder/pull/17
Apps will be opened in the dashboard or via the CLI
with `coder open <name>`. If `command` is specified, a
terminal will appear locally and in the web. If `target`
is specified, the browser will open to an exposed instance
of that target.
* Compare fields in apps test
* Update Terraform provider to use relative path
* Add some basic structure for routing
* chore: Remove interface from coderd and lift API surface
Abstracting coderd into an interface added misdirection because
the interface was never intended to be fulfilled outside of a single
implementation.
This lifts the abstraction, and attaches all handlers to a root struct
named `*coderd.API`.
* Add basic proxy logic
* Add proxying based on path
* Add app proxying for wildcards
* Add wsconncache
* fix: Race when writing to a closed pipe
This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.
* fix: Race when writing to a closed pipe
This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.
* fix: Race when writing to a closed pipe
This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.
* fix: Race when writing to a closed pipe
This is such an intermittent race it's difficult to track,
but regardless this is an improvement to the code.
* Add workspace route proxying endpoint
- Makes the workspace conn cache concurrency-safe
- Reduces unnecessary open checks in `peer.Channel`
- Fixes the use of a temporary context when dialing a workspace agent
* Add embed errors
* chore: Refactor site to improve testing
It was difficult to develop this package due to the
embed build tag being mandatory on the tests. The logic
to test doesn't require any embedded files.
* Add test for error handler
* Remove unused access url
* Add RBAC tests
* Fix dial agent syntax
* Fix linting errors
* Fix gen
* Fix icon required
* Adjust migration number
* Fix proxy error status code
* Fix empty db lookup
* chore: Reduce deployment times by excluding Docker images
Only the Windows and Linux binaries are build during deploy, so we
can save many minutes by excluding Docker images.
* Stop docker image builds on snapshot
* Fix artifact upload
* Skip typecheck for release
* Flag deploy
* fix: Remove unused workspace routes in favor of list with filter
This consolidates the workspace routes into a single place.
It allows users to fetch a workspace by their username and
workspace name, which will be used by the frontend for routing.
* Fix RBAC
* Fix CLI usages
* feat: use ConfirmDialog for ResetPasswordDialog
* fix lint
* make description typography a div
* use paragraph for string description, div otherwise
* fix lint
Resolves: #1959
Summary:
The package tzdata is used to create a meaningful select-list for
timezone in the workspace schedule form.
Impact:
Improved UX. Furthermore, we guess your timezone if the form is being
initialized from scratch.
* feat: update success confirmation dialog and snackbar
* add success variants to confirm dialog and snackbar
* update story name
* use success variant for snackbar
Resolves: #1901
Summary:
We had a homegrown parser that only understood numbers, not strings like
MON or TUES. We replace the homegrown parser with cron-parser.
Details:
This was nearly a straight drop-in.
Impact:
Much less code/maintenance burden :D
What I learned:
Don't trust the README, sometimes you just gotta read the code or import
it and try it out. The `fields` representation of the parsed expression
was missing from their docs. I might open an issue or PR to update them!
Resolves: #1958
Summary:
The workspace schedule form no longer disables certain fields based on
whether or not a start time is filled out. Instead, we validate that a
start time is provided if any of the days are checked.
It was difficult to develop this package due to the
embed build tag being mandatory on the tests. The logic
to test doesn't require any embedded files.
Exponential backoff is only enabled if the websocket fails to open. If
the websocket is opened but immediately killed, the agent will try to
immediately reconnect. This is desireable in cases where coderd is being
replaced or network conditions cause the connection to die, but not for
permanent errors.
Resolves: #1460
Summary:
An 'Extend' CTA on workspace schedule banner is added so that a user can
extend their workspace lease from the UI.
Details:
* feat: putWorkspaceExtension handler
* refactor: TypesGen dflt import in workspace.ts
* feat: defaultWorkspaceExtension util
Impact:
This completes the UI<-->CLI parity epic in an MVP way. Of course, a
future improvement to make is extending by times other than the default
90 minutes.
* add a divider after Account menu item
* test: improve Storybook tests
* add closed and open userdropdown tests
* add default isOpen
* extract UserDropdownContent into a single component
* remove the isOpen prop
* address nit comments
* update test name
* 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
* feat: Handle pagination cases where after_id does not exist
Throw an error to the user in these cases
- Templateversions
- Workspacebuilds
User pagination does not need it as suspended users still
have rows in the database
* Changes all public-facing codersdk types to use a plain int64 (milliseconds) instead of time.Duration.
* Makes autostart_schedule a *string as it may not be present.
* Adds a utils/ptr package with some useful methods.
* feat: Member roles are implied and never exlpicitly added
* Rename "GetAllUserRoles" to "GetAuthorizationRoles"
* feat: Add migration to remove implied roles
* rename user auth role middleware