Commit Graph

742 Commits

Author SHA1 Message Date
6c1ef851a2 fix: Update cli usage template for cobra feature parity (#1463)
Fixes #1423

Related #1233, #1403
2022-05-16 20:01:42 +03:00
b06ef0ae6e feat: Workspace StatusBar (#1362)
* Move component and prep

* Make WorkspaceSection more reusable

* Lay out elements

* Layout tweaks

* Add outdated to Workspace type

* Fill out status bar component

* Format

* Add transition to types

* Add api handlers for build toggle

* Format

* Parallelize machine

* Lay out basics of build submachine

* Pipe start and stop events through - needs status

* Attempt at a machine

It's so big, but collapsing start and stop made it hard to distinguish retry from toggle

* Update mock

* Render status and buttons

* Fix type error on template page

* Move Settings

* Format

* Keep refreshed workspace

* Make it switch workspaces

* Lint

* Fix relative api path

* Test

* Fix polling

* Add loading workspace state

* Format

* Add stub settings page

* Format

* Lint

* Get rid of let

* Add update

* Make start use version id

Important for update

* Fix imports

* Add polling for outdated

* Rely on context instead of finite state for status

* Handle canceling

* Fix tests

* Format

* Display errors so users know when button presses didn't work

* Fix api typo, remove logging

* Lint

* Simplify type

Co-authored-by: G r e y <grey@coder.com>

* Add type, extract helper

Co-authored-by: G r e y <grey@coder.com>
2022-05-16 16:34:22 +00:00
e990a9ac28 feat: add audit diffing for all user editable types (#1413) 2022-05-16 11:20:11 -05:00
b7049032a0 fix: cli: prettify schedule when printing output (#1440)
* Adds methods to schedule.Schedule to show the raw cron string and timezone
* Uses these methods to clean up output of auto(start|stop) show or ls
* Defaults CRON_TZ=UTC if not provided
2022-05-16 17:02:44 +01:00
2a278b8698 chore: bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2 (#1467)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 09:35:11 -05:00
f3b922bbd5 chore: bump github.com/moby/moby (#1464)
Bumps [github.com/moby/moby](https://github.com/moby/moby) from 20.10.15+incompatible to 20.10.16+incompatible.
- [Release notes](https://github.com/moby/moby/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moby/moby/compare/v20.10.15...v20.10.16)

---
updated-dependencies:
- dependency-name: github.com/moby/moby
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 09:13:20 -05:00
8857c0d076 refactor: Update start coder command (#1476) 2022-05-16 13:37:42 +00:00
02087db65a chore: bump docker/setup-qemu-action from 1 to 2 (#1471)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 08:36:12 -05:00
6ca7f0b89c chore: bump google.golang.org/api from 0.78.0 to 0.79.0 (#1466)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.78.0 to 0.79.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.78.0...v0.79.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 08:32:25 -05:00
19a18164ec chore: bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 (#1473)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 08:31:54 -05:00
d7163b2f9f chore: bump github.com/gliderlabs/ssh from 0.3.3 to 0.3.4 (#1468)
Bumps [github.com/gliderlabs/ssh](https://github.com/gliderlabs/ssh) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/gliderlabs/ssh/releases)
- [Commits](https://github.com/gliderlabs/ssh/compare/v0.3.3...v0.3.4)

---
updated-dependencies:
- dependency-name: github.com/gliderlabs/ssh
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 08:31:21 -05:00
889ec88de2 chore: bump github.com/pion/webrtc/v3 from 3.1.34 to 3.1.39 (#1465)
Bumps [github.com/pion/webrtc/v3](https://github.com/pion/webrtc) from 3.1.34 to 3.1.39.
- [Release notes](https://github.com/pion/webrtc/releases)
- [Commits](https://github.com/pion/webrtc/compare/v3.1.34...v3.1.39)

---
updated-dependencies:
- dependency-name: github.com/pion/webrtc/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 08:30:53 -05:00
7bb7c6c295 example: use codercom/enterprise-intellij:ubuntu in docker-local (#1454)
Resolves: #1113
2022-05-14 13:58:12 -04:00
dbd5b4a47b feat: Add workspace owner name to response (#1448)
This will be rendered in the workspace page!
2022-05-13 20:41:21 -05:00
4cfc9af442 Fix codecov (#1447)
The notify block was syntactically invalid, preventing
any of this file from working.
2022-05-14 00:33:58 +00:00
e061715315 fix: error when clicking on login screen (#1445)
Resolves: #1435
2022-05-13 20:07:54 -04:00
fe7645b8a9 feat: add templates delete command (#1443) 2022-05-13 22:54:32 +00:00
19335df0eb Disable codecov comment (#1442)
You can find the information by clicking on the CI check, and it's only rarely of interest to the reviewer.
2022-05-13 16:48:48 -05:00
695b709173 fix: examples link in README (#1441) 2022-05-13 16:43:10 -05:00
50ad2f8e31 refactor: Improve the load state for the list pages (#1428) 2022-05-13 14:12:35 -05:00
f970829b9e feat: add autostart/autostop show, show autostart/autostop schedule in ls output (#1436)
* feat: add autostart/autostop show, show autostart/autostop schedule in ls output
2022-05-13 19:03:27 +00:00
9410237ed5 chore: un-hide autostart and autostop commands (#1418) 2022-05-13 18:09:16 +01:00
b2760b1faf feat: send native system notification on scheduled workspace shutdown (#1414)
* feat: send native system notification on scheduled workspace shutdown

This commit adds a fairly generic notification package and uses it
to notify users connected over SSH of pending workspace shutdowns.
Only one notification will be sent at most 5 minutes prior to the scheduled
shutdown, and only one CLI instance will send notifications if multiple
instances are running.
2022-05-13 18:09:04 +01:00
4ab7a41f08 chore: executor: add unit test, rename LifecycleTicker (#1420)
* chore: add a unit test to ensure correct behaviour with multiple coderd replicas
* nit: rename LifecycleTicker to AutobuildTicker
2022-05-13 17:14:24 +01:00
89e44da899 fix: remove account description (#1427)
Resolves: #1419
2022-05-13 11:53:14 -04:00
e6168ba238 feat: Add permissions for links (#1407) 2022-05-13 14:25:57 +00:00
64a8b4ac47 chore: add bpmct to contributors list (#1332) 2022-05-13 02:01:31 +00:00
86cba4d3f8 chore: Deploy internally accessible godoc container (#1415) 2022-05-12 19:39:18 -05:00
333d6a4374 fix: typo in CODER_VERSION 2022-05-12 16:13:43 -05:00
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
75a5877c1d fix: remove docker release flake (#1412) 2022-05-12 15:44:46 -05:00
9ef64fd192 chore: add myself as a contributor (#1408) 2022-05-12 14:44:54 -04:00
6f7d9bb1e4 fix: remove unimplemented account pages (#1411)
It appears unclear as of now when/if these will be implemented so I
opted to remove them (as opposed to commenting them out) to avoid having
them rot (they are easily added back anyway).

Closes #1232.
2022-05-12 13:34:49 -05:00
bbb8f836bf feat: build & release cross-platform Docker images (#1178)
* feat: add dockerfile and docker-compose

* build docker images on release

* add Docker dependencies to release.yaml

* remove docker compose for now

* fix license mismatch

* add docker-compose

* rename volume

* add WF dispatch for debugging
v0.5.6
2022-05-12 17:59:34 +00:00
7b5300d0cc fix: Improve develop script to start tunnel by default (#1409)
This allows for running the development script to actually
build workspaces!
2022-05-12 12:37:51 -05:00
20916281d8 feat: Add reset-password command (#1380)
* allow non-destructively checking if database needs to be migrated

* feat: Add reset-password command

* fix linter errors

* clean up reset-password usage prompt

* Add confirmation to reset-password command

* Ping database before checking migration, to improve error message
2022-05-12 12:32:56 -05:00
a629a705d0 refactor: Add vertical space to the footer (#1410) 2022-05-12 12:28:20 -05:00
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
56076a0aa2 feat: Unify cli behavior for templates create and update (#1385)
Fixes #565
2022-05-12 14:54:58 +03:00
2569787324 chore: add eslint extension recommendation (#1400)
resolves #1399
2022-05-11 19:01:21 -04:00
ce660f8bbc fix: add missing return when template version is not found (#1402) 2022-05-11 17:58:22 -05:00
f4da5d4f3a feat: add lifecycle.Executor to manage autostart and autostop (#1183)
This PR adds a package lifecycle and an Executor implementation that attempts to schedule a build of workspaces with autostart configured.

- lifecycle.Executor takes a chan time.Time in its constructor (e.g. time.Tick(time.Minute))
- Whenever a value is received from this channel, it executes one iteration of looping through the workspaces and triggering lifecycle operations.
- When the context passed to the executor is Done, it exits.
- Only workspaces that meet the following criteria will have a lifecycle operation applied to them:
  - Workspace has a valid and non-empty autostart or autostop schedule (either)
  - Workspace's last build was successful
- The following transitions will be applied depending on the current workspace state:
  - If the workspace is currently running, it will be stopped.
  - If the workspace is currently stopped, it will be started.
  - Otherwise, nothing will be done.
- Workspace builds will be created with the same parameters and template version as the last successful build (for example, template version)
2022-05-11 23:03:02 +01:00
e8e6d3c2f1 chore: updated documentation link (#1387)
* chore: updated documentation link

* PR feedback
2022-05-11 17:10:03 -04:00
f93804a2a0 chore: renaming index files (#1397) 2022-05-11 17:02:28 -04:00
be3bc5cc55 Remove coder templates edit command (#1396) 2022-05-11 20:05:45 +00:00
537897c0bb chore: add "needs grooming" label to new issues (#1384) 2022-05-11 14:35:58 -05:00
982769f0dc fix: uses "projects" instead of "templates" in examples docs 2022-05-11 13:42:47 -05:00
3024e25c09 example: Add Kubernetes multi-service (#1092)
* example: Add Kubernetes multi-service

* fix: change to CODER_AGENT_TOKEN

* example: use ServiceAccount for cluster authentication (#1096)

Co-authored-by: Ben <ben@coder.com>
2022-05-11 18:27:31 +00:00
f5817248de feat: arm(v7/64) builds for releases and agent scripts (#1337)
* feat: build armv7 linux releases

* upload ARM binaries to bin

* Only build arm 7 for Linux

* add ARM agent scripts

* fix: specify armv7 to match tf provider

* append arm version to slim builds

* use descript armv7 binary

* Add script mappings for each architecture

Co-authored-by: kylecarbs <kyle@carberry.com>
2022-05-11 09:44:43 -05:00
a169542bda chore: bump hc-install from v0.3.1 to v0.3.2 (#1382)
* chore: bump hc-install from v0.3.1 to v0.3.2

* fix
2022-05-11 09:05:25 -05:00