Commit Graph

2325 Commits

Author SHA1 Message Date
7851fb1c99 Fix unlock of unlocked mutex in tailnet coordinator 2022-10-17 23:51:41 +00:00
211ffabe39 Fix kill mode stopping the built-in PostgreSQL
This was preventing final cleanups from occurring!
2022-10-17 23:50:29 +00:00
c5afaffa7e fix: Tidy up closes for nicer output (#4605)
* fix: Tidy up closes for nicer output

There was a context canceled message that would appear
because of traces, and this was using the wrong close.

I don't think it was causing any specific problems, but
it could make a replica warning appear on restart.

* Fix migration and experimental
2022-10-17 18:36:23 -05:00
e0a14f68fa feat: add avatar urls to groups (#4525) 2022-10-17 17:46:01 -05:00
9b4ab82044 fix: potential deadlock in coordinator (#4598) 2022-10-17 20:46:19 +00:00
8ab4d26474 chore: add note that HA is experimental (#4601) v0.10.0 2022-10-17 20:14:27 +00:00
8acba0ccff site: cleanup code in WorkspaceBuildProgress (#4584) 2022-10-17 16:45:06 -03:00
6f5544e0e4 fix: Pass experimental to the FE through the API (#4597) 2022-10-17 19:44:04 +00:00
4e44716b0c docs: add high availability (#4583)
- Rename `CODER_DERP_SERVER_RELAY_ADDRESS`

Co-authored-by: Ammar Bandukwala <ammar@ammar.io>
2022-10-17 14:27:38 -05:00
fda71dadcb fix: Copy replicas to prevent race (#4596)
This was seen in https://github.com/coder/coder/actions/runs/3267638198/jobs/5373066836
2022-10-17 19:22:54 +00:00
618c6dcaa4 fix: Allow OIDC with the username as email (#4594)
Fixes #4472.
2022-10-17 14:14:49 -05:00
ae9d7f6b4c coderd: fix race condition in template test 2022-10-17 19:12:21 +00:00
18c4368571 chore: Move deployment UI and HA into experimental (#4595)
These are new, so they deserve a bit of gel-time!
2022-10-17 18:29:40 +00:00
5325bec26c fix: Add timeout to selecting a dev tunnel (#4592)
For some reason this timed out for a prospect. Even if this
doesn't fix it, the problem will be revealed.
2022-10-17 18:03:17 +00:00
4895e011df chore: bump go.opentelemetry.io/otel from 1.10.0 to 1.11.0 (#4582)
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
rm
2022-10-17 12:23:26 -05:00
6b1b3a2037 feat: Add deployment settings page (#4590)
* Add base components for the Settings Page

* WIP OIDC page

* Imrove layout

* Add table

* Abstract option

* Refactor badges

* Load settings from the API

* Update deployment page

* feat: Add deployment settings page

This allows deployment admins to view options
set on their deployments.

* Format

* Remove replicas table since it's not used

* Remove references to HA table

* Fix tests

* Improve language

Co-authored-by: Bruno Quaresma <bruno@coder.com>
2022-10-17 12:22:59 -05:00
9b5d627a55 fix(tailnet): data race in coordinator.Close() (#4589) 2022-10-17 11:47:45 -05:00
29acd25b4e fix: chrome requests hanging over port-forward (#4588) 2022-10-17 11:45:29 -05:00
d2ee18c14f fix: Don't check for existing replicas when starting up (#4587)
This was blocking startup, creating a chicken and egg problem where
if a replica died, a single one couldn't be bootstrapped again.
2022-10-17 15:27:28 +00:00
2ba4a62a0d feat: Add high availability for multiple replicas (#4555)
* feat: HA tailnet coordinator

* fixup! feat: HA tailnet coordinator

* fixup! feat: HA tailnet coordinator

* remove printlns

* close all connections on coordinator

* impelement high availability feature

* fixup! impelement high availability feature

* fixup! impelement high availability feature

* fixup! impelement high availability feature

* fixup! impelement high availability feature

* Add replicas

* Add DERP meshing to arbitrary addresses

* Move packages to highavailability folder

* Move coordinator to high availability package

* Add flags for HA

* Rename to replicasync

* Denest packages for replicas

* Add test for multiple replicas

* Fix coordination test

* Add HA to the helm chart

* Rename function pointer

* Add warnings for HA

* Add the ability to block endpoints

* Add flag to disable P2P connections

* Wow, I made the tests pass

* Add replicas endpoint

* Ensure close kills replica

* Update sql

* Add database latency to high availability

* Pipe TLS to DERP mesh

* Fix DERP mesh with TLS

* Add tests for TLS

* Fix replica sync TLS

* Fix RootCA for replica meshing

* Remove ID from replicasync

* Fix getting certificates for meshing

* Remove excessive locking

* Fix linting

* Store mesh key in the database

* Fix replica key for tests

* Fix types gen

* Fix unlocking unlocked

* Fix race in tests

* Update enterprise/derpmesh/derpmesh.go

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

* Rename to syncReplicas

* Reuse http client

* Delete old replicas on a CRON

* Fix race condition in connection tests

* Fix linting

* Fix nil type

* Move pubsub to in-memory for twenty test

* Add comment for configuration tweaking

* Fix leak with transport

* Fix close leak in derpmesh

* Fix race when creating server

* Remove handler update

* Skip test on Windows

* Fix DERP mesh test

* Wrap HTTP handler replacement in mutex

* Fix error message for relay

* Fix API handler for normal tests

* Fix speedtest

* Fix replica resend

* Fix derpmesh send

* Ping async

* Increase wait time of template version jobd

* Fix race when closing replica sync

* Add name to client

* Log the derpmap being used

* Don't connect if DERP is empty

* Improve agent coordinator logging

* Fix lock in coordinator

* Fix relay addr

* Fix race when updating durations

* Fix client publish race

* Run pubsub loop in a queue

* Store agent nodes in order

* Fix coordinator locking

* Check for closed pipe

Co-authored-by: Colin Adler <colin1adler@gmail.com>
2022-10-17 13:43:30 +00:00
dc3519e973 Support all transitions in build progress bar (#4575)
* Use null types instead of -1 for simplicity

* Fix pgcrypto bug in migration 59

* Add stories

* Fix visual stutter
2022-10-16 23:34:03 -05:00
ee2c29d520 Rename the noVNC icon to match the other icons (#4574) 2022-10-16 19:37:02 -05:00
efdd5d5a0c feat: add doas support (#4531)
* feat: add doas support

Some people may have some reason to drop sudo and switch to doas

* chore: doas at the end

Just because it is relatively cold :-(

Co-authored-by: Kyle Carberry <kyle@carberry.com>

* chore(CI): add doas to pass CI

* fix syntax error

Co-authored-by: Kyle Carberry <kyle@carberry.com>
Co-authored-by: Ben <me@bpmct.net>
2022-10-16 02:18:30 +00:00
de5ba47557 site: minor build stats fixes (#4569)
- Correct variable used in the template stats summary
- Don't use dayjs.humanize (it thinks 30 seconds is "a few seconds")
2022-10-15 21:30:51 +00:00
e456799f1a Add template build time stats (#4557)
- Expose time in Template pages
- Show progress bar when building a workspace
2022-10-15 20:36:50 +00:00
5b7d204b9d chore: fix tooltip behavior (#4563) 2022-10-15 13:04:52 +00:00
1515d755e1 feat: add app sharing icon and tooltip (#4556)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-10-14 21:49:24 +00:00
7ec88bf841 feat: audit git ssh key regeneration (#4544) 2022-10-14 16:25:46 -05:00
dd8ebf10db fix: duplicate workspace update entries (#4513)
* fix: duplicate workspace update entries

* remove console log

* attempting to fix tests

* keep diffs with 0 changes

* cleaned up test
2022-10-14 14:39:20 -04:00
a029817d3d feat: allow suffix after wildcard in wildcard access URL (#4524) 2022-10-14 18:25:11 +00:00
ccc008eb5e fix: redesign schedule bumper to handle multiple hours of change at once (#4535)
* Start sketching out new design

* Working but ugly

* Highlight chosen mode

* Format

* Set hours field width

* Alignment on desktop

* Use primary button color

* Make 1 the default change

* Add stepper max

* Fix storybook

* Handle undefined deadline

* Access deadline correctly

* Format

* Fix overflow on mobile
2022-10-14 13:23:00 -04:00
d898737d6d feat: app sharing (now open source!) (#4378) 2022-10-15 02:46:38 +10:00
19d7281daf fix: Fix template create with sub-folders on Windows (#4548)
On Windows, files in tar archives were stored with Windows
path-separators resulting in them being individual files as opposed to
contained in a folder.

This commit ensures Unix-based paths (slash) are being used inside tar
archives.

Exmple of previous output:

```
/tmp/provisionerd673501182/images:
/tmp/provisionerd673501182/:
README.md
images
images\base.Dockerfile
images\java.Dockerfile
images\node.Dockerfile
main.tf
```

Fixes #2815
2022-10-14 19:28:47 +03:00
88f7505fdf feat: upgrade prettier and add --cache (#4543)
This uses the `--cache` flag with `prettier --check` to cache the
results and speed up subsequent runs.
2022-10-14 12:22:07 -04:00
bf0aca35fa fix: ensure deleting workspace creates audit log (#4537)
* fix: ensure deleting workspace creates audit log

* getting rid of comments

* remove whitespace

* pushing failing test

* fixed test
2022-10-14 09:47:38 -04:00
b1409831a3 refactor: clean up api/error.ts (#4542)
This removes an eslint-disable lint and updates the `err` type to
`unknown` instead of `any` which is more correct.
2022-10-14 09:09:09 -03:00
94db085b51 chore(site): remove some eslint-disables (#4265)
* fix: await promises in WorkspacePage.test.tsx

* chore: add eventsourcemock to cspell words

* fix: clean up UsersPage.test.tsx

* refactor: clean up eventsource mock

* revert: remove changes from WorkspacePage.test.tsx
2022-10-13 18:09:04 -05:00
4e57b9fbdc fix: allow regular users to push files (#4500)
- As part of merging support for Template RBAC
  and user groups a permission check on reading files
  was relaxed.

  With the addition of admin roles on individual templates, regular
  users are now able to push template versions if they have
  inherited the 'admin' role for a template. In order to do so
  they need to be able to create and read their own files. Since
  collisions on hash in the past were ignored, this means that a regular user
  who pushes a template version with a file hash that collides with
  an existing hash will not be able to read the file (since it belongs to
  another user).

  This commit fixes the underlying problem which was that
  the files table had a primary key on the 'hash' column.
  This was not a problem at the time because only template
  admins and other users with similar elevated roles were
  able to read all files regardless of ownership. To fix this
  a new column and primary key 'id' has been introduced to the files
  table. The unique constraint has been updated to be hash+created_by.
  Tables (provisioner_jobs) that referenced files.hash have been updated
  to reference files.id. Relevant API endpoints have also been updated.
2022-10-13 18:02:52 -05:00
a55186cd02 fix(database): remove usage of String() for comparing UUIDs (#4547) 2022-10-13 22:38:30 +00:00
9c0cc65973 fix: removing unsupported resources from audit log documentation (#4540) 2022-10-13 16:59:27 -04:00
459ee4e66a feat: add pagination to getWorkspaces (#4521) 2022-10-13 12:41:13 -04:00
574e5d37c7 fix: Remove case sensitivity check in OIDC email domain (#4534)
Fixes #4533.
v0.9.10
2022-10-13 15:51:54 +00:00
0d0ea981da fix: Filter by deleted when querying workspaces (#4512)
Fixes #4508.
2022-10-12 14:53:03 -05:00
0fa8f528c2 chore: change view perm to use (#4496) 2022-10-12 14:33:21 -05:00
47805643f7 fix: allow user admins to manage groups (#4498) 2022-10-12 14:33:03 -05:00
2a1bfb3e44 docs: API tokens & CI automation (#4510)
* reword: chore: add CI to dogfood template

* use hardcoded URL

* use consistent name for tokens

* chore: add docs for template change management

* add an example

* fix case
2022-10-12 15:43:59 +00:00
abf14d976a chore: rename feature rbac to template_rbac (#4486)
* chore: rename feature rbac to template_rbac

* Fix feature visibility on FE

* fixup! Fix feature visibility on FE

Co-authored-by: Bruno Quaresma <bruno@coder.com>
v0.9.9
2022-10-11 13:51:41 -05:00
0f3221f9d0 fix: use more descriptive login flags (#4493) 2022-10-11 18:45:30 +00:00
c13e68248b docs: Add initial docs to groups and rbac (#4455)
* docs: Add initial docs to groups and rbac

* Update manifest

* Apply suggestions from code review

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* use single user icon

* chore: add labels and standardize enterprise messaging

* clarify template role

* add groups role

* fix typo

* rename access to use

Co-authored-by: Joe Previte <jjprevite@gmail.com>
Co-authored-by: Ben <me@bpmct.net>
2022-10-11 13:34:41 -05:00
9dcbe753f4 chore: Update docs for secretNames TLS change (#4469)
This was changed but the docs didn't reflect it.
2022-10-11 13:21:04 -05:00