Commit Graph

8616 Commits

Author SHA1 Message Date
77dc510a45 chore: bump cloud.google.com/go/compute/metadata from 0.5.2 to 0.6.0 (#15878) 2024-12-18 18:15:45 +09:00
dcf51535bb fix(coderd/wsbuilder): correctly evaluate dynamic workspace tag values (#15897)
Relates to https://github.com/coder/coder/issues/15894:

- Adds `coderdenttest.NewExternalProvisionerDaemonTerraform`
- Adds integration-style test coverage for creating a workspace with
`coder_workspace_tags` specified in `main.tf`
- Modifies `coderd/wsbuilder` to fetch template version variables and
  includes them in eval context for evaluating `coder_workspace_tags`
2024-12-17 21:57:03 +00:00
bcb15aab42 docs: add context for wireguard in places referencing tailscale (#15901)
> We do not use Tailscale (product) but instead import Tailscale OSS
libraries which has some nice ways of handling Wireguard. We also use
Tailscale's logo in our architecture, but calling it only `Tailscale`
seems to throw people off when they're considering Coder and how it
works.

I've left it wherever it seems to make sense (such as when we talk about
[DERP](https://coder.com/docs/admin/networking#relayed-connections)),
and sprinkled some `Wireguard` and `websocket/HTTPS` where I could
2024-12-17 15:13:12 -05:00
8de3cd6400 chore: tweak biome config (#15864) 2024-12-17 12:49:34 -07:00
1eba4c08cb docs: add beta back to orgs (#15902)
I merged https://github.com/coder/coder/pull/15888/ too early.

This PR incorporates @matifali 's edit suggestions

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-12-17 13:37:26 -05:00
ebb19b34d2 chore: add shadcnui popover, deprecate MUI popover (#15884)
Add popover component from shadcn/ui -
https://ui.shadcn.com/docs/components/popover

This is preparation for replacing MUI popover and additional work for
organizations redesigns:
https://www.figma.com/design/OR75XeUI0Z3ksqt1mHsNQw/Dashboard-v1?node-id=139-1380&m=dev
2024-12-17 13:31:05 -05:00
21cc6f77fe docs: move premium and enterprise badges from heading to info in admonition (#15774)
closes https://github.com/coder/coder.com/issues/666


[preview](https://coder.com/docs/@666-unheading-premium/user-guides/workspace-scheduling#autostop-requirement)

---------

Co-authored-by: EdwardAngert <2408959-EdwardAngert@users.noreply.gitlab.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-12-17 18:20:01 +00:00
badebc79cb chore: add new avatar component (#15882)
Related to https://github.com/coder/coder/issues/14997

- Add a new `Avatar` component based on the [new avatar
design](https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=711-383&t=xqxOSUk48GvDsjGK-0).
- Deprecate existent `Avatar` component.
2024-12-17 05:55:31 -03:00
468ffd9919 docs: copy edit the organizations doc and add link to best practices (#15888)
[preview](https://coder.com/docs/@orgs-edit-202412/admin/users/organizations)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-12-17 10:44:21 +05:00
e191d9650c feat: support created_at filter for the GET /users endpoint (#15633)
Closes https://github.com/coder/coder/issues/12747

We support these filters currently:
https://coder.com/docs/v2/latest/admin/users#user-filtering, adding
`created_at` filter as well.
2024-12-17 15:24:54 +11:00
f16c80916e chore: make coder dogfood use dev.registry.coder.com (#15889)
This PR makes the dogfood template use `dev.registry.coder.com` for its
terraform module registry. I think this should be the state going
forward so that every new deployment of the registry gets a small amount
of dogfooding before going live.
2024-12-16 16:02:52 -06:00
74f07ec9ae docs: add new security doc to best practices section (#15805)
[preview](https://coder.com/docs/@bp-security/tutorials/best-practices/security-best-practices)

---------

Co-authored-by: EdwardAngert <2408959-EdwardAngert@users.noreply.gitlab.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Spike Curtis <spike@coder.com>
2024-12-16 20:47:38 +00:00
89479cc843 fix(dogfood): re-enable process priority management for dogfood (#15765)
- The dogfood-related bugs with this feature are (hopefully) resolved.

This reverts commit 19ec6af2ad.
2024-12-16 21:05:28 +02:00
05914cb929 fix: disable init() function in github/charmbracelet/bubbletea dependency (#15817)
- Fixes an issue where an init function
causes writes to the terminal when using `agent-exec` which results in raw
ansi characters being printed to the web terminal.
- Was also causing significant latency in launching a web terminal
2024-12-16 20:58:36 +02:00
202f7f70f0 feat: create e2e tests for organization custom roles page (#15814)
Adds 5 premium tests and 1 non-premium test.
2024-12-16 10:42:52 -05:00
4c939a6461 ci: bump the github-actions group with 3 updates (#15874)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-16 18:14:32 +05:00
8b51fdc6b5 ci: pin weekly-docs runner ubuntu version to 22.04 (#15873)
The action is currently failing due to the runner using `ubuntu-latest`
See [the ubuntu
blog](https://ubuntu.com/blog/whats-new-in-security-for-ubuntu-24-04-lts#:~:text=22.04%20LTS.-,Unprivileged%20user%20namespace%20restrictions,-Unprivileged%20user%20namespaces)
for more.
2024-12-16 10:23:11 +00:00
c84bf9f815 chore(docs): bump version in release calendar, kubernetes install docs (#15737) 2024-12-16 09:29:41 +00:00
14ce3aa018 chore(go.mod): update x/crypto to 0.31.0 (#15869) 2024-12-16 09:20:31 +00:00
2eee201cd8 fix: encode .dockerconfigjson value for kubernetes-devcontainer example template (#15819)
Value of `.dockerconfigjson` in kubernetes_secret datasource is already
decoded, so I encode it again to avoid error for
`ENVBUILDER_DOCKER_CONFIG_BASE64`
2024-12-16 09:05:44 +00:00
67fdbe5f49 fix(vpn): use unbuffered channel in speaker (#15863)
Closes https://github.com/coder/internal/issues/253.
2024-12-16 19:48:00 +11:00
50bb13ca7d chore: bump golang.org/x/crypto from 0.30.0 to 0.31.0 in /scripts/apitypings (#15840) 2024-12-16 16:03:52 +09:00
409e2c7a20 fix: use random names for TestUpdateUserProfile (#15868)
Fixes a flake seen in
https://github.com/coder/coder/actions/runs/12346801529/job/34452940351
It's possible but exceedingly rare for the randomly generated username
to be exactly 32 characters.
Then, appending a `1` to that username causes the username to be invalid
and the test to fail. Instead of appending we'll just generate a new
username that is <=32 characters.

The `UpdateSelf` subtest has the same appending, but uses a fixed
username that is less than 32 characters, so it doesn't need to be
changed.
2024-12-16 06:59:44 +00:00
c92f480fcf chore: add e2e test for org groups (#15853) 2024-12-13 15:14:12 -08:00
50ff06cc3c chore: acquire lock for individual workspace transition (#15859)
When Coder is ran in High Availability mode, each Coder instance has a
lifecycle executor. These lifecycle executors are all trying to do the
same work, and whilst transactions saves us from this causing an issue,
we are still doing extra work that could be prevented.

This PR adds a `TryAcquireLock` call for each attempted workspace
transition, meaning two Coder instances shouldn't duplicate effort.
2024-12-13 16:59:27 +00:00
d504e0ea66 feat: add support for specifying LoadBalancer class name (#15838)
This PR adds support for configuring the loadBalancerClass via the chart
values.
2024-12-13 15:33:16 +00:00
34a2ec8ad9 ci: build images on depot again (#15860) 2024-12-13 13:59:24 +00:00
6116776905 feat: show warning dialog if user switches off assign default org (#15848)
resolves coder/internal#240

Switching off the setting to automatically assign all users to the
default organization is potentially disruptive. This adds a warning
dialog before the change is commited.

<img width="1168" alt="Screenshot 2024-12-13 at 11 20 16"
src="https://github.com/user-attachments/assets/e6bf8c97-3cad-4501-9f28-073fca118668"
/>
2024-12-13 06:24:40 -05:00
b5ba3e3da8 fix(site): only show provisioner warnings for pending workspaces (#15858)
When creating, starting, stopping or otherwise mutating a workspace, we
used to erroneously and briefly display a provisioner health warning
alert. This PR updates the component to only display this warning if the
build is pending, not "starting" or any other state that means a
provisioner has already acquired the job.
2024-12-13 11:58:19 +02:00
d35de45d94 ci: try building images on GitHub-hosted runner again (#15854) 2024-12-12 23:33:22 +00:00
0e98c0e456 fix(site): remove a misplaced warning banner in the frontend (#15837)
This PR fixes some faulty frontend logic that was introduced in #15686
2024-12-12 17:25:10 +02:00
08f0eaaf3b feat: add new scaletest infrastructure (#15573)
Closes https://github.com/coder/internal/issues/148

This has been validated to have working proxies with the `small`
scenario.

- [x] multi-region gcp infrastructure
- [x] use cloudflare provider to automate dns entries
- [x]  automate proxy registration
- [x] multi-regional proxies
- [x] move scenarios into locals

This excludes the infrastructure for `cert-manager` and `otel-collector`
and those will be included in followup PRs.
2024-12-12 09:28:49 -05:00
d31c2f1fe7 chore: implement SCIM PUT endpoint, protect against missing active (#15829)
Closes https://github.com/coder/coder/issues/15828
2024-12-12 08:11:13 -06:00
36c2cf8a40 fix(coderd/database): exclude canceled jobs in queue position (#15835)
When calculating the queue position in
`GetProvisionerJobsByIDsWithQueuePosition` we only counted jobs with
`started_at = NULL`. This is misleading, as it allows canceling or
canceled jobs to take up rows in the computed queue position, giving an
impression that the queue is larger than it really is.

This modifies the query to also exclude jobs with a null `canceled_at`,
`completed_at`, or `error` field for the purposes of calculating the
queue position, and also adds a test to validate this behaviour.

(Note: due to the behaviour of `dbgen.ProvisionerJob` with `dbmem` I had
to use other proxy methods to validate the corresponding dbmem
implementation.)

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2024-12-12 12:37:45 +00:00
edb0cb155f chore: remove Johannesburg server from dogfood (#15842) 2024-12-12 06:44:51 +00:00
04032f2a97 ci: only build dylib on PRs with Go changes (#15839)
For some reason we were building the dylib on any code changes, now it's
just Go (and CI) changes - using the same condition that `go-test` uses.

`if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci ==
'true' || github.ref == 'refs/heads/main'`

The main check ensures that it's always run before `build` is run.
2024-12-12 06:22:51 +00:00
737205ed8e feat(site): add numbers to SSHButton content for clarity (#15661) 2024-12-12 15:39:34 +10:00
06e7739e7d chore: add e2e tests for organization members (#15807) 2024-12-11 15:48:48 -07:00
29c9bbf2bb docs: add new organizations docs to best practices section (#15732)
Co-authored-by: EdwardAngert <2408959-EdwardAngert@users.noreply.gitlab.com>
Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-12-11 16:32:21 -05:00
077e594856 chore: switch to guts for typescript types generation (#15801)
switch to guts for typescript type generation
omitempty vs null must now be explicit
2024-12-11 14:39:21 -06:00
2ec2e8ae6d docs: add istio docs (#15733)
closes https://github.com/coder/coder/issues/11821
2024-12-11 17:48:28 +00:00
128a126486 chore: bump nanoid from 3.3.6 to 3.3.8 in /offlinedocs (#15809)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 21:48:58 +05:00
5ea14339ed chore: bump github.com/gohugoio/hugo from 0.139.2 to 0.139.4 (#15804)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 21:48:46 +05:00
b39becba66 feat(site): add a provisioner warning to workspace builds (#15686)
This PR adds warnings about provisioner health to workspace build pages.
It closes https://github.com/coder/coder/issues/15048


![image](https://github.com/user-attachments/assets/fa54d0e8-c51f-427a-8f66-7e5dbbc9baca)

![image](https://github.com/user-attachments/assets/b5169669-ab05-43d5-8553-315a3099b4fd)
2024-12-11 13:38:13 +02:00
104898ae87 fix: docs reference in create headless user flow (#15826)
when creating a headless user, the linked documentation sent users to
the `Disable password auth` page, instead of the headless user
documentation. this PR corrects the typescript.
2024-12-11 11:38:03 +00:00
c5287910f9 feat: add workspace build timing metrics (#15771)
This PR introduces a new prometheus metrics for
`workspace_build_timing_seconds`, which specifically reports workspace
build times. To reduce cardinality, this metrics excludes
`workspace_name` and `workspace_owner` that are present on the
`workspace_builds_total` metrics.
2024-12-11 05:36:48 +00:00
ea9e39d87c fix: give cla workflow pull request write permissions (#15820)
When https://github.com/coder/coder/pull/15349 was added, it implicitly
set all the other permissions to none.

From
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
> If you specify the access for any of these permissions, all of those
that are not specified are set to none.
2024-12-11 15:53:08 +11:00
426b348560 chore: bump nanoid from 3.3.7 to 3.3.8 in /site (#15810) 2024-12-10 10:30:23 -07:00
5e7199233c docs: add cli steps for org sync (#15673)
[preview](https://coder.com/docs/@15431-docs-org-sync/admin/users/idp-sync#organization-sync-premium)

---------

Co-authored-by: EdwardAngert <2408959-EdwardAngert@users.noreply.gitlab.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-12-10 11:09:41 -05:00
7dc3ad9f21 fix(provisioner/terraform/tfparse): evaluate coder_parameter defaults with variables (#15800)
- adds support for dynamic default values in coder_parameter data source
2024-12-10 10:58:12 +00:00