Commit Graph

8729 Commits

Author SHA1 Message Date
Cian Johnston 7b88776403 chore(testutil): add testutil.GoleakOptions (#16070)
- Adds `testutil.GoleakOptions` and consolidates existing options to
this location
- Pre-emptively adds required ignore for this Dependabot PR to pass CI
https://github.com/coder/coder/pull/16066
2025-01-08 15:38:37 +00:00
Hugo Dutka 106b1cd3bc chore: convert dbauthz tests to also run with Postgres (#15862)
Another PR to address https://github.com/coder/coder/issues/15109.

- adds the DisableForeignKeysAndTriggers utility, which simplifies
converting tests from in-mem to postgres
- converts the dbauthz test suite to pass on both the in-mem db and
Postgres
2025-01-08 16:22:51 +01:00
Muhammad Atif Ali 13cfaae619 chore: update JetBrains IDE icons (#16065)
JetBrains have updated the icons as per
https://www.jetbrains.com/company/brand/#logos-and-icons.
Noticed while adding #16057
2025-01-08 19:29:53 +05:00
Mathias Fredriksson ba6e84dec3 fix(cli/ssh): retry on autostart conflict (#16058) 2025-01-08 15:15:30 +02:00
Cian Johnston 53d9c7ebe4 chore(go.mod): remove replace directive for dlclark/regexp2 (#16069)
Right now, it looks like we only utilise dlclark/regexp2 as a transitive
dependency of charmbracelet/glamour:

```
$ go mod why github.com/dlclark/regexp2
# github.com/dlclark/regexp2
github.com/coder/coder/v2/coderd/render
github.com/charmbracelet/glamour/ansi
github.com/alecthomas/chroma/v2
github.com/dlclark/regexp2
```

The reason for this replacement was to avoid a goroutine leak in unit
tests.
However, I'm currently unable to replace the goroutine leak as we do not
perform any leak detection tests in `coderd/render`.

If required, we can use the workaround detailed in regexp2's README.md:


https://github.com/dlclark/regexp2/blob/v1.11.4/README.md#goroutine-leak-error
2025-01-08 13:15:13 +00:00
Cian Johnston dc293ea72c chore(go.mod): update pkg/sftp to version including fix for pkg/sftp#574 (#16068)
Fix for github.com/pkg/sftp#574 was merged in
https://github.com/pkg/sftp/commit/46d90e3f96e83d4fe2cad4163685ed92d056a236
so we can remove this replace directive now.
2025-01-08 13:07:06 +00:00
Jaayden Halko 8a0094ce70 feat: add redesigned organization settings sidebar (#15932)
resolves coder/internal#173, coder/internal#175

This PR does the following
1. Updates the left sidebar for organizations to use a dropdown to
select the organization
2. Move the create organization button inside the dropdown
3. Update the design of the create organization page
4. Do not display the organization in the dropdown if there is only 1
org to display

Figma:
https://www.figma.com/design/OR75XeUI0Z3ksqt1mHsNQw/Dashboard-v1?node-id=139-1380&m=dev

The loading state for the save button in the create organization form
will be handled separately after #14978 is completed.

Note: Since the dropdown is based off the cmdk component, navigation in
the dropdown is handled by the arrow keys, https://cmdk.paco.me/

<img width="560" alt="Screenshot 2025-01-03 at 21 11 26"
src="https://github.com/user-attachments/assets/ff6e61ab-c8d4-4f97-b603-306492e9bfec"
/>
<img width="641" alt="Screenshot 2025-01-03 at 21 11 39"
src="https://github.com/user-attachments/assets/fedb28e0-9ef3-4b0f-8665-06215338f351"
/>
<img width="1178" alt="Screenshot 2025-01-03 at 21 12 05"
src="https://github.com/user-attachments/assets/ee672533-2689-4b2e-a7bf-471ea72e1095"
/>
<img width="1177" alt="Screenshot 2025-01-03 at 21 12 39"
src="https://github.com/user-attachments/assets/f13824a6-2581-4bff-b5b6-2024c2e145a4"
/>
2025-01-08 08:01:00 -05:00
Cian Johnston dcf0337455 chore(go.mod): update fork of terraform-config-inspect (#16059)
Updates our fork of github.com/hashicorp/terraform-config-inspect to new location
2025-01-08 12:16:12 +00:00
Edward Angert 9fe92a9463 docs: fix workspacebuilds logs api docs (#16062)
Co-authored-by: coryb <cbennett@netflix.com>
2025-01-08 09:34:54 +05:00
Muhammad Atif Ali 5895c37db4 docs: expand the list of JetBrains IDEs supported via Gateway (#16060) 2025-01-07 15:11:41 -05:00
Edward Angert ee1829ba71 docs: update external auth to better explain process (#16027)
- adds to @ChristopherJTrent's PR #15970

> Adds more information on how to add external auth, including
docker-compose and docker CLI examples and terraform code for template
integration.

- general edits and improvements to the external-auth doc


[preview](https://coder.com/docs/@15970-external-auth-update/admin/external-auth)

---------

Co-authored-by: Christopher Trent <ChristopherJTrent@outlook.com>
Co-authored-by: Muhammad Atif Ali <me@matifali.dev>
2025-01-07 15:10:16 -05:00
Phorcys 8fb7832b27 feat(examples/templates/azure-windows): add azure region and windows-rdp modules (#15516) 2025-01-07 18:41:04 +00:00
Muhammad Atif Ali c41254b9b6 chore(site): use .gitignore in biome.jsonc (#16026) 2025-01-07 23:21:10 +05:00
Bruno Quaresma cb6facb53a refactor: use the new button component on forms and dialogs (#16050)
This is a significant PR that will impact many parts of the UI, so I’d
like to ask you, @jaaydenh, for a very thorough review of the Storybook
stories on Chromatic. I know it’s a bit of a hassle with around 180
stories affected, but it’s all for a good cause 💪

Main changes:
- Update the `Button` component to match the [new buttons
design](https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=3-1756&p=f&m=dev).
- Update forms and dialogs to use the new `Button` component.

Related to https://github.com/coder/coder/issues/14978
2025-01-07 14:28:58 -03:00
Vincent Vielle 289338f19e feat(site): connect open_in parameter (#16036)
Second step to resolve [open_in
issue](https://github.com/coder/terraform-provider-coder/issues/297)

This PR improves the way the open_in parameter is forwarded across the
code, changing the last `string` to const everywhere.

Also make sure it is available and forwarded up to the `CreateLink`
component.
2025-01-07 18:08:03 +01:00
Muhammad Atif Ali b5c85a8abd feat(site): add RustRover icon for JetBrains Gateway module (#16057) 2025-01-07 20:50:00 +05:00
Bruno Quaresma fc7a7dfff7 fix: adjust template row alignment when missing description (#16056)
Fix https://github.com/coder/coder/issues/16046

**Before:**

![image](https://github.com/user-attachments/assets/90640f04-4d41-463e-b81d-92b78cba10f5)

**After:**
<img width="1336" alt="Screenshot 2025-01-07 at 09 34 28"
src="https://github.com/user-attachments/assets/33f0f9b1-0594-41c3-93c3-3225f791e2cf"
/>


**Bonus:**
Adjust the skeleton to match the new design.
2025-01-07 09:41:26 -03:00
Stephen Kirby b98a1add98 chore(docs): skip january release in calendar (#16052)
We're skipping the January release as our teams have been out during the
holidays. Our next minor version increment will be on February 4th.
2025-01-06 16:18:43 -06:00
dependabot[bot] 79c0f41ce7 chore: bump github.com/zclconf/go-cty from 1.15.1 to 1.16.0 (#16044)
Bumps [github.com/zclconf/go-cty](https://github.com/zclconf/go-cty)
from 1.15.1 to 1.16.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-06 14:48:18 +00:00
dependabot[bot] 10a9d963b7 chore: bump github.com/coreos/go-oidc/v3 from 3.11.0 to 3.12.0 (#16043)
Bumps [github.com/coreos/go-oidc/v3](https://github.com/coreos/go-oidc)
from 3.11.0 to 3.12.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-06 08:15:20 -06:00
dependabot[bot] e78c6c2f4f chore: bump the x group with 3 updates (#16042)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-06 18:25:11 +05:00
Phorcys 0870ff2410 chore: unify azure-linux and azure-windows templates (#16039) 2025-01-06 09:24:16 +04:00
jung 3043e79a28 chore: fix template-from-scratch.md (#16041)
Added the missing line to make the code snippet work
2025-01-06 12:06:31 +11:00
Muhammad Atif Ali 95d769da41 chore: ignore cherry-pick-bot created branches for Deploy PR (#16037) 2025-01-04 16:55:43 +05:00
dependabot[bot] 532625b2ed chore: bump @radix-ui/react-slot from 1.1.0 to 1.1.1 in /site (#16005)
Bumps [@radix-ui/react-slot](https://github.com/radix-ui/primitives)
from 1.1.0 to 1.1.1.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/radix-ui/primitives/commits">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~chancestrickland">chancestrickland</a>, a
new releaser for <code>@​radix-ui/react-slot</code> since your current
version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@radix-ui/react-slot&package-manager=npm_and_yarn&previous-version=1.1.0&new-version=1.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-04 10:42:49 +05:00
Muhammad Atif Ali 8f570d6f01 ci: integrate cherry-pick-bot (#15973)
Integrates
[`cherry-pick-bot`](https://github.com/googleapis/repo-automation-bots/tree/main/packages/cherry-pick-bot)
to automate cheery picks to release branches.

This works by commenting 

```
/cherry-pick release/2.XX
```
On any **Merged** or **Open** PR and this will automatically open the
cheery-pick PR.

- [x] [Install](https://github.com/apps/gcp-cherry-pick-bot) the bot to
`coder/coder` repo.

cc: @kylecarbs , @ammario and @sreya for installing the bot.


Some popular repos making use of this:

1. https://github.com/zed-industries/zed
2. https://github.com/flutter/flutter
3. https://github.com/argoproj/argo-cd
4. https://github.com/runatlantis/atlantis
5. https://github.com/flutter/engine
2025-01-04 09:13:48 +05:00
Cian Johnston 616d37db53 chore(cli): skip scaletest tests when race detector enabled (#16033)
Fixes https://github.com/coder/internal/issues/265

This isn't an ideal solution but the race detector tends to make these
flake out.
2025-01-03 23:08:51 +02:00
ケイラ 1364368e73 chore: cleanup Makefile (#16034)
- add `.PHONY` to some jobs where it was missing
- improve the test-e2e job by ensuring the frontend build is up to date
- some small correctness tweaks
2025-01-03 13:27:26 -07:00
Cian Johnston 1ab10cf80c fix(provisioner/terraform/tfparse): skip evaluation of unrelated parameters (#16023)
* Improves tfparse test coverage to include more parameter types and values
* Adds tests with unrelated parameters that should be ignored by tfparse
* Modifies tfparse to only attempt evaluation of parameters referenced by coder_workspace_tags
2025-01-03 19:32:17 +00:00
Charlie Voiselle 4e0963966d docs: markdown fixes and edits (#15527)
- **docs: improve admonition for need to add useHttpPath**
- **docs: fix list item nesting**
- **docs: fix list item nesting**
- **docs: improve admonition for authentication**
- **docs: tidy and update vault guide**
- **docs: improve admonitions**
- **docs: improve admonitions**
- **docs: content edits, reference links to make copy easier to read**

previews:
- <https://coder.com/docs/@fix-guides-list-numbers/admin/external-auth>
-
<https://coder.com/docs/@fix-guides-list-numbers/admin/integrations/island>

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: EdwardAngert <EdwardAngert@users.noreply.github.com>
2025-01-03 14:13:46 -05:00
Michael Smith f6d37f6fcc fix(site): ensure Error Boundary catches render errors correctly (#15963)
## Changes made
- Replaced previous `ErrorBoundary` functionality with
`GlobalErrorBoundary` component
- Wired up `GlobalErrorBoundary` to React Router rather than the top of
the app
2025-01-03 12:26:14 -05:00
Eng Zer Jun d788223688 chore: replace github.com/go-jose/go-jose/v3 with v4 (#16031)
Codebase currently uses both v3 and v4 versions of the `go-jose`
dependency. To maintain consistency, we should standardize on using only
the latest v4 version.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2025-01-03 11:21:49 -06:00
Steven Masley a7ed977ba9 chore: prevent db migrations from running on all cli commands (#15980) 2025-01-03 11:15:35 -06:00
Steven Masley 813270d63a chore: bump github.com/open-policy-agent/opa from 0.70.0 to 1.0.0 (#16013)
Opting into rego v1. Rego v1 requires `if` for all rule statements.

This PR updates the dependencies and the rego policy itself.

Golang imports upgraded for opa/rego

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-03 11:06:47 -06:00
dependabot[bot] 4495db8ce8 chore: bump the vite group across 1 directory with 2 updates (#15992)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-03 18:46:19 +05:00
ケイラ d0037670b0 chore: only run pnpm when node_modules are out of date in Makefile (#16017)
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2025-01-03 18:37:25 +05:00
Muhammad Atif Ali 94f5d52fdc chore: adopt markdownlint and markdown-table-formatter for *.md (#15831)
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2025-01-03 13:12:59 +00:00
Vincent Vielle 08463c27d8 feat: add OpenIn option to coder_app (#15743)
This PR is the coder/coder part of [the open_in parameter
issue](https://github.com/coder/terraform-provider-coder/issues/297)
aiming to add a new optional parameter to choose how to open modules.

This PR is heavily linked [to this
PR](https://github.com/coder/terraform-provider-coder/pull/321).

ℹ️ For now, some integrations tests can not be pushed as it requires a
release on the terraform-provider repo.
2025-01-03 11:27:02 +01:00
Edward Angert 3f1795fd92 docs: remove Coder from Quickstart title (#16016)
[preview](https://coder.com/docs/@quickstart-coder-coder/tutorials/quickstart)
2025-01-03 00:27:56 -05:00
ケイラ add6923e4a chore: remove leftover meticulous code (#16018)
Found a leftover dependency that got left in. No longer used!
2025-01-02 16:55:39 -07:00
Steven Masley 73ec6b2635 chore: audit log entries for all idp sync changes (#15919) 2025-01-02 15:02:04 -06:00
Edward Angert 761a19663f docs: document issue with direnv and nix-shell on macOS (#15990) (#16015)
- @paulroub's contribution to `CONTRIBUTING.md` adds a workaround and a
link to the direnv issue
- some editing to the format/layout of the doc

---------

Co-authored-by: Paul Roub <paul@roub.net>
2025-01-02 14:55:59 -05:00
Bruno Quaresma cee365670d chore: add spinner component (#16014)
This component is necessary to move forward with the "[Define a global
button style](https://github.com/coder/coder/issues/14978)" issue, as it
requires buttons to support loading states with spinners. The `Spinner`
component is heavily inspired by the [Radix UI Spinner
component](https://www.radix-ui.com/themes/docs/components/spinner) and
was developed with the help of [v0](https://v0.dev/).

**Preview**
![Screen Recording 2025-01-02 at 14 37
18](https://github.com/user-attachments/assets/838f6bb2-2125-4a55-9bee-3b3a52852d40)

---------

Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
2025-01-02 16:10:38 -03:00
dependabot[bot] 21a45cf4be chore: bump react-syntax-highlighter from 15.5.0 to 15.6.1 in /site (#16003) 2025-01-02 11:13:56 -07:00
dependabot[bot] e6d6e3002a chore: bump @radix-ui/react-dialog from 1.1.2 to 1.1.4 in /site (#15999)
Bumps @radix-ui/react-dialog from 1.1.2 to 1.1.4.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 12:56:38 -05:00
Cian Johnston 82070944f1 chore(provisionerd): close completeChan exactly once (#16011)
Fixes https://github.com/coder/internal/issues/263
2025-01-02 15:14:06 +00:00
Cian Johnston 9c625476b7 fix(examples): add keep_locally to docker_image resources (#16012)
Fixes https://github.com/coder/coder/issues/15972

Adds `keep_locally = true` to other templates that use the
`docker_image` resource to prevent the docker provider from attempting
to remove the image upon workspace deletion.

We had set this in some other places (such as the `dogfood` template)
but had not set this consistently in other templates.
2025-01-02 13:17:53 +00:00
Danielle Maywood f3fe3bc785 feat: notify on workspace update (#15979)
Relates to https://github.com/coder/coder/issues/15845

When the `/workspace/<name>/builds` endpoint is hit, we check if the
requested template version is different to the previously used template
version. If these values differ, we can assume that the workspace has
been manually updated and send the appropriate notification. Automatic
updates happen in the lifecycle executor and bypasses this endpoint
entirely.
2025-01-02 12:19:34 +00:00
Cian Johnston 445392bdd8 chore(apiversion): add guidelines regarding bumping apiversion (#16009)
Adds some package-level documentation to reduce confusion on when it is
appropriate or warranted to bump apiversions.
2025-01-02 10:41:36 +00:00
Spike Curtis 18600d3620 docs: add note about TLD and wildcards (#16008)
Adds docs to hopefully help others avoid https://github.com/coder/coder/discussions/15708
2025-01-02 14:01:28 +04:00