Compare commits

...

854 Commits

Author SHA1 Message Date
Dean Sheather e0ebeebb29 chore: apply Dockerfile architecture fixes (#17601) 2025-04-29 09:34:51 -05:00
gcp-cherry-pick-bot[bot] dd50c4ecc9 fix(scripts/release): handle cherry-pick bot titles in check commit metadata (cherry-pick #17535) (#17537)
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2025-04-23 17:46:46 +05:00
gcp-cherry-pick-bot[bot] bda202f3f1 feat: add path & method labels to prometheus metrics (cherry-pick #17362) (#17416) 2025-04-18 21:37:19 +02:00
Michael Suchacz 0f27da0359 feat: extend request logs with auth & DB info and log long lived connections early (#17422) 2025-04-16 19:37:59 +02:00
gcp-cherry-pick-bot[bot] 7c4c5048bc chore: fix gpg forwarding test (cherry-pick #17355) (#17429)
Cherry-picked chore: fix gpg forwarding test (#17355)

Co-authored-by: Dean Sheather <dean@deansheather.com>
2025-04-16 19:11:13 +02:00
gcp-cherry-pick-bot[bot] 17dbb517ad chore: ignore commit metadata check in release script (cherry-pick #16495) (#16831)
Cherry-picked chore: ignore commit metadata check in release script
(#16495)

The `scripts/release/check_commit_metadata.sh` check was too strict for
our new cherry-picking process. This turns the error into a warning log.

Co-authored-by: Stephen Kirby <58410745+stirby@users.noreply.github.com>
2025-03-06 11:00:57 -08:00
Jon Ayers d31c994018 chore: upgrade terraform to 1.10.5 (#16519) (#16806)
- Updates `terraform` to
[v1.10.5](https://github.com/hashicorp/terraform/blob/v1.10.5/CHANGELOG.md#1105-january-22-2025)
- Updates provider to >=2.0.0 in provider testdata fixtures
- Fixes provider to required release version for resource monitors
- Fixes missing leading / in volumes in resource monitor tests ---------

---------

Co-authored-by: Colin Adler <colin1adler@gmail.com>
Co-authored-by: Cian Johnston <cian@coder.com>
2025-03-04 14:12:12 -08:00
gcp-cherry-pick-bot[bot] 552c4cd93d fix: handle undefined job while updating build progress (cherry-pick #16732) (#16741)
Cherry-picked fix: handle undefined job while updating build progress
(#16732)

Fixes: https://github.com/coder/coder/issues/15444

Co-authored-by: Marcin Tojek <mtojek@users.noreply.github.com>
2025-02-28 15:08:59 +05:00
gcp-cherry-pick-bot[bot] fb71cb5f96 fix: fix broken troubleshooting link (cherry-pick #16469) (#16472)
Co-authored-by: Marcin Tojek <mtojek@users.noreply.github.com>
fix: fix broken troubleshooting link (#16469)
Fixes: https://github.com/coder/coder/issues/16468
2025-02-06 14:51:07 +05:00
gcp-cherry-pick-bot[bot] 2f32b11831 fix(site): fix agent and web terminal troubleshooting links (cherry-pick #16353) (#16405)
Co-authored-by: M Atif Ali <atif@coder.com>
2025-02-04 12:53:51 +05:00
Stephen Kirby a9775fa3d5 chore: cherry-pick items for 2.19 (#16412)
Co-authored-by: Hugo Dutka <hugo@coder.com>
Co-authored-by: Danielle Maywood <danielle@themaywoods.com>
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
Co-authored-by: ケイラ <mckayla@hey.com>
2025-02-03 17:06:05 -06:00
Ethan a658ccf362 fix(vpn): send subnet masks and prefix lengths from router (#16317)
These were somehow missed when I wrote the router..

Also updates `coder/tailscale` to bring in the DNS changes
https://github.com/coder/tailscale/pull/64
2025-01-29 15:11:08 +11:00
Jaayden Halko d32a5e1a01 fix: fix UI bugs for orgs (#16302)
resolves coder/internal#288
resolves coder/internal#287

Fixes alignment issue on create organizations page when license banner
is visible.

before
<img width="1178" alt="Screenshot 2025-01-27 at 18 36 35"
src="https://github.com/user-attachments/assets/b845f1df-adb3-4876-aba5-8fa9d56eb22b"
/>

after
<img width="961" alt="Screenshot 2025-01-27 at 18 47 06"
src="https://github.com/user-attachments/assets/4a6374f9-9571-453c-9258-9cc4631afb77"
/>
2025-01-28 15:47:05 -05:00
Thomas Kosiewski 1336925c9f feat(flake.nix): switch dogfood dev image to buildNixShellImage from dockerTools (#16223)
Replace Depot build action with Nix for Nix dogfood image builds

The dogfood Nix image is now built using Nix's native container tooling instead of Depot. This change:

- Adds Nix setup steps to the GitHub Actions workflow
- Removes the Dockerfile.nix in favor of a Nix-native container build
- Updates the flake.nix to support building Docker images
- Introduces a hash file to track Nix-related changes
- Updates the vendorHash for Go dependencies

Change-Id: I4e011fe3a19d9a1375fbfd5223c910e59d66a5d9
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-01-28 16:38:37 +01:00
Cian Johnston 279c08e9d4 chore(scaletest/createworkspaces): address context usage (#16306)
Fixes https://github.com/coder/internal/issues/324

We had been using a `testutil.Context` in combination with a separate
`context.WithTimeout()` that smelled iffy to me.

Also reworked part of the second `require.Eventually` loop to pull a job
ID from the first one, and added some more logging to aid future
debugging.
2025-01-28 15:28:43 +00:00
Ethan bb69054716 fix(cli): remove loading indicator when pinging with verbose logs (#16305)
This was causing some verbose log lines to be prepended with the spinner
message, e.g.
```
◱ Collecting diagnostics...2025-01-28 10:26:27.502
```
which doesnt look very good. 

Presumably anyone running it with verbose will know it takes a moment to collect diagnostics first.
2025-01-28 14:08:39 +00:00
Mathias Fredriksson b44ae40bbb test(cli): speed up stackdriver logging tests by setting GCE env (#16298) 2025-01-28 13:38:05 +02:00
Ethan ab92306d01 fix(vpn): handle sending nil router config (#16267)
Previously, a `nil` Router config would cause a panic in the dylib.
Normally, a nil Router config would indicate a shutdown of the service,
and that settings should be reset. However, for Coder Desktop macOS the
network configuration will be reset by the disconnecting of the system
VPN, so we'll instead do nothing.
2025-01-28 20:47:21 +11:00
Cian Johnston 76adde91dc fix(provisioner/terraform/tfparse): allow empty values in coder_workspace_tag defaults (#16303)
* chore(docs): update docs re workspace tag default values
* chore(coderdenttest): use random name instead of t.Name() in newExternalProvisionerDaemon
* fix(provisioner/terraform/tfparse): allow empty values in coder_workspace_tag defaults
2025-01-28 09:11:39 +00:00
Jaayden Halko f5186699ad feat: enable editing of IDP sync configuration for groups and roles in the UI (#16098)
contributes to #15290 

The goal of this PR is to port the work to implement CRUD in the UI for
IDP organization sync settings and apply this to group and role IDP sync
settings.

<img width="1143" alt="Screenshot 2025-01-16 at 20 25 21"
src="https://github.com/user-attachments/assets/c5d09291-e98c-497c-8c23-a3cdcdccb90d"
/>
<img width="1142" alt="Screenshot 2025-01-16 at 20 25 39"
src="https://github.com/user-attachments/assets/1f569e1f-1474-49fa-8c80-aa8cf0d0e4db"
/>
2025-01-27 13:31:48 -05:00
Mathias Fredriksson 75c899ff71 feat(cli): add provisioner job cancel command (#16252)
Fixes #16117
Updates #15084
2025-01-27 16:26:56 +00:00
dependabot[bot] 84a54c1d7b ci: bump the github-actions group with 3 updates (#16299)
Bumps the github-actions group with 3 updates:
[dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata),
[github/codeql-action](https://github.com/github/codeql-action) and
[umbrelladocs/action-linkspector](https://github.com/umbrelladocs/action-linkspector).

Updates `dependabot/fetch-metadata` from 2.2.0 to 2.3.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dependabot/fetch-metadata/releases">dependabot/fetch-metadata's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump actions/create-github-app-token from 1.10.2 to 1.10.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/537">dependabot/fetch-metadata#537</a></li>
<li>Update readme to include an if conditional by <a
href="https://github.com/Nishnha"><code>@​Nishnha</code></a> in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/548">dependabot/fetch-metadata#548</a></li>
<li>Silence audit and funding messages from <code>npm</code> by <a
href="https://github.com/jeffwidman"><code>@​jeffwidman</code></a> in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/550">dependabot/fetch-metadata#550</a></li>
<li>Bump actions/create-github-app-token from 1.10.3 to 1.11.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/554">dependabot/fetch-metadata#554</a></li>
<li>fix readme action example by <a
href="https://github.com/CloudNStoyan"><code>@​CloudNStoyan</code></a>
in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/563">dependabot/fetch-metadata#563</a></li>
<li>Fixed missing outputs in action.yml by <a
href="https://github.com/CatChen"><code>@​CatChen</code></a> in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/564">dependabot/fetch-metadata#564</a></li>
<li>Handle branch names containing dependency group by <a
href="https://github.com/CloudNStoyan"><code>@​CloudNStoyan</code></a>
in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/565">dependabot/fetch-metadata#565</a></li>
<li>v2.3.0 by <a
href="https://github.com/fetch-metadata-action-automation"><code>@​fetch-metadata-action-automation</code></a>
in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/543">dependabot/fetch-metadata#543</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/CloudNStoyan"><code>@​CloudNStoyan</code></a>
made their first contribution in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/563">dependabot/fetch-metadata#563</a></li>
<li><a href="https://github.com/CatChen"><code>@​CatChen</code></a> made
their first contribution in <a
href="https://redirect.github.com/dependabot/fetch-metadata/pull/564">dependabot/fetch-metadata#564</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dependabot/fetch-metadata/compare/v2...v2.3.0">https://github.com/dependabot/fetch-metadata/compare/v2...v2.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/d7267f607e9d3fb96fc2fbe83e0af444713e90b7"><code>d7267f6</code></a>
Merge pull request <a
href="https://redirect.github.com/dependabot/fetch-metadata/issues/543">#543</a>
from dependabot/bump-to-v2.3.0</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/e3dd295a04f6eccc15a116fc5cde058f1735c05d"><code>e3dd295</code></a>
v2.3.0</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/3da9521b8c62beab87c4d18ad1e9bd7fd7b9d3bf"><code>3da9521</code></a>
Merge pull request <a
href="https://redirect.github.com/dependabot/fetch-metadata/issues/565">#565</a>
from CloudNStoyan/main</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/de52f600152fa3f48a82e88e06e864cba8421436"><code>de52f60</code></a>
update build</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/59d2b1fb73ac123a1953e2ddc99ea8f1b869463a"><code>59d2b1f</code></a>
fix incorrect parsing of directory when using dependency-group</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/0d270694949cee4e6c179fc89629d95e0b9fb763"><code>0d27069</code></a>
Merge pull request <a
href="https://redirect.github.com/dependabot/fetch-metadata/issues/564">#564</a>
from CatChen/fixed-missing-outputs-in-action-yml</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/5a7546a6e709997b54d62d4e673a23eaa8621a26"><code>5a7546a</code></a>
Fixed missing outputs in action.yml</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/06ea45a2e4582d87b11f03c7ce596ae3261f39f6"><code>06ea45a</code></a>
Merge pull request <a
href="https://redirect.github.com/dependabot/fetch-metadata/issues/563">#563</a>
from CloudNStoyan/main</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/bbfca7ec1c0b06b16cc955f242ebc9f1c8daa4f4"><code>bbfca7e</code></a>
fix readme action example</li>
<li><a
href="https://github.com/dependabot/fetch-metadata/commit/b0d0393a82702c1819b5ae7ad6ea780cd8c18aae"><code>b0d0393</code></a>
Merge pull request <a
href="https://redirect.github.com/dependabot/fetch-metadata/issues/554">#554</a>
from dependabot/dependabot/github_actions/actions/cre...</li>
<li>Additional commits viewable in <a
href="https://github.com/dependabot/fetch-metadata/compare/dbb049abf0d677abbd7f7eee0375145b417fdd34...d7267f607e9d3fb96fc2fbe83e0af444713e90b7">compare
view</a></li>
</ul>
</details>
<br />

Updates `github/codeql-action` from 3.28.1 to 3.28.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.28.5</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.28.5 - 24 Jan 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.20.3. <a
href="https://redirect.github.com/github/codeql-action/pull/2717">#2717</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.28.5/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.28.4</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.28.4 - 23 Jan 2025</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.28.4/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.28.3</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.28.3 - 22 Jan 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.20.2. <a
href="https://redirect.github.com/github/codeql-action/pull/2707">#2707</a></li>
<li>Fix an issue downloading the CodeQL Bundle from a GitHub Enterprise
Server instance which occurred when the CodeQL Bundle had been synced to
the instance using the <a
href="https://github.com/github/codeql-action-sync-tool">CodeQL Action
sync tool</a> and the Actions runner did not have Zstandard installed.
<a
href="https://redirect.github.com/github/codeql-action/pull/2710">#2710</a></li>
<li>Uploading debug artifacts for CodeQL analysis is temporarily
disabled. <a
href="https://redirect.github.com/github/codeql-action/pull/2712">#2712</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.28.3/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v3.28.2</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>3.28.2 - 21 Jan 2025</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.28.2/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>[UNRELEASED]</h2>
<p>No user facing changes.</p>
<h2>3.28.5 - 24 Jan 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.20.3. <a
href="https://redirect.github.com/github/codeql-action/pull/2717">#2717</a></li>
</ul>
<h2>3.28.4 - 23 Jan 2025</h2>
<p>No user facing changes.</p>
<h2>3.28.3 - 22 Jan 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.20.2. <a
href="https://redirect.github.com/github/codeql-action/pull/2707">#2707</a></li>
<li>Fix an issue downloading the CodeQL Bundle from a GitHub Enterprise
Server instance which occurred when the CodeQL Bundle had been synced to
the instance using the <a
href="https://github.com/github/codeql-action-sync-tool">CodeQL Action
sync tool</a> and the Actions runner did not have Zstandard installed.
<a
href="https://redirect.github.com/github/codeql-action/pull/2710">#2710</a></li>
<li>Uploading debug artifacts for CodeQL analysis is temporarily
disabled. <a
href="https://redirect.github.com/github/codeql-action/pull/2712">#2712</a></li>
</ul>
<h2>3.28.2 - 21 Jan 2025</h2>
<p>No user facing changes.</p>
<h2>3.28.1 - 10 Jan 2025</h2>
<ul>
<li>CodeQL Action v2 is now deprecated, and is no longer updated or
supported. For better performance, improved security, and new features,
upgrade to v3. For more information, see <a
href="https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/">this
changelog post</a>. <a
href="https://redirect.github.com/github/codeql-action/pull/2677">#2677</a></li>
<li>Update default CodeQL bundle version to 2.20.1. <a
href="https://redirect.github.com/github/codeql-action/pull/2678">#2678</a></li>
</ul>
<h2>3.28.0 - 20 Dec 2024</h2>
<ul>
<li>Bump the minimum CodeQL bundle version to 2.15.5. <a
href="https://redirect.github.com/github/codeql-action/pull/2655">#2655</a></li>
<li>Don't fail in the unusual case that a file is on the search path. <a
href="https://redirect.github.com/github/codeql-action/pull/2660">#2660</a>.</li>
</ul>
<h2>3.27.9 - 12 Dec 2024</h2>
<p>No user facing changes.</p>
<h2>3.27.8 - 12 Dec 2024</h2>
<ul>
<li>Fixed an issue where streaming the download and extraction of the
CodeQL bundle did not respect proxy settings. <a
href="https://redirect.github.com/github/codeql-action/pull/2624">#2624</a></li>
</ul>
<h2>3.27.7 - 10 Dec 2024</h2>
<ul>
<li>We are rolling out a change in December 2024 that will extract the
CodeQL bundle directly to the toolcache to improve performance. <a
href="https://redirect.github.com/github/codeql-action/pull/2631">#2631</a></li>
<li>Update default CodeQL bundle version to 2.20.0. <a
href="https://redirect.github.com/github/codeql-action/pull/2636">#2636</a></li>
</ul>
<h2>3.27.6 - 03 Dec 2024</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/github/codeql-action/commit/f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4"><code>f6091c0</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2721">#2721</a>
from github/update-v3.28.5-01f001931</li>
<li><a
href="https://github.com/github/codeql-action/commit/064af10f0de41995b41632364b4bfb00a34df047"><code>064af10</code></a>
Update changelog for v3.28.5</li>
<li><a
href="https://github.com/github/codeql-action/commit/01f0019310ce544d1cf748667a69f8fd6e26e48a"><code>01f0019</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2717">#2717</a>
from github/update-bundle/codeql-bundle-v2.20.3</li>
<li><a
href="https://github.com/github/codeql-action/commit/573ad887cd5b527e9baef02653bd455e1ff5181c"><code>573ad88</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2718">#2718</a>
from github/kaeluka/4779-1</li>
<li><a
href="https://github.com/github/codeql-action/commit/d7f39764f685cbe3764f763469a0d72383d7b9c8"><code>d7f3976</code></a>
permissions block in query-filters.yml</li>
<li><a
href="https://github.com/github/codeql-action/commit/428975ce2cf327a0e919004c63e734eddd0e6255"><code>428975c</code></a>
Add changelog note</li>
<li><a
href="https://github.com/github/codeql-action/commit/208091da0a1069394981cdf5e7a91a8ee3f10709"><code>208091d</code></a>
Update default bundle to codeql-bundle-v2.20.3</li>
<li><a
href="https://github.com/github/codeql-action/commit/7e3036b9cd87fc26dd06747b7aa4b96c27aaef3a"><code>7e3036b</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2716">#2716</a>
from github/mergeback/v3.28.4-to-main-ee117c90</li>
<li><a
href="https://github.com/github/codeql-action/commit/e32a0d62d44ac06377953bfaf3ffd43618be076a"><code>e32a0d6</code></a>
Update checked-in dependencies</li>
<li><a
href="https://github.com/github/codeql-action/commit/67c21e4084d5e020fbc969b839d42911b87fb8b5"><code>67c21e4</code></a>
Update changelog and version after v3.28.4</li>
<li>Additional commits viewable in <a
href="https://github.com/github/codeql-action/compare/b6a472f63d85b9c78a3ac5e89422239fc15e9b3c...f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4">compare
view</a></li>
</ul>
</details>
<br />

Updates `umbrelladocs/action-linkspector` from 1.2.4 to 1.2.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/umbrelladocs/action-linkspector/releases">umbrelladocs/action-linkspector's
releases</a>.</em></p>
<blockquote>
<h2>Release v1.2.5</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: disable AppArmor user namespace restrictions on the runner by
<a href="https://github.com/Realiserad"><code>@​Realiserad</code></a> in
<a
href="https://redirect.github.com/UmbrellaDocs/action-linkspector/pull/34">UmbrellaDocs/action-linkspector#34</a></li>
<li>chore(deps): update reviewdog/reviewdog to 0.20.3 by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/UmbrellaDocs/action-linkspector/pull/31">UmbrellaDocs/action-linkspector#31</a></li>
<li>Add fail_level argument and deprecate fail_on_error by <a
href="https://github.com/bitcoin-tools"><code>@​bitcoin-tools</code></a>
in <a
href="https://redirect.github.com/UmbrellaDocs/action-linkspector/pull/23">UmbrellaDocs/action-linkspector#23</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/Realiserad"><code>@​Realiserad</code></a> made
their first contribution in <a
href="https://redirect.github.com/UmbrellaDocs/action-linkspector/pull/34">UmbrellaDocs/action-linkspector#34</a></li>
<li><a
href="https://github.com/bitcoin-tools"><code>@​bitcoin-tools</code></a>
made their first contribution in <a
href="https://redirect.github.com/UmbrellaDocs/action-linkspector/pull/23">UmbrellaDocs/action-linkspector#23</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/UmbrellaDocs/action-linkspector/compare/v1.2.4...UmbrellaDocs:release-1.2.5">https://github.com/UmbrellaDocs/action-linkspector/compare/v1.2.4...UmbrellaDocs:release-1.2.5</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/de84085e0f51452a470558693d7d308fbb2fa261"><code>de84085</code></a>
Merge pull request <a
href="https://redirect.github.com/umbrelladocs/action-linkspector/issues/35">#35</a>
from UmbrellaDocs/release-1.2.5</li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/c6a59a6bf98fa2b8a152acaeff16921a3e39bc7b"><code>c6a59a6</code></a>
Added sample usage</li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/21ce8cd6fc4d2812628c7d6a353ea86bf085eb59"><code>21ce8cd</code></a>
Merge pull request <a
href="https://redirect.github.com/umbrelladocs/action-linkspector/issues/23">#23</a>
from bitcoin-tools/deprecate-fail-on-error</li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/e62bb2d5a68b84dfc5c0d1f61b133585a16ade13"><code>e62bb2d</code></a>
Fix YAML issues</li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/64e2b9bf4f671dd0c213d87f40148216b4a0882a"><code>64e2b9b</code></a>
mitigate risk of untrusted inputs and define shell</li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/e376d76f51c09def617e6cff4a49d04956213a15"><code>e376d76</code></a>
add backwards-compatability for <code>fail_on_error</code></li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/c6a531461dff91607a44a0221d82d3c087d5aeb1"><code>c6a5314</code></a>
replace deprecated option with fail_level</li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/b8d796f06117f0151d00b6131c5c6ae9884c8ddf"><code>b8d796f</code></a>
Merge pull request <a
href="https://redirect.github.com/umbrelladocs/action-linkspector/issues/31">#31</a>
from UmbrellaDocs/depup/reviewdog/reviewdog</li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/cde5159538b1a07765b494a136968cb9833df246"><code>cde5159</code></a>
Merge pull request <a
href="https://redirect.github.com/umbrelladocs/action-linkspector/issues/34">#34</a>
from Realiserad/main</li>
<li><a
href="https://github.com/UmbrellaDocs/action-linkspector/commit/d32de29fc2dd0fcdcf3da8f8a95e0a0c15f30e26"><code>d32de29</code></a>
fix: disable AppArmor user namespace restrictions on the runner</li>
<li>Additional commits viewable in <a
href="https://github.com/umbrelladocs/action-linkspector/compare/fc382e19892aca958e189954912fe379a8df270c...de84085e0f51452a470558693d7d308fbb2fa261">compare
view</a></li>
</ul>
</details>
<br />


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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 13:10:49 +00:00
dependabot[bot] 94b645db2e chore: bump storybook from 8.4.6 to 8.5.2 in /site (#16287)
Bumps
[storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/cli)
from 8.4.6 to 8.5.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/releases">storybook's
releases</a>.</em></p>
<blockquote>
<h2>v8.5.2</h2>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>v8.5.1</h2>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
<h2>v8.5.0</h2>
<h2>8.5.0</h2>
<p>Storybook 8.5 is packed with powerful features to enhance your
development workflow. This release makes it easier than ever to build
accessible, well-tested UIs. Here’s what’s new:</p>
<ul>
<li>🦾 Realtime accessibility tests to help build UIs for everybody</li>
<li>🛡️ Project code coverage to measure the completeness of your
tests</li>
<li>🎯 Focused tests for faster test feedback</li>
<li>⚛️ React Native Web Vite framework (experimental) for testing mobile
UI</li>
<li>⚛️ React 19 support</li>
<li>🎁 Storybook test early access program to level up your testing
game</li>
<li>💯 Hundreds more improvements</li>
</ul>
<!-- raw HTML omitted -->
<ul>
<li>Addon A11y: Add conditional rendering for a11y violation number in
Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30073">#30073</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Add typesVersions support for TypeScript definitions in
a11y package - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30005">#30005</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Adjust default behaviour when using with
experimental-addon-test - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30162">#30162</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Change default element selector - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30253">#30253</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Create a11y test provider and revamp a11y addon - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29643">#29643</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Don't set a11y tag as comment in automigrations - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30257">#30257</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Fix skipped status handling in Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30077">#30077</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Refactor environment variable handling for Vitest
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30022">#30022</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Remove warnings API - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30049">#30049</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Run the a11y automigration on postInstall - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30004">#30004</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Show errors of axe properly - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30050">#30050</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Update accessibility status handling in
TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30027">#30027</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Dynamically import rehype - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29544">#29544</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Make new code panel opt in - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30248">#30248</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
<li>Addon Onboarding: Prebundle react-confetti - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29996">#29996</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add <code>@vitest/coverage-v8</code> during postinstall
if no coverage reporter is installed - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29993">#29993</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Add prerequisite check for MSW - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30193">#30193</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add support for previewHead - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29808">#29808</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Add Vitest 3 support - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30181">#30181</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Always run Vitest in watch mode internally - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29749">#29749</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Always use installed version of vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30134">#30134</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md">storybook's
changelog</a>.</em></p>
<blockquote>
<h2>8.5.2</h2>
<ul>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>CLI: Corrected Next.js createScript for pnpm. - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30304">#30304</a>,
thanks <a
href="https://github.com/zhyd1997"><code>@​zhyd1997</code></a>!</li>
</ul>
<h2>8.5.1</h2>
<ul>
<li>Addon Test: Replace <code>interaction test</code> -&gt;
<code>component test</code> - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30333">#30333</a>,
thanks <a
href="https://github.com/kylegach"><code>@​kylegach</code></a>!</li>
<li>Addon Test: Support Vitest 3 browser.test.instances field - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30309">#30309</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Manager: Fix escaping of single quotes in dynamic import paths - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30278">#30278</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>RNW-Vite: Support requires for images/fonts - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30305">#30305</a>,
thanks <a
href="https://github.com/dannyhw"><code>@​dannyhw</code></a>!</li>
</ul>
<h2>8.5.0</h2>
<p>Storybook 8.5 is packed with powerful features to enhance your
development workflow. This release makes it easier than ever to build
accessible, well-tested UIs. Here’s what’s new:</p>
<ul>
<li>🦾 Realtime accessibility tests to help build UIs for everybody</li>
<li>🛡️ Project code coverage to measure the completeness of your
tests</li>
<li>🎯 Focused tests for faster test feedback</li>
<li>⚛️ React Native Web Vite framework (experimental) for testing mobile
UI⚛️</li>
<li>🎁 Storybook test early access program to level up your testing
game</li>
<li>💯 Hundreds more improvements</li>
</ul>
<!-- raw HTML omitted -->
<ul>
<li>Addon A11y: Add conditional rendering for a11y violation number in
Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30073">#30073</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Add typesVersions support for TypeScript definitions in
a11y package - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30005">#30005</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Adjust default behaviour when using with
experimental-addon-test - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30162">#30162</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Change default element selector - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30253">#30253</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Create a11y test provider and revamp a11y addon - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29643">#29643</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Don't set a11y tag as comment in automigrations - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30257">#30257</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Fix skipped status handling in Testing Module - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30077">#30077</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Refactor environment variable handling for Vitest
integration - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30022">#30022</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon A11y: Remove warnings API - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30049">#30049</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Run the a11y automigration on postInstall - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30004">#30004</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Show errors of axe properly - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30050">#30050</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon A11y: Update accessibility status handling in
TestProviderRender - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30027">#30027</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Dynamically import rehype - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29544">#29544</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Docs: Make new code panel opt in - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30248">#30248</a>,
thanks <a
href="https://github.com/shilman"><code>@​shilman</code></a>!</li>
<li>Addon Onboarding: Prebundle react-confetti - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29996">#29996</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add <code>@vitest/coverage-v8</code> during postinstall
if no coverage reporter is installed - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29993">#29993</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Add prerequisite check for MSW - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30193">#30193</a>,
thanks <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>!</li>
<li>Addon Test: Add support for previewHead - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29808">#29808</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Add Vitest 3 support - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30181">#30181</a>,
thanks <a
href="https://github.com/valentinpalkovic"><code>@​valentinpalkovic</code></a>!</li>
<li>Addon Test: Always run Vitest in watch mode internally - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29749">#29749</a>,
thanks <a
href="https://github.com/JReinhold"><code>@​JReinhold</code></a>!</li>
<li>Addon Test: Always use installed version of vitest - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30134">#30134</a>,
thanks <a
href="https://github.com/kasperpeulen"><code>@​kasperpeulen</code></a>!</li>
<li>Addon Test: Clarify message when <code>vitest</code> detects missing
deps - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29763">#29763</a>,
thanks <a
href="https://github.com/ndelangen"><code>@​ndelangen</code></a>!</li>
<li>Addon Test: Clear coverage data when starting or watching - <a
href="https://redirect.github.com/storybookjs/storybook/pull/30072">#30072</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
<li>Addon Test: Context menu UI - <a
href="https://redirect.github.com/storybookjs/storybook/pull/29727">#29727</a>,
thanks <a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>!</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/storybookjs/storybook/commit/7dac855e80e0d36a583f294c5005248b8b808d7a"><code>7dac855</code></a>
Bump version from &quot;8.5.1&quot; to &quot;8.5.2&quot; [skip ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/600af05703b90bdda5999ffa85b52928140a4902"><code>600af05</code></a>
Bump version from &quot;8.5.0&quot; to &quot;8.5.1&quot; [skip ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/92770672e5112dc397bd864c8013ea899e86fa47"><code>9277067</code></a>
Bump version from &quot;8.5.0-beta.11&quot; to &quot;8.5.0&quot; [skip
ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/d8fe93ac1b2abc66591419432eeba1cef09d7365"><code>d8fe93a</code></a>
Bump version from &quot;8.5.0-beta.10&quot; to &quot;8.5.0-beta.11&quot;
[skip ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/426586d37a59ba3c4aa37efdd720a0b0300f8785"><code>426586d</code></a>
Bump version from &quot;8.5.0-beta.9&quot; to &quot;8.5.0-beta.10&quot;
[skip ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/b607dbe575b79c28e47a99ccc45e40daa17c4d00"><code>b607dbe</code></a>
Bump version from &quot;8.5.0-beta.8&quot; to &quot;8.5.0-beta.9&quot;
[skip ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/3b979ee412c1363e5b397292e8e05dac3f0c22d7"><code>3b979ee</code></a>
Bump version from &quot;8.5.0-beta.7&quot; to &quot;8.5.0-beta.8&quot;
[skip ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/2b9f1cfc16b517ebf682daae8a7f8f64faca667e"><code>2b9f1cf</code></a>
Bump version from &quot;8.5.0-beta.6&quot; to &quot;8.5.0-beta.7&quot;
[skip ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/91f53fdf55b6349846f11056278b157560c9511a"><code>91f53fd</code></a>
Bump version from &quot;8.5.0-beta.5&quot; to &quot;8.5.0-beta.6&quot;
[skip ci]</li>
<li><a
href="https://github.com/storybookjs/storybook/commit/ef9ee273d6d5136245fda6cab72d22735dea3b75"><code>ef9ee27</code></a>
Bump version from &quot;8.5.0-beta.4&quot; to &quot;8.5.0-beta.5&quot;
[skip ci]</li>
<li>Additional commits viewable in <a
href="https://github.com/storybookjs/storybook/commits/v8.5.2/code/lib/cli">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=storybook&package-manager=npm_and_yarn&previous-version=8.4.6&new-version=8.5.2)](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-27 13:06:58 +00:00
dependabot[bot] e3b76b707c chore: bump the mui group across 1 directory with 5 updates (#16276)
Bumps the mui group with 5 updates in the /site directory:

| Package | From | To |
| --- | --- | --- |
|
[@mui/icons-material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material)
| `5.16.13` | `5.16.14` |
|
[@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material)
| `5.16.13` | `5.16.14` |
|
[@mui/system](https://github.com/mui/material-ui/tree/HEAD/packages/mui-system)
| `5.16.13` | `5.16.14` |
|
[@mui/utils](https://github.com/mui/material-ui/tree/HEAD/packages/mui-utils)
| `5.16.13` | `5.16.14` |
|
[@mui/x-tree-view](https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view)
| `7.23.2` | `7.24.1` |


Updates `@mui/icons-material` from 5.16.13 to 5.16.14
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mui/material-ui/releases"><code>@​mui/icons-material</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v5.16.14</h2>
<!-- raw HTML omitted -->
<p>A big thanks to the 1 contributor who made this release possible.</p>
<h3><code>@mui/material@5.16.14</code></h3>
<ul>
<li>[Autocomplete] Revert: Fix options list rendering in freeSolo mode
(<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material/issues/44857">#44857</a>)
<a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></li>
</ul>
<p>All contributors of this release in alphabetical order: <a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mui/material-ui/blob/v5.16.14/CHANGELOG.md"><code>@​mui/icons-material</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>v5.16.14</h2>
<!-- raw HTML omitted -->
<p><em>Jan 6, 2025</em></p>
<p>A big thanks to the 1 contributor who made this release possible.</p>
<h3><code>@mui/material@5.16.14</code></h3>
<ul>
<li>[Autocomplete] Revert: Fix options list rendering in freeSolo mode
(<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material/issues/44857">#44857</a>)
<a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></li>
</ul>
<p>All contributors of this release in alphabetical order: <a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mui/material-ui/commit/ba588c8333d765af63ab15c8b33dd947b615f70b"><code>ba588c8</code></a>
[release] v5.16.14 (<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material/issues/44955">#44955</a>)</li>
<li>See full diff in <a
href="https://github.com/mui/material-ui/commits/v5.16.14/packages/mui-icons-material">compare
view</a></li>
</ul>
</details>
<br />

Updates `@mui/material` from 5.16.13 to 5.16.14
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mui/material-ui/releases"><code>@​mui/material</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v5.16.14</h2>
<!-- raw HTML omitted -->
<p>A big thanks to the 1 contributor who made this release possible.</p>
<h3><code>@mui/material@5.16.14</code></h3>
<ul>
<li>[Autocomplete] Revert: Fix options list rendering in freeSolo mode
(<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/issues/44857">#44857</a>)
<a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></li>
</ul>
<p>All contributors of this release in alphabetical order: <a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mui/material-ui/blob/v5.16.14/CHANGELOG.md"><code>@​mui/material</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>v5.16.14</h2>
<!-- raw HTML omitted -->
<p><em>Jan 6, 2025</em></p>
<p>A big thanks to the 1 contributor who made this release possible.</p>
<h3><code>@mui/material@5.16.14</code></h3>
<ul>
<li>[Autocomplete] Revert: Fix options list rendering in freeSolo mode
(<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/issues/44857">#44857</a>)
<a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></li>
</ul>
<p>All contributors of this release in alphabetical order: <a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mui/material-ui/commit/ba588c8333d765af63ab15c8b33dd947b615f70b"><code>ba588c8</code></a>
[release] v5.16.14 (<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/issues/44955">#44955</a>)</li>
<li><a
href="https://github.com/mui/material-ui/commit/dd0bb69fe7575524b92e1080877d045b127a98be"><code>dd0bb69</code></a>
[Autocomplete] Revert: Fix options list rendering in freeSolo mode (<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/issues/44857">#44857</a>)</li>
<li>See full diff in <a
href="https://github.com/mui/material-ui/commits/v5.16.14/packages/mui-material">compare
view</a></li>
</ul>
</details>
<br />

Updates `@mui/system` from 5.16.13 to 5.16.14
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mui/material-ui/releases"><code>@​mui/system</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v5.16.14</h2>
<!-- raw HTML omitted -->
<p>A big thanks to the 1 contributor who made this release possible.</p>
<h3><code>@mui/material@5.16.14</code></h3>
<ul>
<li>[Autocomplete] Revert: Fix options list rendering in freeSolo mode
(<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-system/issues/44857">#44857</a>)
<a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></li>
</ul>
<p>All contributors of this release in alphabetical order: <a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mui/material-ui/blob/v5.16.14/CHANGELOG.md"><code>@​mui/system</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>v5.16.14</h2>
<!-- raw HTML omitted -->
<p><em>Jan 6, 2025</em></p>
<p>A big thanks to the 1 contributor who made this release possible.</p>
<h3><code>@mui/material@5.16.14</code></h3>
<ul>
<li>[Autocomplete] Revert: Fix options list rendering in freeSolo mode
(<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-system/issues/44857">#44857</a>)
<a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></li>
</ul>
<p>All contributors of this release in alphabetical order: <a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mui/material-ui/commit/ba588c8333d765af63ab15c8b33dd947b615f70b"><code>ba588c8</code></a>
[release] v5.16.14 (<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-system/issues/44955">#44955</a>)</li>
<li>See full diff in <a
href="https://github.com/mui/material-ui/commits/v5.16.14/packages/mui-system">compare
view</a></li>
</ul>
</details>
<br />

Updates `@mui/utils` from 5.16.13 to 5.16.14
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mui/material-ui/releases"><code>@​mui/utils</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v5.16.14</h2>
<!-- raw HTML omitted -->
<p>A big thanks to the 1 contributor who made this release possible.</p>
<h3><code>@mui/material@5.16.14</code></h3>
<ul>
<li>[Autocomplete] Revert: Fix options list rendering in freeSolo mode
(<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-utils/issues/44857">#44857</a>)
<a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></li>
</ul>
<p>All contributors of this release in alphabetical order: <a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mui/material-ui/blob/v5.16.14/CHANGELOG.md"><code>@​mui/utils</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>v5.16.14</h2>
<!-- raw HTML omitted -->
<p><em>Jan 6, 2025</em></p>
<p>A big thanks to the 1 contributor who made this release possible.</p>
<h3><code>@mui/material@5.16.14</code></h3>
<ul>
<li>[Autocomplete] Revert: Fix options list rendering in freeSolo mode
(<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-utils/issues/44857">#44857</a>)
<a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></li>
</ul>
<p>All contributors of this release in alphabetical order: <a
href="https://github.com/ZeeshanTamboli"><code>@​ZeeshanTamboli</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mui/material-ui/commit/ba588c8333d765af63ab15c8b33dd947b615f70b"><code>ba588c8</code></a>
[release] v5.16.14 (<a
href="https://github.com/mui/material-ui/tree/HEAD/packages/mui-utils/issues/44955">#44955</a>)</li>
<li>See full diff in <a
href="https://github.com/mui/material-ui/commits/v5.16.14/packages/mui-utils">compare
view</a></li>
</ul>
</details>
<br />

Updates `@mui/x-tree-view` from 7.23.2 to 7.24.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mui/mui-x/releases"><code>@​mui/x-tree-view</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v7.24.1</h2>
<p>We'd like to offer a big thanks to the 7 contributors who made this
release possible. Here are some highlights :</p>
<ul>
<li>🐞 Bugfixes</li>
<li>🌍 Improve Persian (fa-IR) locale on the Data Grid</li>
</ul>
<p>Special thanks go out to the community contributors who have helped
make this release possible:
<a
href="https://github.com/mostafaRoosta74"><code>@​mostafaRoosta74</code></a>,
<a href="https://github.com/lauri865"><code>@​lauri865</code></a>.
Following are all team members who have contributed to this release:
<a
href="https://github.com/alexfauquette"><code>@​alexfauquette</code></a>,
<a href="https://github.com/JCQuintas"><code>@​JCQuintas</code></a>, <a
href="https://github.com/cherniavskii"><code>@​cherniavskii</code></a>,
<a href="https://github.com/LukasTy"><code>@​LukasTy</code></a>, <a
href="https://github.com/arminmeh"><code>@​arminmeh</code></a>.</p>
<h3>Data Grid</h3>
<h4><code>@mui/x-data-grid@7.24.1</code></h4>
<ul>
<li>[DataGrid] Fix toggling preference panel from toolbar (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16276">#16276</a>)
<a href="https://github.com/lauri865"><code>@​lauri865</code></a></li>
<li>[DataGrid] Only try to mount filter button if there are filters
present (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16269">#16269</a>)
<a href="https://github.com/lauri865"><code>@​lauri865</code></a></li>
<li>[DataGrid] Revert <code>apiRef</code> to be
<code>MutableRefObject</code> for React versions &lt; 19 (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16320">#16320</a>)
<a href="https://github.com/arminmeh"><code>@​arminmeh</code></a></li>
<li>[l10n] Improve Persian (fa-IR) locale (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/15964">#15964</a>)
<a
href="https://github.com/mostafaRoosta74"><code>@​mostafaRoosta74</code></a></li>
</ul>
<h4><code>@mui/x-data-grid-pro@7.24.1</code> <a
href="https://mui.com/r/x-pro-svg-link" title="Pro plan"><img
src="https://mui.com/r/x-pro-svg" alt="pro" /></a></h4>
<p>Same changes as in <code>@mui/x-data-grid@7.24.1</code>.</p>
<h4><code>@mui/x-data-grid-premium@7.24.1</code> <a
href="https://mui.com/r/x-premium-svg-link" title="Premium plan"><img
src="https://mui.com/r/x-premium-svg" alt="premium" /></a></h4>
<p>Same changes as in <code>@mui/x-data-grid-pro@7.24.1</code>.</p>
<h3>Date and Time Pickers</h3>
<h4><code>@mui/x-date-pickers@7.24.1</code></h4>
<ul>
<li>[fields] Reset <code>all</code> selected state on section edit (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16232">#16232</a>)
<a href="https://github.com/LukasTy"><code>@​LukasTy</code></a></li>
</ul>
<h4><code>@mui/x-date-pickers-pro@7.24.1</code> <a
href="https://mui.com/r/x-pro-svg-link" title="Pro plan"><img
src="https://mui.com/r/x-pro-svg" alt="pro" /></a></h4>
<p>Same changes as in <code>@mui/x-date-pickers@7.24.1</code>.</p>
<h3>Charts</h3>
<h4><code>@mui/x-charts@7.24.1</code></h4>
<ul>
<li>[charts] Handle case where gradient stop <code>offset</code> could
be <code>Infinite</code> (<a
href="https://github.com/JCQuintas"><code>@​JCQuintas</code></a>) (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16309">#16309</a>)
<a href="https://github.com/JCQuintas"><code>@​JCQuintas</code></a></li>
</ul>
<h4><code>@mui/x-charts-pro@7.24.1</code> <a
href="https://mui.com/r/x-pro-svg-link" title="Pro plan"><img
src="https://mui.com/r/x-pro-svg" alt="pro" /></a></h4>
<p>Same changes as in <code>@mui/x-charts@7.24.1</code>.</p>
<h3>Tree View</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mui/mui-x/blob/master/CHANGELOG.md"><code>@​mui/x-tree-view</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>7.24.1</h2>
<p><em>Jan 24, 2025</em></p>
<p>We'd like to offer a big thanks to the 7 contributors who made this
release possible. Here are some highlights :</p>
<ul>
<li>🐞 Bugfixes</li>
<li>🌍 Improve Persian (fa-IR) locale on the Data Grid</li>
</ul>
<p>Special thanks go out to the community contributors who have helped
make this release possible:
<a
href="https://github.com/mostafaRoosta74"><code>@​mostafaRoosta74</code></a>,
<a href="https://github.com/lauri865"><code>@​lauri865</code></a>.</p>
<p>Following are all team members who have contributed to this release:
<a
href="https://github.com/alexfauquette"><code>@​alexfauquette</code></a>,
<a href="https://github.com/JCQuintas"><code>@​JCQuintas</code></a>, <a
href="https://github.com/cherniavskii"><code>@​cherniavskii</code></a>,
<a href="https://github.com/LukasTy"><code>@​LukasTy</code></a>, <a
href="https://github.com/arminmeh"><code>@​arminmeh</code></a>.</p>
<h3>Data Grid</h3>
<h4><code>@mui/x-data-grid@7.24.1</code></h4>
<ul>
<li>[DataGrid] Fix toggling preference panel from toolbar (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16276">#16276</a>)
<a href="https://github.com/lauri865"><code>@​lauri865</code></a></li>
<li>[DataGrid] Only try to mount filter button if there are filters
present (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16269">#16269</a>)
<a href="https://github.com/lauri865"><code>@​lauri865</code></a></li>
<li>[DataGrid] Revert <code>apiRef</code> to be
<code>MutableRefObject</code> for React versions &lt; 19 (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16320">#16320</a>)
<a href="https://github.com/arminmeh"><code>@​arminmeh</code></a></li>
<li>[l10n] Improve Persian (fa-IR) locale (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/15964">#15964</a>)
<a
href="https://github.com/mostafaRoosta74"><code>@​mostafaRoosta74</code></a></li>
</ul>
<h4><code>@mui/x-data-grid-pro@7.24.1</code> <a
href="https://mui.com/r/x-pro-svg-link" title="Pro plan"><img
src="https://mui.com/r/x-pro-svg" alt="pro" /></a></h4>
<p>Same changes as in <code>@mui/x-data-grid@7.24.1</code>.</p>
<h4><code>@mui/x-data-grid-premium@7.24.1</code> <a
href="https://mui.com/r/x-premium-svg-link" title="Premium plan"><img
src="https://mui.com/r/x-premium-svg" alt="premium" /></a></h4>
<p>Same changes as in <code>@mui/x-data-grid-pro@7.24.1</code>.</p>
<h3>Date and Time Pickers</h3>
<h4><code>@mui/x-date-pickers@7.24.1</code></h4>
<ul>
<li>[fields] Reset <code>all</code> selected state on section edit (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16232">#16232</a>)
<a href="https://github.com/LukasTy"><code>@​LukasTy</code></a></li>
</ul>
<h4><code>@mui/x-date-pickers-pro@7.24.1</code> <a
href="https://mui.com/r/x-pro-svg-link" title="Pro plan"><img
src="https://mui.com/r/x-pro-svg" alt="pro" /></a></h4>
<p>Same changes as in <code>@mui/x-date-pickers@7.24.1</code>.</p>
<h3>Charts</h3>
<h4><code>@mui/x-charts@7.24.1</code></h4>
<ul>
<li>[charts] Handle case where gradient stop <code>offset</code> could
be <code>Infinite</code> (<a
href="https://github.com/JCQuintas"><code>@​JCQuintas</code></a>) (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16309">#16309</a>)
<a href="https://github.com/JCQuintas"><code>@​JCQuintas</code></a></li>
</ul>
<h4><code>@mui/x-charts-pro@7.24.1</code> <a
href="https://mui.com/r/x-pro-svg-link" title="Pro plan"><img
src="https://mui.com/r/x-pro-svg" alt="pro" /></a></h4>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mui/mui-x/commit/f354e42b4581984cb2e8b8579946c19b8e229694"><code>f354e42</code></a>
v7.24.1 (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16316">#16316</a>)</li>
<li><a
href="https://github.com/mui/mui-x/commit/3dd2dfefaff63710c3519ef65660294932981378"><code>3dd2dfe</code></a>
v7.24.0 (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16216">#16216</a>)</li>
<li><a
href="https://github.com/mui/mui-x/commit/83ef60413084daa7d4ab61ad53f7cbbf8a29f7c4"><code>83ef604</code></a>
[code-infra] Refactor <code>react</code> and <code>react-dom</code>
definitions to simplify dep res...</li>
<li><a
href="https://github.com/mui/mui-x/commit/2df43ffdab4612cf311cbe8c1e85640ae7fbf68a"><code>2df43ff</code></a>
[core] Type all references as <code>RefObject</code> (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16125">#16125</a>)</li>
<li><a
href="https://github.com/mui/mui-x/commit/82162aa9752bf023f1940ea9a3ac705da96ae7d5"><code>82162aa</code></a>
v7.23.6 (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16109">#16109</a>)</li>
<li><a
href="https://github.com/mui/mui-x/commit/707a652c42a202b66ca351747c7e012120064a84"><code>707a652</code></a>
[core] Improve React 19 support (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/16048">#16048</a>)</li>
<li><a
href="https://github.com/mui/mui-x/commit/aabd995249f844ef1058b27519f54e00699ee56b"><code>aabd995</code></a>
[docs] Fix outdated link to handbook (<a
href="https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view/issues/15855">#15855</a>)</li>
<li>See full diff in <a
href="https://github.com/mui/mui-x/commits/v7.24.1/packages/x-tree-view">compare
view</a></li>
</ul>
</details>
<br />


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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 13:05:55 +00:00
dependabot[bot] 3aba55c462 chore: bump eslint-config-next from 14.2.22 to 14.2.23 in /offlinedocs (#16284)
Bumps
[eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next)
from 14.2.22 to 14.2.23.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">eslint-config-next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.23</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>backport: force module format for virtual client-proxy (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/74590">#74590</a>)</li>
<li>Backport: Use provided waitUntil for pending revalidates (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/74573">#74573</a>)</li>
<li>Feature: next/image: add support for images.qualities in next.config
(<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/74500">#74500</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/styfle"><code>@​styfle</code></a>, <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> and <a
href="https://github.com/lubieowoce"><code>@​lubieowoce</code></a> for
helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/f27ce02b6785a1c7c8f88daf1d2112b5a2e1f34a"><code>f27ce02</code></a>
v14.2.23</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/commits/v14.2.23/packages/eslint-config-next">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-config-next&package-manager=npm_and_yarn&previous-version=14.2.22&new-version=14.2.23)](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-27 12:55:59 +00:00
dependabot[bot] ff43d68bcd chore: bump lucide-react from 0.462.0 to 0.474.0 in /site (#16291)
Bumps
[lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react)
from 0.462.0 to 0.474.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lucide-icons/lucide/releases">lucide-react's
releases</a>.</em></p>
<blockquote>
<h2>New icons 0.474.0</h2>
<h2>Modified Icons 🔨</h2>
<ul>
<li><code>expand</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2677">#2677</a>)
by <a href="https://github.com/jguddas"><code>@​jguddas</code></a></li>
</ul>
<h2>New icons 0.473.0</h2>
<h2>Modified Icons 🔨</h2>
<ul>
<li><code>package</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2706">#2706</a>)
by <a href="https://github.com/sezze"><code>@​sezze</code></a></li>
</ul>
<h2>New icons 0.472.0</h2>
<h2>New icons 🎨</h2>
<ul>
<li><code>battery-plus</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2693">#2693</a>)
by <a
href="https://github.com/Footagesus"><code>@​Footagesus</code></a></li>
<li><code>map-plus</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2697">#2697</a>)
by <a
href="https://github.com/Seanw265"><code>@​Seanw265</code></a></li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>lucide-svelte: Make sure license ends up in SvelteKit bundles by <a
href="https://github.com/Lettnald"><code>@​Lettnald</code></a> in <a
href="https://redirect.github.com/lucide-icons/lucide/pull/2728">lucide-icons/lucide#2728</a></li>
<li>lucide-react: Fixes aliases imports.</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/lucide-icons/lucide/compare/0.471.1...0.472.0">https://github.com/lucide-icons/lucide/compare/0.471.1...0.472.0</a></p>
<h2>Hotfix Lucide React exports</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(lucide-react) Adds type module in package.json by <a
href="https://github.com/ericfennis"><code>@​ericfennis</code></a> in <a
href="https://redirect.github.com/lucide-icons/lucide/pull/2731">lucide-icons/lucide#2731</a></li>
</ul>
<h2>Dynamic Icon component Lucide React and new icons 0.471.0</h2>
<h2>New Dynamic Icon Component (lucide-react)</h2>
<p>This is an easier approach than the previous
<code>dynamicIconImports</code> we exported in the library. This one
supports all environments.
We removed the examples in the docs of how you can make a dynamic icon
yourself with a dedicated DynamicIcon component.
This one fetches the icon data itself and renders it instead of fetching
the Icon component from the library.
This makes it more flexible with all the frontend frameworks and
libraries that exist for React.</p>
<blockquote>
<p>🚨
Not recommended for regular applications that work fine with the regular
static icon components.
Using the dynamic icon component increases build time, separate bundles,
and separate network requests for each icon.</p>
</blockquote>
<h3>How to use</h3>
<p><code>DynamicIcon</code> is useful for applications that want to show
icons dynamically by icon name, for example when using a content
management system where icon names are stored in a database.</p>
<pre lang="jsx"><code>const App = () =&gt; (
&lt;DynamicIcon name=&quot;camera&quot; color=&quot;red&quot; size={48}
/&gt;
);
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lucide-icons/lucide/commit/961404d5cc956fba3e29fbfd203453c9441a99b0"><code>961404d</code></a>
replace <code>keyof ReactSVG</code> with <code>SVGElementType</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2668">#2668</a>)</li>
<li><a
href="https://github.com/lucide-icons/lucide/commit/31c3fefc17eca4ab54985354ff4f4f5e366dfd7f"><code>31c3fef</code></a>
fix(lucide-react) Adds type module in package.json (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2731">#2731</a>)</li>
<li><a
href="https://github.com/lucide-icons/lucide/commit/58c2e108c3398f09fa5a43b0c88e9bf526319fcc"><code>58c2e10</code></a>
feat(lucide-react): Add DynamicIcon component (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2686">#2686</a>)</li>
<li><a
href="https://github.com/lucide-icons/lucide/commit/970fc3d4be3b1c6e30361a4b96c6fa080c2b1e50"><code>970fc3d</code></a>
fix(lucide-react): support React 19 (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2666">#2666</a>)</li>
<li><a
href="https://github.com/lucide-icons/lucide/commit/4f038d5fe8b13e00031311af6975a43d2d735e9e"><code>4f038d5</code></a>
feat(docs): add Bun.sh support to documentation (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2642">#2642</a>)</li>
<li>See full diff in <a
href="https://github.com/lucide-icons/lucide/commits/0.474.0/packages/lucide-react">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=lucide-react&package-manager=npm_and_yarn&previous-version=0.462.0&new-version=0.474.0)](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-27 12:51:04 +00:00
dependabot[bot] ea6e3d8791 chore: bump axios from 1.7.4 to 1.7.9 in /site (#16286)
Bumps [axios](https://github.com/axios/axios) from 1.7.4 to 1.7.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/axios/axios/releases">axios's
releases</a>.</em></p>
<blockquote>
<h2>Release v1.7.9</h2>
<h2>Release notes:</h2>
<h3>Reverts</h3>
<ul>
<li>Revert &quot;fix(types): export CJS types from ESM (<a
href="https://redirect.github.com/axios/axios/issues/6218">#6218</a>)&quot;
(<a
href="https://redirect.github.com/axios/axios/issues/6729">#6729</a>)
(<a
href="https://github.com/axios/axios/commit/c44d2f2316ad289b38997657248ba10de11deb6c">c44d2f2</a>),
closes <a
href="https://redirect.github.com/axios/axios/issues/6218">#6218</a> <a
href="https://redirect.github.com/axios/axios/issues/6729">#6729</a></li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a href="https://github.com/jasonsaayman"
title="+596/-108 ([#6729](https://github.com/axios/axios/issues/6729)
)">Jay</a></li>
</ul>
<h2>Release v1.7.8</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li>allow passing a callback as paramsSerializer to buildURL (<a
href="https://redirect.github.com/axios/axios/issues/6680">#6680</a>)
(<a
href="https://github.com/axios/axios/commit/eac4619fe2e0926e876cd260ee21e3690381dbb5">eac4619</a>)</li>
<li><strong>core:</strong> fixed config merging bug (<a
href="https://redirect.github.com/axios/axios/issues/6668">#6668</a>)
(<a
href="https://github.com/axios/axios/commit/5d99fe4491202a6268c71e5dcc09192359d73cea">5d99fe4</a>)</li>
<li>fixed width form to not shrink after 'Send Request' button is
clicked (<a
href="https://redirect.github.com/axios/axios/issues/6644">#6644</a>)
(<a
href="https://github.com/axios/axios/commit/7ccd5fd42402102d38712c32707bf055be72ab54">7ccd5fd</a>)</li>
<li><strong>http:</strong> add support for File objects as payload in
http adapter (<a
href="https://redirect.github.com/axios/axios/issues/6588">#6588</a>)
(<a
href="https://redirect.github.com/axios/axios/issues/6605">#6605</a>)
(<a
href="https://github.com/axios/axios/commit/6841d8d18ddc71cc1bd202ffcfddb3f95622eef3">6841d8d</a>)</li>
<li><strong>http:</strong> fixed proxy-from-env module import (<a
href="https://redirect.github.com/axios/axios/issues/5222">#5222</a>)
(<a
href="https://github.com/axios/axios/commit/12b32957f1258aee94ef859809ed39f8f88f9dfa">12b3295</a>)</li>
<li><strong>http:</strong> use <code>globalThis.TextEncoder</code> when
available (<a
href="https://redirect.github.com/axios/axios/issues/6634">#6634</a>)
(<a
href="https://github.com/axios/axios/commit/df956d18febc9100a563298dfdf0f102c3d15410">df956d1</a>)</li>
<li>ios11 breaks when build (<a
href="https://redirect.github.com/axios/axios/issues/6608">#6608</a>)
(<a
href="https://github.com/axios/axios/commit/763895270f7b50c7c780c3c9807ae8635de952cd">7638952</a>)</li>
<li><strong>types:</strong> add missing types for mergeConfig function
(<a
href="https://redirect.github.com/axios/axios/issues/6590">#6590</a>)
(<a
href="https://github.com/axios/axios/commit/00de614cd07b7149af335e202aef0e076c254f49">00de614</a>)</li>
<li><strong>types:</strong> export CJS types from ESM (<a
href="https://redirect.github.com/axios/axios/issues/6218">#6218</a>)
(<a
href="https://github.com/axios/axios/commit/c71811b00f2fcff558e4382ba913bdac4ad7200e">c71811b</a>)</li>
<li>updated stream aborted error message to be more clear (<a
href="https://redirect.github.com/axios/axios/issues/6615">#6615</a>)
(<a
href="https://github.com/axios/axios/commit/cc3217a612024d83a663722a56d7a98d8759c6d5">cc3217a</a>)</li>
<li>use URL API instead of DOM to fix a potential vulnerability warning;
(<a
href="https://redirect.github.com/axios/axios/issues/6714">#6714</a>)
(<a
href="https://github.com/axios/axios/commit/0a8d6e19da5b9899a2abafaaa06a75ee548597db">0a8d6e1</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a href="https://github.com/remcohaszing"
title="+108/-596 ([#6218](https://github.com/axios/axios/issues/6218)
)">Remco Haszing</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/jasonsaayman"
title="+281/-19 ([#6640](https://github.com/axios/axios/issues/6640)
[#6619](https://github.com/axios/axios/issues/6619) )">Jay</a></li>
<li><!-- raw HTML omitted --> <a
href="https://github.com/aayushyadav020" title="+124/-111
([#6617](https://github.com/axios/axios/issues/6617) )">Aayush
Yadav</a></li>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+12/-65
([#6714](https://github.com/axios/axios/issues/6714) )">Dmitriy
Mozgovoy</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/cincodenada"
title="+29/-0 ([#6489](https://github.com/axios/axios/issues/6489)
)">Ell Bradshaw</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/amitsainii"
title="+13/-3 ([#5237](https://github.com/axios/axios/issues/5237)
)">Amit Saini</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/guuido"
title="+14/-1 ([#6680](https://github.com/axios/axios/issues/6680)
)">Tommaso Paulon</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/Aakash-Rana"
title="+5/-5 ([#6668](https://github.com/axios/axios/issues/6668)
)">Akki</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/stscoundrel"
title="+3/-3 ([#6633](https://github.com/axios/axios/issues/6633)
)">Sampo Silvennoinen</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/kasperisager"
title="+2/-2 ([#6634](https://github.com/axios/axios/issues/6634)
)">Kasper Isager Dalsgarð</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/cclauss"
title="+4/-0 ([#6683](https://github.com/axios/axios/issues/6683)
)">Christian Clauss</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/pavan168"
title="+2/-2 ([#5222](https://github.com/axios/axios/issues/5222)
)">Pavan Welihinda</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/taylorflatt"
title="+2/-2 ([#6615](https://github.com/axios/axios/issues/6615)
)">Taylor Flatt</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/Kenzo-Wada"
title="+2/-2 ([#6608](https://github.com/axios/axios/issues/6608)
)">Kenzo Wada</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/echelonnought"
title="+3/-0 ([#6644](https://github.com/axios/axios/issues/6644)
)">Ngole Lawson</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/Baoyx007"
title="+3/-0 ([#6590](https://github.com/axios/axios/issues/6590)
)">Haven</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/shrivalidutt"
title="+1/-1 ([#6637](https://github.com/axios/axios/issues/6637)
)">Shrivali Dutt</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/hencoappel"
title="+1/-1 ([#6605](https://github.com/axios/axios/issues/6605)
)">Henco Appel</a></li>
</ul>
<h2>Release v1.7.7</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/axios/axios/blob/v1.x/CHANGELOG.md">axios's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/axios/axios/compare/v1.7.8...v1.7.9">1.7.9</a>
(2024-12-04)</h2>
<h3>Reverts</h3>
<ul>
<li>Revert &quot;fix(types): export CJS types from ESM (<a
href="https://redirect.github.com/axios/axios/issues/6218">#6218</a>)&quot;
(<a
href="https://redirect.github.com/axios/axios/issues/6729">#6729</a>)
(<a
href="https://github.com/axios/axios/commit/c44d2f2316ad289b38997657248ba10de11deb6c">c44d2f2</a>),
closes <a
href="https://redirect.github.com/axios/axios/issues/6218">#6218</a> <a
href="https://redirect.github.com/axios/axios/issues/6729">#6729</a></li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a href="https://github.com/jasonsaayman"
title="+596/-108 ([#6729](https://github.com/axios/axios/issues/6729)
)">Jay</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.7.7...v1.7.8">1.7.8</a>
(2024-11-25)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>allow passing a callback as paramsSerializer to buildURL (<a
href="https://redirect.github.com/axios/axios/issues/6680">#6680</a>)
(<a
href="https://github.com/axios/axios/commit/eac4619fe2e0926e876cd260ee21e3690381dbb5">eac4619</a>)</li>
<li><strong>core:</strong> fixed config merging bug (<a
href="https://redirect.github.com/axios/axios/issues/6668">#6668</a>)
(<a
href="https://github.com/axios/axios/commit/5d99fe4491202a6268c71e5dcc09192359d73cea">5d99fe4</a>)</li>
<li>fixed width form to not shrink after 'Send Request' button is
clicked (<a
href="https://redirect.github.com/axios/axios/issues/6644">#6644</a>)
(<a
href="https://github.com/axios/axios/commit/7ccd5fd42402102d38712c32707bf055be72ab54">7ccd5fd</a>)</li>
<li><strong>http:</strong> add support for File objects as payload in
http adapter (<a
href="https://redirect.github.com/axios/axios/issues/6588">#6588</a>)
(<a
href="https://redirect.github.com/axios/axios/issues/6605">#6605</a>)
(<a
href="https://github.com/axios/axios/commit/6841d8d18ddc71cc1bd202ffcfddb3f95622eef3">6841d8d</a>)</li>
<li><strong>http:</strong> fixed proxy-from-env module import (<a
href="https://redirect.github.com/axios/axios/issues/5222">#5222</a>)
(<a
href="https://github.com/axios/axios/commit/12b32957f1258aee94ef859809ed39f8f88f9dfa">12b3295</a>)</li>
<li><strong>http:</strong> use <code>globalThis.TextEncoder</code> when
available (<a
href="https://redirect.github.com/axios/axios/issues/6634">#6634</a>)
(<a
href="https://github.com/axios/axios/commit/df956d18febc9100a563298dfdf0f102c3d15410">df956d1</a>)</li>
<li>ios11 breaks when build (<a
href="https://redirect.github.com/axios/axios/issues/6608">#6608</a>)
(<a
href="https://github.com/axios/axios/commit/763895270f7b50c7c780c3c9807ae8635de952cd">7638952</a>)</li>
<li><strong>types:</strong> add missing types for mergeConfig function
(<a
href="https://redirect.github.com/axios/axios/issues/6590">#6590</a>)
(<a
href="https://github.com/axios/axios/commit/00de614cd07b7149af335e202aef0e076c254f49">00de614</a>)</li>
<li><strong>types:</strong> export CJS types from ESM (<a
href="https://redirect.github.com/axios/axios/issues/6218">#6218</a>)
(<a
href="https://github.com/axios/axios/commit/c71811b00f2fcff558e4382ba913bdac4ad7200e">c71811b</a>)</li>
<li>updated stream aborted error message to be more clear (<a
href="https://redirect.github.com/axios/axios/issues/6615">#6615</a>)
(<a
href="https://github.com/axios/axios/commit/cc3217a612024d83a663722a56d7a98d8759c6d5">cc3217a</a>)</li>
<li>use URL API instead of DOM to fix a potential vulnerability warning;
(<a
href="https://redirect.github.com/axios/axios/issues/6714">#6714</a>)
(<a
href="https://github.com/axios/axios/commit/0a8d6e19da5b9899a2abafaaa06a75ee548597db">0a8d6e1</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a href="https://github.com/remcohaszing"
title="+108/-596 ([#6218](https://github.com/axios/axios/issues/6218)
)">Remco Haszing</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/jasonsaayman"
title="+281/-19 ([#6640](https://github.com/axios/axios/issues/6640)
[#6619](https://github.com/axios/axios/issues/6619) )">Jay</a></li>
<li><!-- raw HTML omitted --> <a
href="https://github.com/aayushyadav020" title="+124/-111
([#6617](https://github.com/axios/axios/issues/6617) )">Aayush
Yadav</a></li>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+12/-65
([#6714](https://github.com/axios/axios/issues/6714) )">Dmitriy
Mozgovoy</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/cincodenada"
title="+29/-0 ([#6489](https://github.com/axios/axios/issues/6489)
)">Ell Bradshaw</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/amitsainii"
title="+13/-3 ([#5237](https://github.com/axios/axios/issues/5237)
)">Amit Saini</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/guuido"
title="+14/-1 ([#6680](https://github.com/axios/axios/issues/6680)
)">Tommaso Paulon</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/Aakash-Rana"
title="+5/-5 ([#6668](https://github.com/axios/axios/issues/6668)
)">Akki</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/stscoundrel"
title="+3/-3 ([#6633](https://github.com/axios/axios/issues/6633)
)">Sampo Silvennoinen</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/kasperisager"
title="+2/-2 ([#6634](https://github.com/axios/axios/issues/6634)
)">Kasper Isager Dalsgarð</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/cclauss"
title="+4/-0 ([#6683](https://github.com/axios/axios/issues/6683)
)">Christian Clauss</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/pavan168"
title="+2/-2 ([#5222](https://github.com/axios/axios/issues/5222)
)">Pavan Welihinda</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/taylorflatt"
title="+2/-2 ([#6615](https://github.com/axios/axios/issues/6615)
)">Taylor Flatt</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/Kenzo-Wada"
title="+2/-2 ([#6608](https://github.com/axios/axios/issues/6608)
)">Kenzo Wada</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/echelonnought"
title="+3/-0 ([#6644](https://github.com/axios/axios/issues/6644)
)">Ngole Lawson</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/Baoyx007"
title="+3/-0 ([#6590](https://github.com/axios/axios/issues/6590)
)">Haven</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/shrivalidutt"
title="+1/-1 ([#6637](https://github.com/axios/axios/issues/6637)
)">Shrivali Dutt</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/hencoappel"
title="+1/-1 ([#6605](https://github.com/axios/axios/issues/6605)
)">Henco Appel</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.7.6...v1.7.7">1.7.7</a>
(2024-08-31)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/axios/axios/commit/b2cb45d5a533a5465c99559b16987e4d5fc08cbc"><code>b2cb45d</code></a>
chore(release): v1.7.9 (<a
href="https://redirect.github.com/axios/axios/issues/6730">#6730</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/c44d2f2316ad289b38997657248ba10de11deb6c"><code>c44d2f2</code></a>
Revert &quot;fix(types): export CJS types from ESM (<a
href="https://redirect.github.com/axios/axios/issues/6218">#6218</a>)&quot;
(<a
href="https://redirect.github.com/axios/axios/issues/6729">#6729</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/415ca9440195586dcd2149aa6f1e99f0ff6957c2"><code>415ca94</code></a>
chore(release): v1.7.8 (<a
href="https://redirect.github.com/axios/axios/issues/6715">#6715</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/0a8d6e19da5b9899a2abafaaa06a75ee548597db"><code>0a8d6e1</code></a>
fix: use URL API instead of DOM to fix a potential vulnerability
warning; (<a
href="https://redirect.github.com/axios/axios/issues/6">#6</a>...</li>
<li><a
href="https://github.com/axios/axios/commit/c71811b00f2fcff558e4382ba913bdac4ad7200e"><code>c71811b</code></a>
fix(types): export CJS types from ESM (<a
href="https://redirect.github.com/axios/axios/issues/6218">#6218</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/4355a6d3bccdc6a33e7cef8bf4fafedad65e12ce"><code>4355a6d</code></a>
chore(sponsor): update sponsor block (<a
href="https://redirect.github.com/axios/axios/issues/6709">#6709</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/5d54d22321b3c3d29c5dff5e8086cd9db7e2d101"><code>5d54d22</code></a>
chore(sponsor): update sponsor block (<a
href="https://redirect.github.com/axios/axios/issues/6707">#6707</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/eac4619fe2e0926e876cd260ee21e3690381dbb5"><code>eac4619</code></a>
fix: allow passing a callback as paramsSerializer to buildURL (<a
href="https://redirect.github.com/axios/axios/issues/6680">#6680</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/df956d18febc9100a563298dfdf0f102c3d15410"><code>df956d1</code></a>
fix(http): use <code>globalThis.TextEncoder</code> when available (<a
href="https://redirect.github.com/axios/axios/issues/6634">#6634</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/7139ce96c38a25ae575d0b7478dd890cc4a47074"><code>7139ce9</code></a>
chore(deps): bump cookie and socket.io (<a
href="https://redirect.github.com/axios/axios/issues/6704">#6704</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/axios/axios/compare/v1.7.4...v1.7.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=1.7.4&new-version=1.7.9)](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-27 12:50:56 +00:00
dependabot[bot] 35a4b7819c chore: bump cmdk from 1.0.0 to 1.0.4 in /site (#16289)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [cmdk](https://github.com/pacocoursey/cmdk/tree/HEAD/cmdk) from
1.0.0 to 1.0.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pacocoursey/cmdk/releases">cmdk's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix use-sync-external-store import for greater compatibility by <a
href="https://github.com/kachkaev"><code>@​kachkaev</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/328">pacocoursey/cmdk#328</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/kachkaev"><code>@​kachkaev</code></a>
made their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/328">pacocoursey/cmdk#328</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pacocoursey/cmdk/compare/v1.0.3...v1.0.4">https://github.com/pacocoursey/cmdk/compare/v1.0.3...v1.0.4</a></p>
<h2>v1.0.3</h2>
<ul>
<li>Fix <code>use-sync-external-store</code> shim for compatibility with
Next.js 15 and React 19 RC</li>
</ul>
<h2>v1.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: docs mistake we are no longer lowercasing by <a
href="https://github.com/itsjoeoui"><code>@​itsjoeoui</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/227">pacocoursey/cmdk#227</a></li>
<li>feat: export defaultFilter by <a
href="https://github.com/evanob"><code>@​evanob</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/229">pacocoursey/cmdk#229</a></li>
<li>chore: add more details to package.json by <a
href="https://github.com/andipaetzold"><code>@​andipaetzold</code></a>
in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/228">pacocoursey/cmdk#228</a></li>
<li>chore(deps): bump the npm_and_yarn group across 2 directories with 2
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/226">pacocoursey/cmdk#226</a></li>
<li>fix: controlled search change with hidden Command.List by <a
href="https://github.com/vltansky"><code>@​vltansky</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/217">pacocoursey/cmdk#217</a></li>
<li>fix: Framer example capitalization of values by <a
href="https://github.com/arihanv"><code>@​arihanv</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/231">pacocoursey/cmdk#231</a></li>
<li>fix: fix compiling code Array.from(void 0) by <a
href="https://github.com/nenya1840"><code>@​nenya1840</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/237">pacocoursey/cmdk#237</a></li>
<li>fix: useId backward compatibility by <a
href="https://github.com/phsantiago"><code>@​phsantiago</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/165">pacocoursey/cmdk#165</a></li>
<li>Relax dependencies on Radix-UI to SemVer MAJOR releases by <a
href="https://github.com/eps1lon"><code>@​eps1lon</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/278">pacocoursey/cmdk#278</a></li>
<li>feat: allow react v19 as peer dep by <a
href="https://github.com/Yonom"><code>@​Yonom</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/318">pacocoursey/cmdk#318</a></li>
<li>Upgrade <code>@​radix-ui/react-id</code> by <a
href="https://github.com/tmcw"><code>@​tmcw</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/297">pacocoursey/cmdk#297</a></li>
<li>fix: useSyncExternalStore backward compatibility by <a
href="https://github.com/MateoKruk"><code>@​MateoKruk</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/296">pacocoursey/cmdk#296</a></li>
<li>fix(context): read disablePointerSelection from propsRef by <a
href="https://github.com/f0rr0"><code>@​f0rr0</code></a> in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/314">pacocoursey/cmdk#314</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/itsjoeoui"><code>@​itsjoeoui</code></a>
made their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/227">pacocoursey/cmdk#227</a></li>
<li><a href="https://github.com/evanob"><code>@​evanob</code></a> made
their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/229">pacocoursey/cmdk#229</a></li>
<li><a
href="https://github.com/andipaetzold"><code>@​andipaetzold</code></a>
made their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/228">pacocoursey/cmdk#228</a></li>
<li><a
href="https://github.com/dependabot"><code>@​dependabot</code></a> made
their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/226">pacocoursey/cmdk#226</a></li>
<li><a href="https://github.com/vltansky"><code>@​vltansky</code></a>
made their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/217">pacocoursey/cmdk#217</a></li>
<li><a href="https://github.com/arihanv"><code>@​arihanv</code></a> made
their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/231">pacocoursey/cmdk#231</a></li>
<li><a href="https://github.com/nenya1840"><code>@​nenya1840</code></a>
made their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/237">pacocoursey/cmdk#237</a></li>
<li><a
href="https://github.com/phsantiago"><code>@​phsantiago</code></a> made
their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/165">pacocoursey/cmdk#165</a></li>
<li><a href="https://github.com/eps1lon"><code>@​eps1lon</code></a> made
their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/278">pacocoursey/cmdk#278</a></li>
<li><a href="https://github.com/Yonom"><code>@​Yonom</code></a> made
their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/318">pacocoursey/cmdk#318</a></li>
<li><a href="https://github.com/tmcw"><code>@​tmcw</code></a> made their
first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/297">pacocoursey/cmdk#297</a></li>
<li><a href="https://github.com/MateoKruk"><code>@​MateoKruk</code></a>
made their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/296">pacocoursey/cmdk#296</a></li>
<li><a href="https://github.com/f0rr0"><code>@​f0rr0</code></a> made
their first contribution in <a
href="https://redirect.github.com/pacocoursey/cmdk/pull/314">pacocoursey/cmdk#314</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pacocoursey/cmdk/compare/v1.0.0...v1.0.1">https://github.com/pacocoursey/cmdk/compare/v1.0.0...v1.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/c1f200a1082b44115a640353b0a744dc185d7a99"><code>c1f200a</code></a>
v1.0.4</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/541bb8ead8a595e150735d0cd7cb568112e78ebf"><code>541bb8e</code></a>
Fix use-sync-external-store import (<a
href="https://github.com/pacocoursey/cmdk/tree/HEAD/cmdk/issues/328">#328</a>)</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/c5470e3d1a857eb1d27bbbcffb5b5e5645dd55b2"><code>c5470e3</code></a>
bring back use-sync-external-store shim</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/5b4f24d4c809a5d2c01022e76bb58cc29a3b023b"><code>5b4f24d</code></a>
v1.0.2</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/1d83da4534c785678ae1e5f609fc703550d0bdb2"><code>1d83da4</code></a>
v1.0.2-beta.0</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/0b290cef5e9d91457c9933c5166ca29306b53736"><code>0b290ce</code></a>
remove use-sync-external-store shim</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/eab8e0f3d30fe7661bf9755b3724c33abf22a34c"><code>eab8e0f</code></a>
v1.0.1</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/5d9d6e32c96ac240559d7767b6fe73f7223807ad"><code>5d9d6e3</code></a>
fix(context): read disablePointerSelection from propsRef (<a
href="https://github.com/pacocoursey/cmdk/tree/HEAD/cmdk/issues/314">#314</a>)</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/0bd1fe2ea2927085c6a1fa9b3e3f041b70ac669c"><code>0bd1fe2</code></a>
fix: useSyncExternalStore backward compatibility (<a
href="https://github.com/pacocoursey/cmdk/tree/HEAD/cmdk/issues/296">#296</a>)</li>
<li><a
href="https://github.com/pacocoursey/cmdk/commit/660e1f368aed46ea63cbf9166aa46e9f846f9522"><code>660e1f3</code></a>
Upgrade <code>@​radix-ui/react-id</code> (<a
href="https://github.com/pacocoursey/cmdk/tree/HEAD/cmdk/issues/297">#297</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pacocoursey/cmdk/commits/v1.0.4/cmdk">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cmdk&package-manager=npm_and_yarn&previous-version=1.0.0&new-version=1.0.4)](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-27 12:49:38 +00:00
dependabot[bot] 18d436e83a chore: bump class-variance-authority from 0.7.0 to 0.7.1 in /site (#16290)
Bumps [class-variance-authority](https://github.com/joe-bell/cva) from
0.7.0 to 0.7.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/joe-bell/cva/releases">class-variance-authority's
releases</a>.</em></p>
<blockquote>
<h2>v0.7.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Add LICENSE Comments by <a
href="https://github.com/joe-bell"><code>@​joe-bell</code></a> in <a
href="https://redirect.github.com/joe-bell/cva/pull/283">joe-bell/cva#283</a></li>
<li>chore: move clsx dependency to caret/semver range by <a
href="https://github.com/philwolstenholme"><code>@​philwolstenholme</code></a>
in <a
href="https://redirect.github.com/joe-bell/cva/pull/316">joe-bell/cva#316</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/philwolstenholme"><code>@​philwolstenholme</code></a>
made their first contribution in <a
href="https://redirect.github.com/joe-bell/cva/pull/316">joe-bell/cva#316</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/joe-bell/cva/compare/v0.7.0...v0.7.1">https://github.com/joe-bell/cva/compare/v0.7.0...v0.7.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/joe-bell/cva/commit/45462dd239546f570bca7821ab56bcef61feb900"><code>45462dd</code></a>
class-variance-authority@0.7.1</li>
<li><a
href="https://github.com/joe-bell/cva/commit/c236552742da6f7362012f4fc2bb3b1ebeedc52f"><code>c236552</code></a>
docs: change x.com references to bluesky</li>
<li><a
href="https://github.com/joe-bell/cva/commit/985dba91cf4b1820b40cb6457e2d0d56c1c85fb6"><code>985dba9</code></a>
chore: move clsx dependency to caret/semver range (<a
href="https://redirect.github.com/joe-bell/cva/issues/316">#316</a>)</li>
<li><a
href="https://github.com/joe-bell/cva/commit/d4ded2dfcc0bed12e584e2ec4f3e1e8b8f18728a"><code>d4ded2d</code></a>
chore: update sponsors.svg [ci skip]</li>
<li><a
href="https://github.com/joe-bell/cva/commit/ff1717cbe3287ce40963679aa43fd29b5bf15d1d"><code>ff1717c</code></a>
ci(schedule): adjust cron date to offset midnight traffic</li>
<li><a
href="https://github.com/joe-bell/cva/commit/2f96730b7b05eaf7531c2766c8c5e9dc045952f7"><code>2f96730</code></a>
ci: prevent scheduled workflow running in forks</li>
<li><a
href="https://github.com/joe-bell/cva/commit/aaae670a35d097f4a2e6b4784df23610d4ec26ba"><code>aaae670</code></a>
docs(beta): bun installation</li>
<li><a
href="https://github.com/joe-bell/cva/commit/69feb436b6d45836f282aacdd5eaffe0da761d72"><code>69feb43</code></a>
update docs for bun installation (<a
href="https://redirect.github.com/joe-bell/cva/issues/261">#261</a>)</li>
<li><a
href="https://github.com/joe-bell/cva/commit/f9e2ea6764a69cce5ce30e7f3de791c230340d74"><code>f9e2ea6</code></a>
chore(docs): update banner links</li>
<li><a
href="https://github.com/joe-bell/cva/commit/5228f0e66faed758b084c82f3b395688150206ee"><code>5228f0e</code></a>
chore: link sponsors to raw svg</li>
<li>Additional commits viewable in <a
href="https://github.com/joe-bell/cva/compare/v0.7.0...v0.7.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=class-variance-authority&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.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-27 12:49:14 +00:00
dependabot[bot] 2348985bb9 chore: bump react-confetti from 6.1.0 to 6.2.2 in /site (#16288)
Bumps [react-confetti](https://github.com/alampros/react-confetti) from
6.1.0 to 6.2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/alampros/react-confetti/releases">react-confetti's
releases</a>.</em></p>
<blockquote>
<h2>v6.2.2</h2>
<h2><a
href="https://github.com/alampros/react-confetti/compare/v6.2.1...v6.2.2">6.2.2</a>
(2024-12-28)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>build multiple module types (<a
href="https://github.com/alampros/react-confetti/commit/3be757d656a833966370d0fd5ee0c9fa6a1efe75">3be757d</a>),
closes <a
href="https://redirect.github.com/alampros/react-confetti/issues/162">#162</a>
<a
href="https://redirect.github.com/alampros/react-confetti/issues/158">#158</a></li>
</ul>
<h2>v6.2.1</h2>
<h2><a
href="https://github.com/alampros/react-confetti/compare/v6.2.0...v6.2.1">6.2.1</a>
(2024-12-27)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>specify commonjs module (<a
href="https://github.com/alampros/react-confetti/commit/aa99153ccb42c25f596ddbc956a68b52c53512f3">aa99153</a>)</li>
</ul>
<h2>v6.2.0</h2>
<h1><a
href="https://github.com/alampros/react-confetti/compare/v6.1.0...v6.2.0">6.2.0</a>
(2024-12-27)</h1>
<h3>Features</h3>
<ul>
<li>update <code>peerDependencies</code> to support React 19 (<a
href="https://github.com/alampros/react-confetti/commit/ce2d40a65cfbb0fc491df550bd5a9caea149d82b">ce2d40a</a>)</li>
<li>upgrade tooling (<a
href="https://github.com/alampros/react-confetti/commit/9c84a9941b5efeec2082ee9d54f8e2655f990d2f">9c84a99</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/alampros/react-confetti/blob/v6.2.2/CHANGELOG.md">react-confetti's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/alampros/react-confetti/compare/v6.2.1...v6.2.2">6.2.2</a>
(2024-12-28)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>build multiple module types (<a
href="https://github.com/alampros/react-confetti/commit/3be757d656a833966370d0fd5ee0c9fa6a1efe75">3be757d</a>),
closes <a
href="https://redirect.github.com/alampros/react-confetti/issues/162">#162</a>
<a
href="https://redirect.github.com/alampros/react-confetti/issues/158">#158</a></li>
</ul>
<h2><a
href="https://github.com/alampros/react-confetti/compare/v6.2.0...v6.2.1">6.2.1</a>
(2024-12-27)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>specify commonjs module (<a
href="https://github.com/alampros/react-confetti/commit/aa99153ccb42c25f596ddbc956a68b52c53512f3">aa99153</a>)</li>
</ul>
<h1><a
href="https://github.com/alampros/react-confetti/compare/v6.1.0...v6.2.0">6.2.0</a>
(2024-12-27)</h1>
<h3>Features</h3>
<ul>
<li>update <code>peerDependencies</code> to support React 19 (<a
href="https://github.com/alampros/react-confetti/commit/ce2d40a65cfbb0fc491df550bd5a9caea149d82b">ce2d40a</a>)</li>
<li>upgrade tooling (<a
href="https://github.com/alampros/react-confetti/commit/9c84a9941b5efeec2082ee9d54f8e2655f990d2f">9c84a99</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/alampros/react-confetti/commit/dcddb8623b461e68378e88b75f3e39c7970c08c8"><code>dcddb86</code></a>
chore(release): 6.2.2 [skip ci]</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/976d31cdb37049cfd5f91143659a183d23e5d93b"><code>976d31c</code></a>
Merge branch 'develop'</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/3be757d656a833966370d0fd5ee0c9fa6a1efe75"><code>3be757d</code></a>
fix: build multiple module types</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/eadd82d916e25489a90284a14cd4403001f7f6ba"><code>eadd82d</code></a>
Merge branch 'master' into develop</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/017e511a1a6c56202e9ba5f54628c586c742bce5"><code>017e511</code></a>
chore(release): 6.2.1 [skip ci]</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/d36f119b6184f1d27e2961e1bc7d75b3f08c4b7c"><code>d36f119</code></a>
Merge branch 'develop'</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/aa99153ccb42c25f596ddbc956a68b52c53512f3"><code>aa99153</code></a>
fix: specify commonjs module</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/bcf2fb4856d8d747c5aa26378286e087858fa680"><code>bcf2fb4</code></a>
Merge branch 'master' into develop</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/a93b47d436c6a1644565a8abe62a7d486ceb793a"><code>a93b47d</code></a>
chore(release): 6.2.0 [skip ci]</li>
<li><a
href="https://github.com/alampros/react-confetti/commit/7ad17c5c205b04d3eabfee045b387a896fe0ca77"><code>7ad17c5</code></a>
lint fixes</li>
<li>Additional commits viewable in <a
href="https://github.com/alampros/react-confetti/compare/v6.1.0...v6.2.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-confetti&package-manager=npm_and_yarn&previous-version=6.1.0&new-version=6.2.2)](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-27 12:48:47 +00:00
dependabot[bot] 0ff5410b91 chore: bump react-markdown from 9.0.1 to 9.0.3 in /offlinedocs (#16283)
Bumps [react-markdown](https://github.com/remarkjs/react-markdown) from
9.0.1 to 9.0.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/remarkjs/react-markdown/releases">react-markdown's
releases</a>.</em></p>
<blockquote>
<h2>9.0.3</h2>
<p>(same as 9.0.2 but now with d.ts files)</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.2...9.0.3">https://github.com/remarkjs/react-markdown/compare/9.0.2...9.0.3</a></p>
<h2>9.0.2</h2>
<h4>Types</h4>
<ul>
<li>b151a90 Fix types for React 19
by <a
href="https://github.com/remcohaszing"><code>@​remcohaszing</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/879">remarkjs/react-markdown#879</a></li>
<li>6962af7 Add declaration maps</li>
<li>aa5933b Refactor to use <code>@import</code> to import types
by <a
href="https://github.com/remcohaszing"><code>@​remcohaszing</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/836">remarkjs/react-markdown#836</a></li>
</ul>
<h4>Miscellaneous</h4>
<ul>
<li>9eb589e Fix typo in changelog
by <a
href="https://github.com/NicholasWilsonDEV"><code>@​NicholasWilsonDEV</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/874">remarkjs/react-markdown#874</a></li>
<li>515bf19 Fix typo
by <a href="https://github.com/deep-lyra"><code>@​deep-lyra</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/868">remarkjs/react-markdown#868</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.2">https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/aed001070aae99bc6d1f3bdd8e71974f5c0d5f10"><code>aed0010</code></a>
9.0.3</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/40c097eb6f4b89209bd90cc3338fcaaa957bebaf"><code>40c097e</code></a>
9.0.2</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/2c6ffe8f93871ea8e17d12ec0b6f6e5b0aa49ae2"><code>2c6ffe8</code></a>
Refactor <code>.gitignore</code></li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/b664ac4459ed5fe2834665976b8864da03d263e9"><code>b664ac4</code></a>
Update Actions</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/e68655127bb09402e1d12507e1b2db8fa3c64ff8"><code>e686551</code></a>
Update dev-dependencies</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/b151a9028f2ca14d8982de47e70a1db7b7c79a2c"><code>b151a90</code></a>
Fix types for React 19</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/27d3949b31beb7aa7a6c0d3d4d34e6fd0965a7d3"><code>27d3949</code></a>
Separate all typedefs into their own JSDoc blocks (<a
href="https://redirect.github.com/remarkjs/react-markdown/issues/878">#878</a>)</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/9eb589e828445916dfb521117040d8d5420a5e9d"><code>9eb589e</code></a>
Fix typo in changelog</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/515bf190a06e2510aa4d09d4c186cfa558b75452"><code>515bf19</code></a>
Fix typo</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/a7ca8edfd698d61ebf0ad83bf95cba1a4106f672"><code>a7ca8ed</code></a>
Refactor <code>.editorconfig</code></li>
<li>Additional commits viewable in <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-markdown&package-manager=npm_and_yarn&previous-version=9.0.1&new-version=9.0.3)](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-27 12:47:11 +00:00
dependabot[bot] 0f813d4b5d chore: bump next from 14.2.22 to 14.2.23 in /offlinedocs (#16281)
Bumps [next](https://github.com/vercel/next.js) from 14.2.22 to 14.2.23.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.23</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>backport: force module format for virtual client-proxy (<a
href="https://redirect.github.com/vercel/next.js/issues/74590">#74590</a>)</li>
<li>Backport: Use provided waitUntil for pending revalidates (<a
href="https://redirect.github.com/vercel/next.js/issues/74573">#74573</a>)</li>
<li>Feature: next/image: add support for images.qualities in next.config
(<a
href="https://redirect.github.com/vercel/next.js/issues/74500">#74500</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/styfle"><code>@​styfle</code></a>, <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> and <a
href="https://github.com/lubieowoce"><code>@​lubieowoce</code></a> for
helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/f27ce02b6785a1c7c8f88daf1d2112b5a2e1f34a"><code>f27ce02</code></a>
v14.2.23</li>
<li><a
href="https://github.com/vercel/next.js/commit/c4bf4acfbf727a2393c2b98bad1c5d7243c2a63e"><code>c4bf4ac</code></a>
backport: force module format for virtual client-proxy (<a
href="https://redirect.github.com/vercel/next.js/issues/74162">#74162</a>)
(<a
href="https://redirect.github.com/vercel/next.js/issues/74590">#74590</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/d60bb1b5fb902dac79b11d9c78761022b88f6f03"><code>d60bb1b</code></a>
Backport: Use provided waitUntil for pending revalidates (<a
href="https://redirect.github.com/vercel/next.js/issues/74164">#74164</a>)
(<a
href="https://redirect.github.com/vercel/next.js/issues/74573">#74573</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/a85f441ff41b673986dbe4212ae56c971bf408a7"><code>a85f441</code></a>
feat(next/image): add support for <code>images.qualities</code> in
next.config (<a
href="https://redirect.github.com/vercel/next.js/issues/74500">#74500</a>)</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/compare/v14.2.22...v14.2.23">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=next&package-manager=npm_and_yarn&previous-version=14.2.22&new-version=14.2.23)](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-27 12:46:02 +00:00
dependabot[bot] 8dcf298165 chore: bump @chakra-ui/react from 2.10.4 to 2.10.5 in /offlinedocs (#16278)
Bumps
[@chakra-ui/react](https://github.com/chakra-ui/chakra-ui/tree/HEAD/packages/react)
from 2.10.4 to 2.10.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/chakra-ui/chakra-ui/commits/HEAD/packages/react">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@chakra-ui/react&package-manager=npm_and_yarn&previous-version=2.10.4&new-version=2.10.5)](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-27 12:45:48 +00:00
dependabot[bot] 3729f08bde chore: bump react-markdown from 9.0.1 to 9.0.3 in /site (#16292)
Bumps [react-markdown](https://github.com/remarkjs/react-markdown) from
9.0.1 to 9.0.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/remarkjs/react-markdown/releases">react-markdown's
releases</a>.</em></p>
<blockquote>
<h2>9.0.3</h2>
<p>(same as 9.0.2 but now with d.ts files)</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.2...9.0.3">https://github.com/remarkjs/react-markdown/compare/9.0.2...9.0.3</a></p>
<h2>9.0.2</h2>
<h4>Types</h4>
<ul>
<li>b151a90 Fix types for React 19
by <a
href="https://github.com/remcohaszing"><code>@​remcohaszing</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/879">remarkjs/react-markdown#879</a></li>
<li>6962af7 Add declaration maps</li>
<li>aa5933b Refactor to use <code>@import</code> to import types
by <a
href="https://github.com/remcohaszing"><code>@​remcohaszing</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/836">remarkjs/react-markdown#836</a></li>
</ul>
<h4>Miscellaneous</h4>
<ul>
<li>9eb589e Fix typo in changelog
by <a
href="https://github.com/NicholasWilsonDEV"><code>@​NicholasWilsonDEV</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/874">remarkjs/react-markdown#874</a></li>
<li>515bf19 Fix typo
by <a href="https://github.com/deep-lyra"><code>@​deep-lyra</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/868">remarkjs/react-markdown#868</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.2">https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/aed001070aae99bc6d1f3bdd8e71974f5c0d5f10"><code>aed0010</code></a>
9.0.3</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/40c097eb6f4b89209bd90cc3338fcaaa957bebaf"><code>40c097e</code></a>
9.0.2</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/2c6ffe8f93871ea8e17d12ec0b6f6e5b0aa49ae2"><code>2c6ffe8</code></a>
Refactor <code>.gitignore</code></li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/b664ac4459ed5fe2834665976b8864da03d263e9"><code>b664ac4</code></a>
Update Actions</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/e68655127bb09402e1d12507e1b2db8fa3c64ff8"><code>e686551</code></a>
Update dev-dependencies</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/b151a9028f2ca14d8982de47e70a1db7b7c79a2c"><code>b151a90</code></a>
Fix types for React 19</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/27d3949b31beb7aa7a6c0d3d4d34e6fd0965a7d3"><code>27d3949</code></a>
Separate all typedefs into their own JSDoc blocks (<a
href="https://redirect.github.com/remarkjs/react-markdown/issues/878">#878</a>)</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/9eb589e828445916dfb521117040d8d5420a5e9d"><code>9eb589e</code></a>
Fix typo in changelog</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/515bf190a06e2510aa4d09d4c186cfa558b75452"><code>515bf19</code></a>
Fix typo</li>
<li><a
href="https://github.com/remarkjs/react-markdown/commit/a7ca8edfd698d61ebf0ad83bf95cba1a4106f672"><code>a7ca8ed</code></a>
Refactor <code>.editorconfig</code></li>
<li>Additional commits viewable in <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-markdown&package-manager=npm_and_yarn&previous-version=9.0.1&new-version=9.0.3)](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-27 12:38:55 +00:00
dependabot[bot] 596ee412ea chore: bump vite from 5.4.12 to 5.4.14 in /site in the vite group across 1 directory (#16277)
Bumps the vite group with 1 update in the /site directory:
[vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).

Updates `vite` from 5.4.12 to 5.4.14
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.14</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.14/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.13</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.13/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v5.4.14/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.4.14 (2025-01-21)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: <code>preview.allowedHosts</code> with specific values was not
respected (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19246">#19246</a>)
(<a
href="https://github.com/vitejs/vite/commit/9df6e6beabf0d18988ec13b8b742d2aba29662f9">9df6e6b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19246">#19246</a></li>
<li>fix: allow CORS from loopback addresses by default (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19249">#19249</a>)
(<a
href="https://github.com/vitejs/vite/commit/7d1699ccf673e2790704756d89d2e1e4ee478fb4">7d1699c</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19249">#19249</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.13 (2025-01-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: try parse <code>server.origin</code> URL (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19241">#19241</a>)
(<a
href="https://github.com/vitejs/vite/commit/5946215718e369c34f6cc9415391d2ca84efe327">5946215</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19241">#19241</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitejs/vite/commit/e7eb3c5559e6f7ec6f5ca834c2ff4d680f58e81b"><code>e7eb3c5</code></a>
release: v5.4.14</li>
<li><a
href="https://github.com/vitejs/vite/commit/7d1699ccf673e2790704756d89d2e1e4ee478fb4"><code>7d1699c</code></a>
fix: allow CORS from loopback addresses by default (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19249">#19249</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/9df6e6beabf0d18988ec13b8b742d2aba29662f9"><code>9df6e6b</code></a>
fix: <code>preview.allowedHosts</code> with specific values was not
respected (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19246">#19246</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/a1824c5ff13578d590176275ac309a0ab48ee5b9"><code>a1824c5</code></a>
release: v5.4.13</li>
<li><a
href="https://github.com/vitejs/vite/commit/5946215718e369c34f6cc9415391d2ca84efe327"><code>5946215</code></a>
fix: try parse <code>server.origin</code> URL (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19241">#19241</a>)</li>
<li>See full diff in <a
href="https://github.com/vitejs/vite/commits/v5.4.14/packages/vite">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vite&package-manager=npm_and_yarn&previous-version=5.4.12&new-version=5.4.14)](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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 12:38:41 +00:00
dependabot[bot] 80f56e81d5 chore: bump @types/lodash from 4.17.13 to 4.17.14 in /site (#16294)
Bumps
[@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash)
from 4.17.13 to 4.17.14.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/lodash&package-manager=npm_and_yarn&previous-version=4.17.13&new-version=4.17.14)](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-27 12:38:16 +00:00
dependabot[bot] 9f2fc9355b chore: bump @types/node from 20.17.11 to 20.17.16 in /offlinedocs (#16285)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 20.17.11 to 20.17.16.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=20.17.11&new-version=20.17.16)](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-27 12:36:50 +00:00
dependabot[bot] 2fd65bc540 chore: bump typescript from 5.6.3 to 5.7.3 in /offlinedocs (#16282)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.6.3
to 5.7.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/TypeScript/releases">typescript's
releases</a>.</em></p>
<blockquote>
<h2>TypeScript 5.7.3</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/">release
announcement</a>.</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.0 (Beta)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.1%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.1 (RC)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.2%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.2 (Stable)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.2%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.3 (Stable)</a>.</li>
</ul>
<p>Downloads are available on <a
href="https://www.npmjs.com/package/typescript">npm</a></p>
<h2>TypeScript 5.7</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/">release
announcement</a>.</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.0 (Beta)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.1%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.1 (RC)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.2%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.2 (Stable)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
</ul>
<h2>TypeScript 5.7 RC</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-rc/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.0 (Beta)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.1%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.1 (RC)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
</ul>
<h2>TypeScript 5.7 Beta</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-beta/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.7.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.7.0 (Beta)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/TypeScript/commit/a5e123d9e0690fcea92878ea8a0a382922009fc9"><code>a5e123d</code></a>
Update LKG</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/8bc02048a2a78d1b8f0e89d8260d76c440fdbc08"><code>8bc0204</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60828">#60828</a>
(Fix CodeQL configuration, releases) into release-5.7 (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60923">#60923</a>)</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/7aa63df74c2cc02dd171771623238dc40f352b7e"><code>7aa63df</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60393">#60393</a>
(Don't try to add an implicit undefi...) into release-5.7 (#...</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/9df7c36aa960086a403bb83c5a4fafaf5871acf6"><code>9df7c36</code></a>
Bump version to 5.7.3 and LKG</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/e167412fe07905b6324bf5f36a918c28050ebfac"><code>e167412</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60794">#60794</a>
(Harden <code>sanitizeLog</code> against incorr...) into release-5.7
(#...</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/9ba364c55a5c5cc378e89bf0de9559398926c0d3"><code>9ba364c</code></a>
Fix coverage build on release-5.7 (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60792">#60792</a>)</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/4b7441a8bee1f0cbc861a3ad23f72769fb518df1"><code>4b7441a</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60680">#60680</a>
(Mark the inherited any-based index ...) into release-5.7 (#...</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/e844dc305e09029d417a8daf84a816532d2ed4f3"><code>e844dc3</code></a>
Cherry-pick <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60402">#60402</a>,
<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60440">#60440</a>,
<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60616">#60616</a>
into release-5.7 (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/60777">#60777</a>)</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/21b02a1e1f19852790c36e550631e8083c67fc1c"><code>21b02a1</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60749">#60749</a>
(Do not require import attribute on ...) into release-5.7 (#...</li>
<li><a
href="https://github.com/microsoft/TypeScript/commit/b82fd16484225ba6d0798cd5595407ec65555ab6"><code>b82fd16</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/60576">#60576</a>
(Avoid incorrectly reusing assertion...) into release-5.7 (#...</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/TypeScript/compare/v5.6.3...v5.7.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typescript&package-manager=npm_and_yarn&previous-version=5.6.3&new-version=5.7.3)](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-27 12:35:54 +00:00
dependabot[bot] e030edc0a8 chore: bump @types/lodash from 4.17.13 to 4.17.14 in /offlinedocs (#16280)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps
[@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash)
from 4.17.13 to 4.17.14.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/lodash&package-manager=npm_and_yarn&previous-version=4.17.13&new-version=4.17.14)](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-27 12:28:54 +00:00
dependabot[bot] 28807a26df chore: bump @types/node from 20.17.11 to 20.17.16 in /site (#16295)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 20.17.11 to 20.17.16.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=20.17.11&new-version=20.17.16)](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-27 12:28:25 +00:00
M Atif Ali 8b5d22fdd2 ci: change PR merge strategy to squash in contrib workflow (#16297) 2025-01-27 12:25:42 +00:00
M Atif Ali 4e1c0eb743 ci: grant 'contents' write permission to auto-merge dependabot PRs (#16293) 2025-01-27 17:08:03 +05:00
M Atif Ali 7d6b73552a chore: remove patch condition for dependabot PRs (#16279) 2025-01-27 11:51:37 +00:00
Edward Angert a21306e8d6 docs: add zed editor doc to workspace-access (#16242)
add zed to workspace-access docs
2025-01-24 19:37:02 +00:00
Edward Angert 0ad46d52a7 chore: update zed icon (#16256)
icon from zed.dev so we can use their official logo
2025-01-24 11:57:59 -05:00
M Atif Ali d2ff42560f chore(dogfood): dogfood zed editor (#16255)
This requires running `coder config-ssh`.

I intentially kept it as a module so that we can port it to
`coder/`modules` easily when needed.
2025-01-24 15:17:18 +00:00
Bruno Quaresma 12c5c65c7f refactor: replace MUI buttons on banners, paywalls and a few pages (#16215) 2025-01-24 10:36:01 -03:00
Bruno Quaresma 0c30a114d1 refactor: remove Docs from the navbar (#16251)
Close #16247
2025-01-24 09:25:20 -03:00
Ethan 4872d14e55 fix(vpn): pass dup'd FDs to tunnel (#16249)
We were duping the passed FDs and then not using the result.
2025-01-24 02:29:20 +00:00
Steven Masley 5841c0aacb fix: fetch custom roles from workspace agent context (#16237) 2025-01-23 12:57:09 -06:00
Muhammad Atif Ali 6c1fd2846e docs: update AWS marketplace listing (#16245) 2025-01-23 18:52:59 +00:00
Garrett Delfosse d571996c53 feat: add postgres exporter (#16244)
Part of https://github.com/coder/internal/issues/150

- Adds postgres exporter that gets picked up by the prometheus remote
writer
2025-01-23 18:32:29 +00:00
Garrett Delfosse 7b464334f3 feat: start remote writing prometheus data (#16235)
Part of https://github.com/coder/internal/issues/150

- Stop creating the VPC since we rely on an existing VPC in the
scaletest GCP project now
- Add prometheus remote writer to the new prometheus deployment
2025-01-23 17:02:10 +00:00
Mathias Fredriksson f27e73d21a chore(coderd/database/gen/dump): add optional DB_DUMP_CONNECTION_URL (#16243) 2025-01-23 18:53:24 +02:00
ケイラ 5f4ff58f84 fix: use pre-built binary instead of go run in e2e tests (#16236)
Using `go run` inside of a test is fragile, because it means we have to
wait for `go` to compile the binary while also constrained on resources
by the fact that Playwright and coderd are already running. We should
instead compile a coder binary for the current platform before the tests
and use it directly.
2025-01-23 09:45:50 -07:00
Muhammad Atif Ali 84081e90eb chore: notify on auto merged dependabot PRs (#16234) 2025-01-23 15:38:54 +05:00
Danielle Maywood a6e054a115 chore(provisionerd): use correct log levels for template provisioner logs (#16232)
Relates to https://github.com/coder/coder/issues/14062

Previously a `logProvisionerJobLog` helper was added in
https://github.com/coder/coder/pull/6508 to forward logs from the
provisioner at the correct log level, but this was only used for logs
produced in `buildWorkspace`.

This PR uses this helper for forwarding logs produced in
`runTemplateImportParse` and
`runTemplateImportProvisionWithRichParameters` at the correct log level.
2025-01-23 09:27:10 +00:00
Stephen Kirby b8706680d9 chore(docs): reduce noise of outdated experiment callout in notifications guide (#16139)
Enabling the notifications experiment was only required in 2.15.0, so we
can reduce the loudness of this callout.

---------

Co-authored-by: EdwardAngert <EdwardAngert@users.noreply.github.com>
2025-01-22 22:28:23 +00:00
Muhammad Atif Ali f495ff07b7 chore: auto merge dependabot PRs for patch updates (#16222) 2025-01-22 21:24:07 +05:00
Bruno Quaresma 6cbc44bc58 refactor: replace MUI button on TopbarButton (#16212)
Related to https://github.com/coder/coder/issues/14978
2025-01-22 10:14:51 -03:00
Bruno Quaresma d659fd910c fix: update licenses to seats (#16229) 2025-01-22 09:48:31 -03:00
Thomas Kosiewski ce90bb1c11 chore(go.mod): update Tailscale dependency (#16224)
Updates Tailscale to latest coder/tailscale fork and replaces inet.af/peercred with github.com/tailscale/peercred

Change-Id: If67aff922268a268572ae83fad46f04ce45d200d
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-01-22 13:30:56 +01:00
dependabot[bot] 923ef56e83 chore: bump undici from 6.19.7 to 6.21.1 in /site (#16217)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 14:13:26 +05:00
dependabot[bot] c686b54fbf chore: bump vite from 5.4.11 to 5.4.12 in /site (#16218)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 13:30:46 +05:00
Danny Kopping 2d36b587c0 chore(site): log errors when page fails with not_available in e2e tests (#16219)
https://github.com/coder/internal/issues/279 tracks a flake we've been
seeing of late.

I noticed log lines like these:

```
[onResponse] url=http://localhost:3111/api/v2/workspaces/2fedd3ad-58a9-49be-9e61-177878be7611/watch status=200 body=not_available
[onResponse] url=http://localhost:3111/api/v2/workspaceagents/753ee86d-46cb-4641-97f6-7b4c9c9a9e27/watch-metadata status=200 body=not_available
```

No other debugging info seems to be available for these responses, so
let's add some.

Signed-off-by: Danny Kopping <danny@coder.com>
2025-01-22 10:27:03 +02:00
Thomas Kosiewski 8e409e377e fix(flake.nix): update lockfile & add nix-prefetch-git (#16162)
Updated flake.lock and flake.nix dependencies, including:
- Updated flake.lock
- Updated vendorHash for coder binary
- Ensured pnpm 9.x uses nodejs 20
- Reordered development shell packages alphabetically

Change-Id: I3e5e9c9d1136ea8d03084bd13fdd723bff1680d9
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-01-22 05:34:53 +01:00
ケイラ 250f3c7aad docs: document local install.sh script (#16125)
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2025-01-21 14:16:08 -07:00
Edward Angert 02d0650ae8 docs: add new scaling doc to best practices section (#15904)
[preview](https://coder.com/docs/@bp-scaling-coder/tutorials/best-practices/scale-coder)

---------

Co-authored-by: Spike Curtis <spike@coder.com>
2025-01-21 15:02:02 -05:00
Bruno Quaresma 0fa6b3df13 chore: ignore dynamic content on chromatic (#16214) 2025-01-21 15:22:06 -03:00
dependabot[bot] f8844cab0a ci: bump the github-actions group with 4 updates (#16192)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2025-01-21 15:31:30 +00:00
dependabot[bot] dee4f1b8fd chore: bump github.com/prometheus/common from 0.61.0 to 0.62.0 (#16199)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 19:53:12 +05:00
Bruno Quaresma c0b9170070 refactor: replace MUI button on FullPageHorizontalForm (#16211)
Related to https://github.com/coder/coder/issues/14978
2025-01-21 10:57:02 -03:00
Bruno Quaresma ca32f3e026 fix: display error when a build fails on template editor (#16210)
<img width="1512" alt="Screenshot 2025-01-21 at 10 00 42"
src="https://github.com/user-attachments/assets/84f5272f-63bb-4d76-ae27-a2c5e339e352"
/>

Close https://github.com/coder/coder/issues/16022
2025-01-21 10:38:07 -03:00
Bruno Quaresma 53d83d2da7 refactor: replace MUI buttons on Alerts (#16209)
Related to https://github.com/coder/coder/issues/14978
2025-01-21 10:27:02 -03:00
Danielle Maywood 5762d8add4 fix: return only the first workspace agent script timing per script (#16203)
Fixes https://github.com/coder/coder/issues/16124

If a workspace agent crashes, it is possible for any startup scripts to
be ran again. This PR makes it so that the
`GetWorkspaceAgentScriptTimingsByBuildID` query only returns the first
timing recorded per-script.
2025-01-21 11:54:43 +00:00
Mathias Fredriksson 56cf0d82c7 test(cli): fix race in provisioner list statuses for golden files (#16205) 2025-01-21 11:23:21 +00:00
dependabot[bot] 9d39e9a864 chore: bump github.com/moby/moby from 27.4.1+incompatible to 27.5.0+incompatible (#16197)
Bumps [github.com/moby/moby](https://github.com/moby/moby) from
27.4.1+incompatible to 27.5.0+incompatible.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/moby/moby/releases">github.com/moby/moby's
releases</a>.</em></p>
<blockquote>
<h2>v27.5.0</h2>
<h2>27.5.0</h2>
<p>For a full list of pull requests and changes in this release, refer
to the relevant GitHub milestones:</p>
<ul>
<li><a
href="https://github.com/docker/cli/issues?q=is%3Aclosed+milestone%3A27.5.0">docker/cli,
27.5.0 milestone</a></li>
<li><a
href="https://github.com/moby/moby/issues?q=is%3Aclosed+milestone%3A27.5.0">moby/moby,
27.5.0 milestone</a></li>
</ul>
<h3>Bugfixes and enhancements</h3>
<ul>
<li>containerd image store: Fix passing a build context via tarball to
the <code>/build</code> endpoint. <a
href="https://redirect.github.com/moby/moby/pull/49194">moby/moby#49194</a></li>
<li>Builder garbage collection policies without a
<code>keepStorage</code> value now inherit the
<code>defaultKeepStorage</code> limit as intended. <a
href="https://redirect.github.com/moby/moby/pull/49137">moby/moby#49137</a></li>
<li>Preserve network labels during daemon startup. <a
href="https://redirect.github.com/moby/moby/pull/49200">moby/moby#49200</a></li>
<li>Fix a potential race condition error when deleting a container. <a
href="https://redirect.github.com/moby/moby/pull/49239">moby/moby#49239</a></li>
</ul>
<h3>Go SDK</h3>
<ul>
<li><code>pkg/sysinfo</code>: deprecate <code>NumCPU</code>. This
utility has the same behavior as <code>runtime.NumCPU</code>. <a
href="https://redirect.github.com/moby/moby/pull/49247">moby/moby#49247</a></li>
<li><code>pkg/fileutils</code>: deprecate <code>GetTotalUsedFds</code>:
this function is only used internally and will be removed in the next
release. <a
href="https://redirect.github.com/moby/moby/pull/49209">moby/moby#49209</a></li>
<li><code>pkg/ioutils</code>: deprecate <code>BytesPipe</code>,
<code>NewBytesPipe</code>, <code>ErrClosed</code>,
<code>WriteCounter</code>, <code>NewWriteCounter</code>,
<code>NewReaderErrWrapper</code>, <code>NopFlusher</code>,
<code>NopWriter</code>, <code>NopWriteCloser</code>. They were only used
internally and will be removed in the next release. <a
href="https://redirect.github.com/moby/moby/pull/49246">moby/moby#49246</a>,
<a
href="https://redirect.github.com/moby/moby/pull/49255">moby/moby#49255</a></li>
<li><code>pkg/reexec</code>: This package is deprecated and moved to a
separate module. Use <code>github.com/moby/sys/reexec</code> instead. <a
href="https://redirect.github.com/moby/moby/pull/49135">moby/moby#49135</a></li>
</ul>
<h3>Packaging updates</h3>
<ul>
<li>Update containerd to <a
href="https://github.com/containerd/containerd/releases/tag/v1.7.25">v1.7.25</a>
<a
href="https://redirect.github.com/moby/moby/pull/49253">moby/moby#49253</a></li>
<li>Update <code>runc</code> to <a
href="https://github.com/opencontainers/runc/releases/tag/v1.2.4">v1.2.4</a>
<a
href="https://redirect.github.com/moby/moby/pull/49243">moby/moby#49243</a></li>
<li>Update BuildKit to <a
href="https://github.com/moby/buildkit/releases/tag/v0.18.2">v0.18.2</a>
<a
href="https://redirect.github.com/moby/moby/pull/48949">moby/moby#48949</a></li>
<li>Update Compose to <a
href="https://github.com/docker/compose/releases/tag/v2.32.2">v2.32.2</a>
<a
href="https://redirect.github.com/docker/docker-ce-packaging/pull/1140">docker/docker-ce-packaging#1140</a></li>
</ul>
<h2>v27.5.0-rc.2</h2>
<h2>27.5.0-rc.2</h2>
<p>This is a pre-release of the upcoming 27.5.0 release.</p>
<p>Pre-releases are intended for testing new releases: <strong>only
install in a test environment!</strong></p>
<pre lang="bash"><code>curl -fsSL https://get.docker.com -o
get-docker.sh
sudo CHANNEL=test sh get-docker.sh
</code></pre>
<h3>Known issues:</h3>
<ul>
<li>There is no changelog yet; an overview of pull requests included in
this release can be found on GitHub:
<ul>
<li>docker cli: <a
href="https://github.com/docker/cli/pulls?q=is%3Apr+milestone%3A27.5.0+is%3Amerged">all
pull requests for 27.5.0</a> / <a
href="https://github.com/docker/cli/pulls?q=is%3Apr+milestone%3A27.5.0+label%3Aimpact%2Fchangelog+is%3Amerged">all
&quot;changelog&quot; pull requests for 27.5.0</a></li>
<li>docker engine: <a
href="https://github.com/moby/moby/pulls?q=is%3Apr+milestone%3A27.5.0+is%3Amerged">all
pull requests for 27.5.0</a> / <a
href="https://github.com/moby/moby/pulls?q=is%3Apr+milestone%3A27.5.0+label%3Aimpact%2Fchangelog+is%3Amerged">all
&quot;changelog&quot; pull requests for 27.5.0</a></li>
</ul>
</li>
<li>There are no packages available yet for the s390x and ppc64le
architectures</li>
</ul>
<p>Bugs and regressions can be reported in these issue trackers:</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/moby/moby/commit/38b84dce32c45732606fe09ffebef8b29a783644"><code>38b84dc</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/49255">#49255</a>
from thaJeztah/27.x_backport_ioutils_more_deprecations</li>
<li><a
href="https://github.com/moby/moby/commit/ae821132d3b5342112b1c8505ce12f05562c2cd4"><code>ae82113</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/49253">#49253</a>
from thaJeztah/27.x_backport_bump_containerd_binary...</li>
<li><a
href="https://github.com/moby/moby/commit/8a2fd51c84e9ce58b7dec29e1b86844ac4b5b3a6"><code>8a2fd51</code></a>
pkg/ioutils: deprecate NopWriteCloser</li>
<li><a
href="https://github.com/moby/moby/commit/cf37b661dd227efff5271c1b5fcc613dc21ef5a7"><code>cf37b66</code></a>
pkg/ioutils: deprecate NopWriter</li>
<li><a
href="https://github.com/moby/moby/commit/c83f65882947c39b8b6c36065b522b7b6c84656e"><code>c83f658</code></a>
Dockerfile: update containerd to v1.7.25</li>
<li><a
href="https://github.com/moby/moby/commit/931be8ef77582bed66786d7a26b0362d62d35444"><code>931be8e</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/49246">#49246</a>
from thaJeztah/27.x_backport_ioutils_deprecations</li>
<li><a
href="https://github.com/moby/moby/commit/2e1aee3326f1de072679d5fbb3a0d2f7e7d7d7cb"><code>2e1aee3</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/49249">#49249</a>
from robmry/backport-27.x/fix_unit_tests_for_nftabl...</li>
<li><a
href="https://github.com/moby/moby/commit/f53d72e0be380a948cd2bc9f909922dc2f95338a"><code>f53d72e</code></a>
Fix unit tests for an nftables host</li>
<li><a
href="https://github.com/moby/moby/commit/55f705597c1e2b16883f2feae29b03f4dcfc0b0f"><code>55f7055</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/49243">#49243</a>
from thaJeztah/27.x_backport_bump_runc_binary_1.2.4</li>
<li><a
href="https://github.com/moby/moby/commit/36ad318a2dbb7624efa8f2e933b33d4ada10d01b"><code>36ad318</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/49247">#49247</a>
from thaJeztah/27.x_backport_deprecate_runtime_numcpu</li>
<li>Additional commits viewable in <a
href="https://github.com/moby/moby/compare/v27.4.1...v27.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/moby/moby&package-manager=go_modules&previous-version=27.4.1+incompatible&new-version=27.5.0+incompatible)](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-21 18:26:31 +10:00
Mathias Fredriksson 4d9dd0aa94 test(coderd/database/awsiamrds): fix unclosed pubsub (#16202) 2025-01-20 17:25:31 +00:00
Mathias Fredriksson c0db364f3f feat(cli): add provisioner list and provisioner jobs list (#16030) 2025-01-20 17:24:22 +00:00
dependabot[bot] 91204c2e3c chore: bump github.com/zclconf/go-cty-yaml from 1.0.3 to 1.1.0 (#16198)
Bumps
[github.com/zclconf/go-cty-yaml](https://github.com/zclconf/go-cty-yaml)
from 1.0.3 to 1.1.0.


Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 16:58:08 +00:00
dependabot[bot] 358ade3a52 chore: bump github.com/gohugoio/hugo from 0.140.0 to 0.141.0 (#16193)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 21:55:39 +05:00
dependabot[bot] 6e2d32abb4 chore: bump google.golang.org/api from 0.216.0 to 0.217.0 (#16194)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 21:55:14 +05:00
dependabot[bot] 125146a29a chore: bump github.com/aws/aws-sdk-go-v2/config from 1.28.0 to 1.29.1 (#16196)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 21:52:08 +05:00
Hugo Dutka 23cf61aff6 chore: add the --ephemeral server flag (#16126)
Another PR to address https://github.com/coder/coder/issues/15109.

Changes:
- Introduces the `--ephemeral` flag, which changes the Coder config
directory to a temporary location. The config directory is where the
built-in PostgreSQL stores its data, so using a new one results in a
deployment with a fresh state.

The `--ephemeral` flag is set to replace the `--in-memory` flag once the
in-memory database is removed.
2025-01-20 14:31:16 +01:00
MRColor d8fbbcbd36 feat(helm): add support for nodePort specification in LoadBalancer services helm chart (#16032)
## Short description: 
This pull request introduces support for optionally specify `nodePort`
values when using `LoadBalancer` service type in the Coder Helm chart.
This enhancement addresses a limitation where `httpNodePort` and
`httpsNodePort` values were previously ignored for `LoadBalancer`
services. This PR should expand the service customization options
without disrupting existing configurations.

## Why this is Useful
In some enterprise environments, applications may be required to use
specific ports for compliance with organizational policies or cloud
infrastructure requirements. For instance:

- Reserved port blocks are allocated for specific applications for
security and clarity.
- Ensuring predictable port assignments helps in debugging and
management scenarios.

Since LoadBalancer in Kubernetes operates on top of nodePort, this
feature is useful for enabling enterprises to adhere to such policies if
they whish.

## What Was Changed
- Updated helm/coder/templates/service.yaml:
- Allowed nodePort specification for both NodePort and LoadBalancer
service types.
- Updated helm/coder/templates/values.yaml:
- Updated inline comments to reflect the changes for nodeport values use
cases.
  
### Regarding backward compatibility:
If nodePort is not specified, Kubernetes dynamically assigns a port,
maintaining the current behavior.
### Testing Performed
- Validated through Helm dry-run: nodePort values are rendered correctly
in the resulting Kubernetes YAML.
- Deployed the updated chart in an enterprise Kubernetes cluster.
- Tested coder environment with LoadBalancer service and specified
nodePort values for both HTTP and HTTPS.

## Additional Notes
- This PR expands the nodeport functionality introduced in PR #8993 to
the Loadbalancer service.
- If merged, an update to the documentation to include examples of
LoadBalancer with nodePort values may be useful.
- I've read the contributing guidelines and code of conduct. This is my
first PR for the Coder project, and I hope it meets the community
standards. Any advice, feedback, or help is greatly appreciated!
2025-01-20 13:14:14 +00:00
Mathias Fredriksson 2913fe8677 fix(cli/cliui): handle ptr to custom type (#16200) 2025-01-20 12:48:51 +00:00
Cian Johnston 4ba0b39f03 feat(provisioner/terraform/tfparse): add support for built-in Terraform functions (#16183)
Relates to https://github.com/coder/coder/issues/15977

Adds support for some functions in `tfparse` (only functions that do not
reference local files).
NOTE: for now, I'm importing trivy-iac. If we prefer to avoid a little
dependency, I can do a little copying instead.
2025-01-20 11:03:57 +00:00
dependabot[bot] 7bef4dfda6 chore: bump go.nhat.io/otelsql from 0.14.0 to 0.15.0 (#16112)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 11:03:48 +00:00
Mathias Fredriksson 3864c7e3b0 feat(coderd): add endpoint to list provisioner jobs (#16029)
Closes #15190
Updates #15084
2025-01-20 11:18:53 +02:00
Mathias Fredriksson 0e8ef09415 test(coderd/database/dbauthz): compare outputs with cmp (#16161) 2025-01-20 11:12:04 +02:00
Danny Kopping 5b72a4376d chore: improve CI reliability (#16169)
We have an effort underway to replace `dbmem` (#15109), and consequently
we've begun running our full test-suite (with Postgres) on all supported
OSs - Windows, MacOS, and Linux, since #15520.

Since this change, we've seen a marked decrease in the success rate of
our builds on `main` (note how the Windows/MacOS failures account for
the vast majority of failed builds):


![image](https://github.com/user-attachments/assets/a02c15b7-037d-428a-a600-2aed60553ac0)

We're still investigating why these OSs are a lot less reliable. It's
likely that the VMs on which the builds are run have different
characteristics from our Ubuntu runners such as disk I/O, network
latency, or something else.

**In the meantime, we need to start trusting CI failures in `main`
again, as the current failures are too noisy / vague for us to
correct.**

We've also considered hosting our own runners where possible so we can
get OS-level observability to rule out some possibilities.

See the [meeting
notes](https://www.notion.so/coderhq/CI-Investigation-Call-Notes-17dd579be59280d8897cc9fe4bb46695?pvs=6&utm_content=17dd579b-e592-80d8-897c-c9fe4bb46695&utm_campaign=T1ZPT2FL0&n=slack&n=slack_link_unfurl)
where we linked into this for more detail.

This PR introduces several changes:

1. Moves the full test-suite with Postgres on Windows/MacOS to the
`nightly-gauntlet` workflow
tradeoff: this means that any regressions may be more difficult to
discover since we merge to main several times a day
2. Run only the CLI test-suite on each PR / merge to `main` on
Windows/MacOS
3. `test-go` is still running the full test-suite against all OSs
(including the CLI ones), but will soon be removed once #15109 is
completed since it uses `dbmem`
4. Changes `nightly-gauntlet` to run at 4AM: we've seen several
instances of the runner being stopped externally, and we're _guessing_
this may have something to do with the midnight UTC execution time, when
other cron jobs may run
5. Removes the existing `nightly-gauntlet` jobs since they haven't
passed in a long time, indicating that nobody cares enough to fix them
and they don't provide diagnostic value; we can restore them later if
necessary

I've manually run both these new workflows successfully:

- `ci`:
https://github.com/coder/coder/actions/runs/12825874176/job/35764724907
- `nightly-gauntlet`:
https://github.com/coder/coder/actions/runs/12825539092

---------

Signed-off-by: Danny Kopping <danny@coder.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2025-01-20 07:06:33 +00:00
Phorcys 738a7f6bd9 fix(examples/templates/docker): persist /home/coder instead of /home/${local.user} (#16189)
Fix for #16188
2025-01-19 08:41:55 +05:00
Jaayden Halko fbc2a73bef fix: add groups to deployment settings (#16185)
fixes #16182 

<img width="1177" alt="Screenshot 2025-01-17 at 23 20 04"
src="https://github.com/user-attachments/assets/e0eec4bb-6b50-45e9-a27b-d3a89552562a"
/>
<img width="1163" alt="Screenshot 2025-01-17 at 23 20 12"
src="https://github.com/user-attachments/assets/d8a7129c-0240-4ef5-9f21-84cda5631366"
/>
<img width="1161" alt="Screenshot 2025-01-17 at 23 20 22"
src="https://github.com/user-attachments/assets/0ec78f3d-ec96-46a6-8def-aad4700712ac"
/>
2025-01-17 19:46:28 -05:00
Phorcys 5cc7c439f3 chore(dogfood): delete lazygit and doctl archives after installing (#16184) 2025-01-18 09:08:53 +10:00
Phorcys 04a48b8327 chore(dogfood): add doctl (#16136) 2025-01-18 06:15:05 +10:00
Edward Angert 4f438e71cf docs: fix broken links (#16179)
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Cian Johnston <cian@coder.com>
2025-01-17 13:18:48 -05:00
Steven Masley f34e6fd92c chore: implement 'use' verb to template object, read has less scope now (#16075)
Template `use` is now a verb.
- Template admins can `use` all templates (org template admins same in
org)
- Members get the `use` perm from the `everyone` group in the
`group_acl`.
2025-01-17 11:55:41 -06:00
Bruno Quaresma 3217cb85f6 feat: improve usage visibility (#16134)
- Refactor the DAUs chart for clarity by improving the description and updating its title to better reflect the data.  
- Add a license consumption chart to the licenses page.
2025-01-17 12:37:54 -03:00
Mathias Fredriksson 08ffcb74c6 test(Makefile): retry pulling postgres in test-postgres-docker (#16178) 2025-01-17 15:22:50 +00:00
Mathias Fredriksson 7cf62423ec test(cli): fix TestSSH/RemoteForward_Unix_Signal flake (#16172) 2025-01-17 16:53:09 +02:00
Mathias Fredriksson ea8cd55404 test(scaletest/createworkspaces): fix ctx init in multiple tests (#16177) 2025-01-17 14:43:22 +00:00
Mathias Fredriksson f32f7c6862 test(enterprise/coderd): fix ctx init in multiple workspace tests (#16176) 2025-01-17 14:33:58 +00:00
Jaayden Halko 0697308a0b fix: correctly display loading spinner (#16167)
Update the usages of the new spinner component to correctly set the
loading prop
2025-01-17 09:14:23 -05:00
Mathias Fredriksson 7f46e3b1e0 test(Makefile): fix postgresql memory usage (#16170) 2025-01-17 16:07:11 +02:00
Bruno Quaresma eda8190eee feat: open app in tab or slim-window (#16152)
Close https://github.com/coder/terraform-provider-coder/issues/297
2025-01-17 10:01:44 -03:00
Mathias Fredriksson e693b66b47 test(coderd/autobuild): fix context initialization in tests (#16173) 2025-01-17 14:51:53 +02:00
Mathias Fredriksson 860d17ad09 test(cli): fix context init in TestSupportBundle (#16174) 2025-01-17 14:51:38 +02:00
Mathias Fredriksson de874442f8 test(cli/exptest): fix context in TestScaleTestWorkspaceTraffic_UseHostLogin (#16171) 2025-01-17 14:51:24 +02:00
ケイラ cbe300448c chore: improve announcement banner color picker (#16158) 2025-01-16 16:55:17 -07:00
ケイラ 60c4d87113 fix: make announcement editor multiline (#16157) 2025-01-16 12:38:09 -07:00
Thomas Kosiewski 5722f9a2a3 fix(codersdk): fix typo in telemetry option description (#16151)
Fixed typos in telemetry help text by adding spaces between "personal information" and "telemetry when"

Change-Id: I897c5918c6661f9c16fdcb503c1c50e74c8f343a
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-01-16 19:21:07 +01:00
Muhammad Atif Ali b3ba0f96f1 chore: use better PR titles for cherry-pick-bot PRs (#16165) 2025-01-16 15:54:03 +00:00
Sas Swart 50bf5ca8fe fix(coderd/database): aggregate user engagement statistics by interval (#16150)
This PR addresses the TODO comment here:

https://github.com/coder/coder/pull/16134/files#diff-1844f895bb005f036da11d800fe2a76b54bfddd481c5d8cb15f210c64679caa5R47

The backend now backfills entries for dates with no status changes.
2025-01-16 17:34:53 +02:00
dependabot[bot] 296dbf0918 chore: bump google.golang.org/api from 0.214.0 to 0.216.0 (#16113)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 19:06:16 +05:00
Cian Johnston 3a81aac318 chore(enterprise/coderd): use filesystem mirror for providers in TestWorkspaceTagsTerraform (#16155)
Fixes https://github.com/coder/internal/issues/266 (hopefully)

Each instance of this test has to download the coder/coder Terraform
provider.
To mitigate this, only download the providers once using a
`filesystem_mirror` (ref:
https://developer.hashicorp.com/terraform/cli/config/config-file#provider-installation)
2025-01-15 20:27:18 +00:00
Bruno Quaresma 2052b55904 chore: add link component (#16156)
Component based on [Link
design](https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=245-144&p=f&m=dev)
2025-01-15 16:43:27 -03:00
Thomas Kosiewski 0ec48ad990 fix(flake.nix): fix coder binary build (#16154)
Change-Id: I2adc511dd7b4de4e221e74234ec1eae743589caf
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-01-15 19:25:36 +01:00
Thomas Kosiewski ad02b741d5 fix(flake.nix): fix site build & add missing inputs for darwin hosts (#16153)
- update `flake.nix`:
  - use `devShells.default` instead of `devShell`
  - include macOS-specific build inputs
  - use the same nodejs version in the default devShell and pnpm frontend build
- update `site/.npmrc` to include tarball URLs for a reproducible Nix build.

Change-Id: I28f0e301298806f251121cc93224740bcc02bcba
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-01-15 19:16:40 +01:00
Danielle Maywood 3e3de0588a fix: send workspace create/update notifications to template admins only (#16071)
Relates to https://github.com/coder/coder/issues/15845

Rather than sending the notification to the user, we send it to the
template admins. We also do not send it to the person that created the
request.
2025-01-15 17:43:11 +00:00
ケイラ cd62e3934a feat: add a page to showcase the local installation script (#16122) 2025-01-15 10:42:14 -07:00
Stephen Kirby d29ef9cc5c chore(docs): mention skipped january mainline release in calendar (#16138)
We've skipped the January release as most of our engineering team was on
holiday. We'll continue this practice annually.

---------

Co-authored-by: EdwardAngert <EdwardAngert@users.noreply.github.com>
2025-01-15 11:19:04 -06:00
Thomas Kosiewski e7f108145a fix(flake.nix): install locales on linux host devShells (#16120)
Change-Id: I22dba63d317b41749c807a55e15278006cdcecad
Signed-off-by: Thomas Kosiewski <tk@coder.com>

- Adds neovim and fzf to development tools, removes sapling, and fixes locale issues on Linux systems. 
- Updates Dockerfile.nix syntax to use uppercase `AS` to remove warnings. 
- Refactored conditional logic for strace inclusion using `lib.optional`.
2025-01-15 17:14:55 +01:00
Eng Zer Jun 92d02ad6cb chore: update github.com/cespare/xxhash to v2 (#16094)
`github.com/cespare/xxhash/v2` is the latest version with bug fixes and
improvements. No breaking changes, see
https://go.dev/play/p/4fisKvMhrGR.

Affected lines of code are: 

-
https://github.com/coder/coder/blob/8b9763dd2c5d82046c99437d8acdeaa6b552e8c4/provisioner/terraform/timings.go#L202-L205

-
https://github.com/coder/coder/blob/8b9763dd2c5d82046c99437d8acdeaa6b552e8c4/provisioner/terraform/internal/timings_test_utils.go#L90-L91

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2025-01-15 17:03:29 +02:00
Vincent Vielle a160e8f06c chore(coderd): remove the window option in open_in (#16104)
As we worked on adding a `open_in` parameter for workspace_apps - we
initially created three options :
- window
- slim_window
- tab

After further investigation, `window` should not be used and has to be
removed.

ℹ️ I decided to remove the option instead of deprecating it as we've not
created any release nor documented the feature. Can be discussed.
2025-01-15 15:26:31 +01:00
dependabot[bot] b4fde801f5 chore: bump golang.org/x/tools from 0.28.0 to 0.29.0 in the x group across 1 directory (#16149)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-15 13:58:12 +00:00
dependabot[bot] 188d822238 chore: bump github.com/spf13/afero from 1.11.0 to 1.12.0 (#16110)
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from
1.11.0 to 1.12.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-15 13:42:09 +00:00
dependabot[bot] 9bb3319f3a chore: bump alpine from 3.21.0 to 3.21.2 in /scripts (#16107)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-15 18:40:43 +05:00
dependabot[bot] 085268640b chore: bump github.com/go-playground/validator/v10 from 10.23.0 to 10.24.0 (#16111)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-15 18:39:51 +05:00
Dean Sheather 0ecd38c434 chore: remove Tokyo server from dogfood (#16146) 2025-01-15 13:33:48 +00:00
Bruno Quaresma 91fd0c1eab refactor: set min width as 80px for buttons (#16145)
During a [design
discussion](https://www.figma.com/design/OR75XeUI0Z3ksqt1mHsNQw?node-id=1849-2788#1091281774),
I realized that buttons should have a minimum width of 80px.

<img width="304" alt="attachment"
src="https://github.com/user-attachments/assets/55bc444e-b156-442f-9ccd-1dc84bbce7e5"
/>
2025-01-15 10:03:01 -03:00
Sas Swart ab880904e2 feat(coderd/database): order user engagement statistics by date (#16142)
This PR orders user engagement statistics by date as mentioned
[here](https://github.com/coder/coder/pull/16134/files#diff-1844f895bb005f036da11d800fe2a76b54bfddd481c5d8cb15f210c64679caa5R47)
2025-01-15 13:19:25 +02:00
Ethan a252d13724 chore: exclude otlp trace provider from slim builds (#16140)
This adds a build flag to `exporter.go` in `coderd/tracing` that skips
compiling the file in slim builds. This file brings in some relatively
hefty dependencies that were growing the size of the slim binary a few
megabytes. All files that import `exporter.go` also aren't included in
slim builds, so this is safe.

We end up saving 5.4MB on the Linux slim binary.
2025-01-15 20:51:32 +11:00
Ethan 2413106f22 fix: improve shell compatibility of netstat check in test (#16141)
When I wrote the original just the other day, I used `$?`, which is fine
on CI and in most cases, but not when the person running the test has
their system shell set to fish (Fish uses $status) instead. In the
interest of letting this test pass locally, I'll instead just grab the
line count of the grep output. However, `wc` is padded on macos with
spaces, so we need to get rid of those too.
2025-01-15 03:23:53 +00:00
Stephen Kirby 53806906ea chore(docs): tweak replica verbiage on reference architectures (#16076)
A seller noted that the `/` operator made the node count hard to
interpret.
2025-01-14 16:26:10 -06:00
ケイラ a450121e74 feat: bundle a local version of install.sh (#16064) 2025-01-14 11:30:39 -07:00
Mathias Fredriksson 5a89e89d7e chore(dogfood): unminimize ubuntu image to include man pages (#16133) 2025-01-14 19:10:18 +02:00
Cian Johnston 12991ff43e fix(coderd): change the order of precedence between coder_workspace_tags and request tags (#16119)
This PR switches the order of precedence of workspace tags when posting
a template version.
Previously, user-specified tags in the request could not override those
detected from our parsing of the template file. Now, they can do.

This addresses a customer issue where were attempting to set a workspace
tag via variable.

Note: there is a possible follow-up item here where we could pass in the
workspace tag values from the request into `tfparse` and let it take
those user-specified values into account. This is covered in a separate
test.
2025-01-14 16:43:42 +00:00
Mathias Fredriksson 071bb26018 feat(coderd): add endpoint to list provisioner daemons (#16028)
Updates #15190
Updates #15084
Supersedes #15940
2025-01-14 16:40:26 +00:00
Cian Johnston d7809ecf3f fix(scripts/coder-dev.sh): silence output if stdout is not a TTY (#16131)
The `make -j` output was sometimes emitting non-JSON output from `go
generate`, resulting in errors like the below:

```
++ /home/coder/src/coder/coder/scripts/coder-dev.sh organizations show me -o json
++ jq -r '.[] | select(.is_default) | .name'
parse error: Invalid numeric literal at line 1, column 3
```

This PR modifies `coder-dev.sh` to silence the output of `make` if the
output is not a TTY.
2025-01-14 14:34:23 +00:00
Bruno Quaresma 473fcc33a5 chore: add Chart component (#16118)
Related to https://github.com/coder/coder/issues/15297 and based on
[this
design](https://www.figma.com/design/gtVchocIWPGYjzaHD2OIY7/Setting-page?node-id=16-1848&m=dev).
2025-01-14 09:04:14 -03:00
Aaron Lehmann 8f02e633bf feat: use wildcard Host entry in config-ssh (#16096)
Rather than create a separate `Host` entry for every workspace,
configure a wildcard such as `coder.*` which can accomodate all of a
user's workspaces.

Depends on #16088.
2025-01-13 19:07:42 -06:00
Aaron Lehmann 1aa9e32a2b feat: add --ssh-host-prefix flag for "coder ssh" (#16088)
This adds a flag matching `--ssh-host-prefix` from `coder config-ssh` to
`coder ssh`. By trimming a custom prefix from the argument, we can set
up wildcard-based `Host` entries in SSH config for the IDE plugins (and
eventually `coder config-ssh`).

We also replace `--` in the argument with `/`, so ownership can be
specified in wildcard-based SSH hosts like `<owner>--<workspace>`.

Replaces #16087.

Part of https://github.com/coder/coder/issues/14986.

Related to https://github.com/coder/coder/pull/16078 and
https://github.com/coder/coder/pull/16080.
2025-01-13 19:07:21 -06:00
Aaron Lehmann ec6645b832 chore: add parent PID to coder ssh log file name (#16080)
Part of bringing `coder ssh` to parity with `coder vscodessh` is
associating the log files with a particular parent process (in this
case, the ssh process that spawned the coder CLI via `ProxyCommand`).
`coder vscodessh` named log files using the parent PID, but coder ssh is
missing this. Add the parent PID to the log file name when used in stdio
mode so that the VS Code extension will be able to identify the correct
log file.

See also #16078.
2025-01-13 18:30:02 -06:00
Aaron Lehmann 838ee3b244 feat: add --network-info-dir and --network-info-interval flags to coder ssh (#16078)
This is the first in a series of PRs to enable `coder ssh` to replace
`coder vscodessh`.

This change adds `--network-info-dir` and `--network-info-interval`
flags to the `ssh` subcommand. These were formerly only available with
the `vscodessh` subcommand.

Subsequent PRs will add a `--ssh-host-prefix` flag to the ssh
subcommand, and adjust the log file naming to contain the parent PID.
2025-01-13 18:29:31 -06:00
Bruno Quaresma c2b55346ac chore: add Select component (#16121)
Related to https://github.com/coder/coder/issues/15297 and based on
[this
design](https://www.figma.com/design/gtVchocIWPGYjzaHD2OIY7/Setting-page?node-id=16-1848&m=dev).
2025-01-13 20:29:39 -03:00
Danielle Maywood 7c595e2631 feat: allow removing deadline for running workspace (#16085)
Fixes https://github.com/coder/coder/issues/9775

When a workspace's TTL is removed, and the workspace is running, the
deadline is removed from the workspace.

This also modifies the frontend to not show a confirmation dialog when
the change is to remove autostop.
2025-01-13 21:37:57 +00:00
dependabot[bot] 048a10a318 chore: bump storybook-addon-remix-react-router from 3.0.2 to 3.1.0 in /site (#16000) 2025-01-13 12:20:31 -07:00
Garrett Delfosse 0008c135cf feat: add scaletest load generation infrastructure (#15816)
Closes https://github.com/coder/internal/issues/149

This creates workspaces in each region and runs traffic generation
against the workspaces colocated in the region.
2025-01-13 17:08:40 +00:00
Thomas Kosiewski 8a8e7b19af fix(site): validate group name before submitting to the backend (#16115) 2025-01-13 17:54:21 +01:00
Hugo Dutka dd29997b9c chore: reduce parallelism for test-go-pg on macOS (#16116)
We're seeing test-go-pg flakes on macOS in CI. We've had the same
problem on Windows, and reducing test parallelism in
https://github.com/coder/coder/pull/16090 seemed to help. This PR makes
the same change on macOS.
2025-01-13 16:57:48 +01:00
Danielle Maywood 009069cd47 feat: allow notification templates to be disabled by default (#16093)
Change as part of https://github.com/coder/coder/pull/16071

It has been decided that we want to be able to have some notification
templates be disabled _by default_
https://github.com/coder/coder/pull/16071#issuecomment-2580757061.

This adds a new column (`enabled_by_default`) to
`notification_templates` that defaults to `TRUE`. It also modifies the
`inhibit_enqueue_if_disabled` function to reject notifications for
templates that have `enabled_by_default = FALSE` with the user not
explicitly enabling it.
2025-01-13 15:01:47 +00:00
Danny Kopping 22236f2988 chore: only notify about CI failure on main if required job fails (#16114)
This should be the last PR to get this working

Looks like the `nightly-gauntlet` is working as expected, and this is a
clone of that.

---------

Signed-off-by: Danny Kopping <danny@coder.com>
2025-01-13 14:06:43 +00:00
Ethan 24dd8a17d3 ci: switch test-go-pg on macOS to depot runners (#16101)
Since I missed this in #16100 :(
2025-01-13 23:07:10 +11:00
Danny Kopping f9f72de1d6 chore: predicate slack notification job on other jobs (#16106)
`always()` does not seem to work

Extending https://github.com/coder/coder/pull/16105

Signed-off-by: Danny Kopping <danny@coder.com>
2025-01-13 13:42:37 +02:00
Sas Swart 4543b21b7c feat(coderd/database): track user status changes over time (#16019)
RE: https://github.com/coder/coder/issues/15740,
https://github.com/coder/coder/issues/15297

In order to add a graph to the coder frontend to show user status over
time as an indicator of license usage, this PR adds the following:

* a new `api.insightsUserStatusCountsOverTime` endpoint to the API
* which calls a new `GetUserStatusCountsOverTime` query from postgres
* which relies on two new tables `user_status_changes` and
`user_deleted`
* which are populated by a new trigger and function that tracks updates
to the users table

The chart itself will be added in a subsequent PR

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2025-01-13 13:08:16 +02:00
Danny Kopping 73d8dde6ed chore: notify #dev of nightly gauntlet failures (#16105)
Expands on https://github.com/coder/coder/pull/16102

This workflow is currently failing every night, so this will not only
raise immediate awareness but will also be easy to validate this job.

Signed-off-by: Danny Kopping <danny@coder.com>
2025-01-13 10:15:15 +00:00
Ethan a7fe35af25 fix: use netstat over ss when testing unix socket (#16103)
Closes https://github.com/coder/internal/issues/274.

`TestSSH/RemoteForwardUnixSocket` previously used `ss` for confirming if
a socket was listening. `ss` isn't available on macOS, causing the test
to flake.

The test previously passed on macOS as a 2 could always be read on the
SSH connection, presumably reading it as part of some escape sequence? I
confirmed the test passed on Linux if you comment out the `ss` command,
the pty would always read a sequence ending in `[?2`.
2025-01-13 20:51:55 +11:00
Danny Kopping 859abcde4e chore: send notification to #dev on any CI failure on main (#16102)
We've had a [few failures in
main](https://github.com/coder/coder/actions?query=branch%3Amain+is%3Afailure)
of late, and unless the committer of the change has CI notifications
enabled we may not be aware of the failure.

This PR sends a Slack notification to the #dev channel so everyone has
visibility.

Signed-off-by: Danny Kopping <danny@coder.com>
2025-01-13 11:28:45 +02:00
Ethan 88a9c4bb59 ci: switch test-go on macOS to depot runners (#16100)
We use depot runners where possible everywhere else. As a bonus, the
depot runners for Mac would appear to be slightly beefier than the
GitHub ones (8 vs 6 cores).

We've already been using the depot macOS runners to build the VPN dylib
for the past month or so.
2025-01-13 16:53:51 +11:00
Ethan 14cd58dc3b fix(site): fix typo on new workspace screen (#16099)
Closes #16084.
2025-01-13 03:10:45 +00:00
Gregory McCue 08dd2ab4cc docs: fix typo in prometheus.md (#16091)
Fixes small `scrape_config` typo in `prometheus.md`
2025-01-10 12:02:25 -05:00
Michael Smith 8b9763dd2c fix: ensure active Deployment Page nav links are highlighted (#16092)
## Changes made
- Updated links in the deployment settings page to ensure that they're
highlighted properly
- Updated comment about previous PR to make sure it's clear why we
needed a workaround.
2025-01-10 09:58:42 -05:00
Mathias Fredriksson 8c44cd3dfd test(cli/ssh): fix ssh start conflict test by faking API response (#16082) 2025-01-10 14:48:11 +00:00
Hugo Dutka 899836d47a chore: reduce Windows PG tests flakiness (#16090)
This PR:

- Reduces test parallelism on Windows in CI
- Unifies wait intervals on Windows with Linux and macOS. Previously we
had custom intervals for Windows to reduce test flakiness on smaller CI
workers, but we don't run tests on small CI workers anymore. Due to how
our CI file is defined, forks run tests on small CI machines, but I'm
not sure if the different intervals actually help or whether that's a
heuristic that happened to fix issues on a particular day and was it
ever reevaluated. I propose we make the change and if someone complains,
revert it.

In particular, reduced test parallelism seems to actually help: I was
able to run Windows tests 5 times in a row without flakes. Not sure if
that's going to fix the problem long term, but it seems worth trying.
2025-01-10 15:21:03 +01:00
Jaayden Halko 630fd7c0a1 fix: navlink investigation (#16073)
Normally the react router Navlink should normalize the url path and
match with or without a / on the end of the path.

This is a fix to use useMatch() to explicitly see if the current path is
a match to an href to determine whether to apply active styling to the
navlink
2025-01-09 17:51:14 -05:00
Marcin Tojek 20c36a655a fix(site): do not error on closed build logs stream (#16067)
Related: https://github.com/coder/coder/issues/15937
2025-01-09 13:43:20 +01:00
Danny Kopping 401f8b4fea provide useful debug info when retrieving a version from GitHub fails (#15956)
Closes https://github.com/coder/coder/issues/15851

This fails the installation when the version cannot be retrieved, and
prints useful debug info.

`install.sh` could use with more error-handling in general, but this at
least ameliorates the linked issue.

Signed-off-by: Danny Kopping <danny@coder.com>
2025-01-09 09:47:20 +00:00
Cian Johnston 5e88289493 chore(enterprise/coderd): conditionally disable parallelism on windows (#16072)
Fixes https://github.com/coder/internal/issues/266
2025-01-09 09:14:20 +00:00
Muhammad Atif Ali f4994ca783 chore(dogfood): add vscode-web module (#16081) 2025-01-09 08:03:05 +00:00
Jaayden Halko 6ca1e5973e chore: add api endpoints to get idp field values (#16063)
Supports coder/internal#210
2025-01-08 16:07:02 -05:00
dependabot[bot] 303c4a9edb chore: bump sanitize-html from 2.13.1 to 2.14.0 in /offlinedocs (#15997)
Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html)
from 2.13.1 to 2.14.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md">sanitize-html's
changelog</a>.</em></p>
<blockquote>
<h2>2.14.0 (2024-12-18)</h2>
<ul>
<li>Fix adding text with <code>transformTags</code> in cases where it
originally had no text child elements. Thanks to <a
href="https://cthu.lu">f0x</a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/apostrophecms/sanitize-html/commit/1a11f7cfcf4cc7278e0d85c34c1d7a24eed045ab"><code>1a11f7c</code></a>
eslint</li>
<li><a
href="https://github.com/apostrophecms/sanitize-html/commit/4ae37d9cf153bdf7f41cdb9e4747d186fbce35dc"><code>4ae37d9</code></a>
Merge pull request <a
href="https://redirect.github.com/apostrophecms/sanitize-html/issues/687">#687</a>
from apostrophecms/release-2.14.0</li>
<li><a
href="https://github.com/apostrophecms/sanitize-html/commit/af629446dbcf6304cbe294002187b397981ec230"><code>af62944</code></a>
release 2.14.0</li>
<li><a
href="https://github.com/apostrophecms/sanitize-html/commit/d50f36f25c7142cda17f5052cbcb3e878efa2b53"><code>d50f36f</code></a>
Merge pull request <a
href="https://redirect.github.com/apostrophecms/sanitize-html/issues/684">#684</a>
from f0x52/transform-new-text1</li>
<li><a
href="https://github.com/apostrophecms/sanitize-html/commit/19e95321c3b5312a98cb0a24f0a10c9c36b24d67"><code>19e9532</code></a>
changelog entry</li>
<li><a
href="https://github.com/apostrophecms/sanitize-html/commit/de2aefb445ec5d208467115c826ee3d3be7c868f"><code>de2aefb</code></a>
add testcase for transforming text inside empty tags</li>
<li><a
href="https://github.com/apostrophecms/sanitize-html/commit/98b4900dc29af63d7562ffc5d5bdaa81c869bfd1"><code>98b4900</code></a>
still add text added by transformation when tag is discarded</li>
<li>See full diff in <a
href="https://github.com/apostrophecms/sanitize-html/compare/2.13.1...2.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sanitize-html&package-manager=npm_and_yarn&previous-version=2.13.1&new-version=2.14.0)](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-08 10:08:22 -08:00
dependabot[bot] 9494afaae1 chore: bump gopkg.in/DataDog/dd-trace-go.v1 from 1.69.0 to 1.70.3 (#16066)
Bumps gopkg.in/DataDog/dd-trace-go.v1 from 1.69.0 to 1.70.3.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 16:49:44 +00:00
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
dependabot[bot] 75fa8cab9f chore: bump @storybook/preview-api from 8.4.6 to 8.4.7 in /site (#16002)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 14:31:18 +05:00
Mathias Fredriksson 7152f4a740 ci: make sure golden files are actually up to date (#15989) 2025-01-02 11:05:11 +02:00
dependabot[bot] 0e26a665ae chore: bump eslint-config-next from 14.2.18 to 14.2.22 in /offlinedocs (#15996)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 13:57:04 +05:00
dependabot[bot] 7ad6733856 chore: bump @types/node from 20.17.6 to 20.17.11 in /site (#16001) 2025-01-02 11:26:48 +05:00
dependabot[bot] 9ef489d3c5 chore: bump @types/node from 20.17.9 to 20.17.11 in /offlinedocs (#15995) 2025-01-02 11:26:32 +05:00
dependabot[bot] eee08c432a chore: bump next from 14.2.16 to 14.2.22 in /offlinedocs (#15993) 2025-01-02 11:26:25 +05:00
dependabot[bot] efbb49c98a chore: bump the mui group across 1 directory with 6 updates (#15991) 2025-01-02 11:25:43 +05:00
Mathias Fredriksson f517e5f3e0 fix(enterprise/cli): add missing defer close of closer funcs (#15986) 2024-12-31 14:39:19 +00:00
Mathias Fredriksson 23b1c2d6b2 fix(cli/cliui): handle typed nil and null time in tables (#15984) 2024-12-31 14:36:46 +00:00
Mathias Fredriksson ca96e670ed test: fix incorrectly placed cleanup defer in dbtestutil (#15987) 2024-12-31 16:28:29 +02:00
Mathias Fredriksson cc98bab30f chore(scripts): remove unused ci-report (#15988) 2024-12-31 14:05:36 +00:00
Mathias Fredriksson 64283abaf8 chore(Makefile): add convenience gen/db (#15983) 2024-12-31 15:47:47 +02:00
Steven Masley c9eb06eb97 chore: remove dead link to azure docs issues (#15982) 2024-12-31 16:17:59 +05:00
Phorcys 5294f7aae3 chore: add CONTRIBUTING.md (#15981) 2024-12-31 13:07:32 +05:00
Bruno Quaresma 49fadb801d refactor: update the navbar to match the new designs (#15964)
Update the navbar to match the designs in [this Figma
file](https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=656-2354&t=4a6pX5tQU5Ti2Oyi-0).
Related to https://github.com/coder/coder/issues/15617.

**Desktop preview:**


https://github.com/user-attachments/assets/01ce7cd2-baaa-49c4-9e9a-bf6e675151da

**Mobile preview:**


https://github.com/user-attachments/assets/155e2521-7293-4368-a5f5-425179d76326

For a closer look, you can check Chromatic snapshots or test the changes
locally.

**A few considerations:**
- I made some adjustments to improve the design, such as removing the
chevron from the profile menu and reducing the size of the chevrons in
the dropdowns. I’ve documented these changes in the [Figma
file](https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=656-2354&t=4a6pX5tQU5Ti2Oyi-0)
so @chrifro can review them after returning from vacation.
- Some of the design questions involve how the proxy and account
dropdown menus should look on desktop and mobile. For desktop, I decided
to retain the current styles, and for mobile, I tried to infer how they
should look based on the existing design.
- There is some duplicated logic between the regular/desktop navbar
menus and the mobile menus, which could lead to inconsistencies and make
maintenance harder in the future. I plan to address this in a follow-up
PR to keep this review manageable.
- I’ve added tests to minimize inconsistencies and potential bugs while
working on this refactor.
2024-12-30 14:25:00 -03:00
Steven Masley 459003fdb1 chore: update guts to first tagged release (#15975)
Changes error about name collision in generation to a warning. The name
collision still exists, just moved it to a warning rather than an error
in the logs.
2024-12-30 10:45:38 -06:00
Sas Swart 14579fa55a chore(Makefile): add shell safety to fmt/go (#15974)
This PR adds shell safety to `make fmt/go` as per
https://github.com/coder/coder/pull/15971#discussion_r1899423172
2024-12-30 12:56:22 +02:00
Sas Swart 6434199a86 chore(Makefile): ensure that make fmt/go only formats go source files (#15971)
An unfortunate branch name resulted in failures when running `make
fmt/go` and consequently `make fmt`. fmt should not be run on the .git
directory. This PR excludes `.git` and anything else that's not a go
source file in the currently checked out branch from the consideration
of `make fmt/go`.
2024-12-30 11:45:06 +02:00
Phorcys 8befb34eca feat(examples/templates/digitalocean-linux): add code-server and jetbrains gateway modules (#15546) 2024-12-27 21:45:29 +01:00
Bruno Quaresma d02ff9069a refactor: use apple emojis (#15965)
Closes https://github.com/coder/coder/issues/14998
2024-12-27 15:03:25 -03:00
Joobi S B 638247c9a6 feat: allow entering non-default values in multi-select (#15935) 2024-12-27 16:45:46 +05:00
Bruno Quaresma 865969400b chore: add Collapsible component (#15961)
This component is needed to complete the mobile menu for the [navbar
refactoring task](https://github.com/coder/coder/issues/15617). You can
check out the Figma design
[here](https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=656-2354&t=jm6tERwCzB1TBeds-0).
2024-12-26 16:03:28 -03:00
Phorcys 03edd604a7 chore(examples/templates/digitalocean-linux): make template more friendly (#15938) 2024-12-25 00:52:23 +05:00
Cian Johnston 26b1f1c3a3 chore(docs/admin/infrastructure): call out and link to awsiamrds auth for aws rds (#15955)
Call out AWS IAM RDS db auth and clarify URL encoding requirement in postgres URL
2024-12-24 12:22:40 +00:00
dependabot[bot] 314bb67dbe chore: bump github.com/gohugoio/hugo from 0.139.4 to 0.140.0 (#15951)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 13:32:54 +00:00
dependabot[bot] ec3e461b42 chore: bump google.golang.org/api from 0.213.0 to 0.214.0 (#15949)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 18:16:46 +05:00
dependabot[bot] 20d51067ab chore: bump golang.org/x/net from 0.32.0 to 0.33.0 in the x group (#15948)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 18:15:39 +05:00
dependabot[bot] 572461be83 chore: bump github.com/moby/moby from 27.3.1+incompatible to 27.4.1+incompatible (#15916)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 15:43:15 +05:00
dependabot[bot] 70ca6e3eeb chore: bump github.com/valyala/fasthttp from 1.56.0 to 1.58.0 (#15880)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 10:21:24 +00:00
dependabot[bot] 8d05e599f6 chore: bump github.com/hashicorp/terraform-json from 0.23.0 to 0.24.0 (#15876)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 14:51:42 +05:00
Phorcys c41d7c38ae feat(examples/templates/kubernetes-devcontainer): switch code-server to a module and add JetBrains (#15545) 2024-12-21 16:38:29 +05:00
Jaayden Halko 5786a13ac9 chore: apply design changes to the admin settings menu dropdown (#15947)
resolves coder/internal#177

Design changes for the admin settings menu dropdown

<img width="327" alt="Screenshot 2024-12-20 at 17 44 48"
src="https://github.com/user-attachments/assets/04af04b3-bfa2-4659-b31c-58252bf43c05"
/>
2024-12-20 17:55:19 -05:00
Bruno Quaresma 809c6114be chore: add DropdownMenu component (#15941)
Related to https://github.com/coder/coder/issues/15617
2024-12-20 14:12:48 -03:00
Steven Masley 2bba3d7b7c chore: update coder/tailscale to latest main (#15927)
To bring in https://github.com/coder/tailscale/pull/66

Closes https://github.com/coder/coder/issues/15616
2024-12-20 09:13:25 -06:00
Steven Masley 6e021b64b4 chore: record and raise problematic http protocols for each proxy (#15917)
Adds warnings to the proxy and proxy health pages on HTTP 1.1, 1.0, 0.9
protocols.


Only the performance API can return the HTTP protocol type. We already
use the performance API for latency timings, and each proxy could have
this issue.
2024-12-20 09:11:45 -06:00
Danielle Maywood f0e81ab455 feat: notify on workspace creation (#15934) 2024-12-20 13:53:10 +00:00
Bruno Quaresma f5d3f713c6 fix: use icon mode for org avatar (#15945)
Fix related to https://github.com/coder/coder/pull/15930
2024-12-20 13:48:03 +00:00
Bruno Quaresma 300ad87c2e refactor: replace and remove deprecated Avatar component (#15930)
Close https://github.com/coder/coder/issues/14997
2024-12-20 09:57:51 -03:00
Danielle Maywood 137dc6e226 fix: remove update to workspace TTL on template TTL change for AGPL (#15943) 2024-12-20 09:52:03 +00:00
Cian Johnston 9e9a5fd204 chore(coderd/coderdtest): wait for provisioner daemons to be connected (#15936)
Fixes https://github.com/coder/internal/issues/260
2024-12-20 09:49:19 +00:00
ケイラ 962608cde0 chore: allow signing in as non-admin users in e2e tests (#15892)
Closes coder/internal#168

Gets rid of the "global state" authentication, and adds a `login` helper
which should be called at the beginning of each test. This means that
not every test needs to authenticated as admin, and we can even have
tests that encompass multiple permission levels.

We also now create more than just the single admin user during setup, so
that we can have a set of users to pick from as appropriate.
2024-12-19 16:16:34 -07:00
Jaayden Halko 1ead56fdc9 fix: add missing idp-org-sync sidebar item (#15933)
During the work to split the deployment and organizations sidebars, the
sidebar item for idp organization sync was accidentally removed.
2024-12-19 18:14:09 -05:00
dependabot[bot] f34f275bb4 chore: bump the emotion group across 2 directories with 4 updates (#15833) 2024-12-19 15:35:38 -07:00
Mathias Fredriksson d59fddbf6a test(cli/clitest): pad replacements for table alignment (#15942) 2024-12-20 00:06:22 +02:00
Spike Curtis 63572d9f53 fix: loosen timing checks for heartbeats (#15923)
Fixes #15782.

I believe that Windows doesn't always have high-resolution timers available, so this PR loosens the check for PG Coordinator heartbeats, to avoid flakes like:

https://github.com/coder/coder/actions/runs/12397381823/job/34607639048
2024-12-19 13:49:01 +04:00
dependabot[bot] 9ef22bebc4 chore: bump google.golang.org/grpc from 1.68.0 to 1.69.2 (#15928)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-19 08:26:17 +00:00
dependabot[bot] 6499106796 chore: bump google.golang.org/api from 0.210.0 to 0.213.0 (#15929)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-19 13:12:40 +05:00
Edward Angert e7152d67c4 docs: add a link to the quickstart guide in the install Coder document (#15931) 2024-12-19 12:47:21 +05:00
Muhammad Atif Ali 7697005663 chore(dogfood): prevent downloading modules on workspace stop (#15922) 2024-12-19 12:46:41 +05:00
Jaayden Halko cdc1978f4d feat: add breadcrumbs to admin settings pages (#15865)
resolves coder/internal#174

Uses shadcn/ui for admin settings breadcrumbs

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

<img width="1180" alt="Screenshot 2024-12-13 at 21 37 18"
src="https://github.com/user-attachments/assets/7ab5faa0-dcc9-437e-9ecf-5365cea5d69e"
/>
<img width="1178" alt="Screenshot 2024-12-13 at 21 37 27"
src="https://github.com/user-attachments/assets/b0b55ec2-8a9e-4316-a850-a37480173f9c"
/>
2024-12-18 17:35:31 -05:00
Jaayden Halko 8e61e4a0be feat: split management settings sidebar into deployment/organization sidebars (#15388)
resolves coder/internal#199

Currently the admin settings has a combined sidebar for deployment
settings and organization settings, this PR separates the sidebar in 2
sidebars for deployment and organization settings.

This is preparation for the redesign work of the organization settings
sidebar where a dropdown will be user to select and create new
organizations.

see figma:
https://www.figma.com/design/OR75XeUI0Z3ksqt1mHsNQw/Dashboard-v1?node-id=684-5287&m=dev

This also does some of the initial redesign work for the sidebars using
Tailwind.


<img width="1172" alt="Screenshot 2024-11-05 at 5 28 47 PM"
src="https://github.com/user-attachments/assets/5ede14fa-1da9-4e74-a967-81f4e5772c68">
<img width="1169" alt="Screenshot 2024-11-05 at 5 28 56 PM"
src="https://github.com/user-attachments/assets/459339ba-f3bf-4ef2-b86a-143c922108b7">
2024-12-18 17:18:46 -05:00
Spike Curtis 2c7f8ac65f chore: migrate to coder/websocket 1.8.12 (#15898)
Migrates us to `coder/websocket` v1.8.12 rather than `nhooyr/websocket` on an older version.

Works around https://github.com/coder/websocket/issues/504 by adding an explicit test for `xerrors.Is(err, io.EOF)` where we were previously getting `io.EOF` from the netConn.
2024-12-19 00:51:30 +04:00
Garrett Delfosse 50333d312f feat: add workspace-proxy-url flag to scaletest workspace-traffic (#15920)
This allows the command to target a workspace proxy when appropriate. 

Part of https://github.com/coder/internal/issues/149

So far I've verified the correct url being used with logs:
```
➜  coder git:(f0ssel/workspace-traffic-proxy) ✗ go run ./cmd/coder/main.go exp scaletest workspace-traffic --job-timeout=60s --workspace-proxy-url="https://paris.fly.dev.coder.com"
Running load test...

web url: https://paris.fly.dev.coder.com

...

➜  coder git:(f0ssel/workspace-traffic-proxy) ✗ go run ./cmd/coder/main.go exp scaletest workspace-traffic --job-timeout=60s --workspace-proxy-url="https://paris.fly.dev.coder.com" --app="code-server"
Running load test...

app url: https://paris.fly.dev.coder.com/@f0ssel/scaletest-1.dev/apps/code-server
```
2024-12-18 11:53:01 -05:00
Phorcys 7be96bbb09 chore(docs): clarify that variables be edited through the web UI (#15799) 2024-12-18 15:55:19 +00:00
Bruno Quaresma 02fd7582de chore: ignore storybook files on biome (#15918) 2024-12-18 14:11:11 +00:00
Steven Masley fe98644393 chore: ensure go file is valid during generation (#15903)
Closes https://github.com/coder/internal/issues/258

---------

Co-authored-by: Cian Johnston <cian@coder.com>
2024-12-18 07:20:26 -06:00
Steven Masley 13bb4492c9 chore: remove apitypings specific go.mod (#15899)
Keeping the deps in sync between this and the primary go.mod is
a headache. 


adds Tailscale generated types
2024-12-18 07:18:31 -06:00
dependabot[bot] e0f802223d chore: bump lucide-react from 0.454.0 to 0.462.0 in /site (#15700)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-18 12:55:05 +00:00
Marcin Tojek 7c82b83232 fix: adjust validation errors for template schedule form (#15915)
Fixes: https://github.com/coder/coder/issues/15910

This PR sets custom validation errors for the Template Schedule form
when the given value is not integer.
2024-12-18 13:38:19 +01:00
Marcin Tojek efa9f009b6 fix: correct link to premium plan (#15914)
Fixes: https://github.com/coder/coder/issues/15911

The link target `/licensing` does not exist, so we need to link to
_Pricing Plans_ instead.
2024-12-18 13:06:46 +01:00
Ethan 01f2ac0a09 chore: embed Info.plist in dylib (#15907)
Relates to https://github.com/coder/coder-desktop-macos/issues/2
2024-12-18 11:08:33 +00:00
Danielle Maywood 91875c2b47 fix: allow users to extend their running workspace's deadline (#15895)
Fixes https://github.com/coder/coder/issues/15515

This change effectively reverts the changes introduced by
https://github.com/coder/coder/pull/13182 (for
https://github.com/coder/coder/issues/13078).

We also rename the `override-stop` command name to `extend` to match the
API endpoint's name (keeping an alias to allow `override-stop` to be used).
2024-12-18 10:58:33 +00:00
Mathias Fredriksson 4c5b737368 fix: accumulate agentstats until reported and fix insights DAU offset (#15832) 2024-12-18 11:26:38 +02:00
dependabot[bot] 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
Cian Johnston 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
Edward Angert 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
Edward Angert 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
Jaayden Halko 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
Edward Angert 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
Bruno Quaresma 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
Edward Angert 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
Joobi S B 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
Benjamin Peinhardt 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
Edward Angert 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
Jon Ayers 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
Jon Ayers 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
Jaayden Halko 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
dependabot[bot] 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
Ethan 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
Stephen Kirby c84bf9f815 chore(docs): bump version in release calendar, kubernetes install docs (#15737) 2024-12-16 09:29:41 +00:00
Cian Johnston 14ce3aa018 chore(go.mod): update x/crypto to 0.31.0 (#15869) 2024-12-16 09:20:31 +00:00
Nguyễn Đức Huy 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
Ethan 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
dependabot[bot] 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
Ethan 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
Danielle Maywood 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
Jaime Martínez Rincón 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
Cian Johnston 34a2ec8ad9 ci: build images on depot again (#15860) 2024-12-13 13:59:24 +00:00
Jaayden Halko 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
Sas Swart 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
Cian Johnston d35de45d94 ci: try building images on GitHub-hosted runner again (#15854) 2024-12-12 23:33:22 +00:00
Sas Swart 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
Garrett Delfosse 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
Steven Masley 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
Cian Johnston 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
Dean Sheather edb0cb155f chore: remove Johannesburg server from dogfood (#15842) 2024-12-12 06:44:51 +00:00
Ethan 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
Ben Winding 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
Edward Angert 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
Steven Masley 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
Eric Paulsen 2ec2e8ae6d docs: add istio docs (#15733)
closes https://github.com/coder/coder/issues/11821
2024-12-11 17:48:28 +00:00
dependabot[bot] 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
dependabot[bot] 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
Sas Swart 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
Eric Paulsen 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
Kevin Ha 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
Ethan 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
dependabot[bot] 426b348560 chore: bump nanoid from 3.3.7 to 3.3.8 in /site (#15810) 2024-12-10 10:30:23 -07:00
Edward Angert 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
Cian Johnston 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
Dean Sheather 33d67b1f4e chore: add Cape Town dogfood server (#15811) 2024-12-10 05:53:02 +00:00
Ethan 49c453b42e chore: replace unmaintained ping library (#15808)
Relates to
https://github.com/coder/coder/pull/15712#issuecomment-2527841239.

We only use a ping library to determine the closest devtunnel node, so
is a very minor change.
2024-12-10 08:51:46 +05:00
ケイラ 1bac277156 chore: improve e2e organization test (#15775) 2024-12-09 13:29:30 -07:00
Phorcys bc4f9a4327 fix(examples/templates/aws-linux): add hashicorp/cloudinit provider (#15794) 2024-12-09 21:51:07 +05:00
dependabot[bot] e4597ed8ae chore: bump golang.org/x/tools from 0.27.0 to 0.28.0 in the x group across 1 directory (#15792)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 18:27:41 +05:00
Phorcys 8a408176e8 feat(examples/templates/kubernetes-envbox): promote module usage (#15548) 2024-12-09 18:18:53 +05:00
dependabot[bot] 155cb0761c chore: bump @chakra-ui/react from 2.10.3 to 2.10.4 in /offlinedocs (#15697)
Bumps
[@chakra-ui/react](https://github.com/chakra-ui/chakra-ui/tree/HEAD/packages/react)
from 2.10.3 to 2.10.4.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/chakra-ui/chakra-ui/commits/HEAD/packages/react">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@chakra-ui/react&package-manager=npm_and_yarn&previous-version=2.10.3&new-version=2.10.4)](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>
2024-12-09 17:49:01 +05:00
dependabot[bot] b99566113d chore: bump github.com/fergusstrange/embedded-postgres from 1.29.0 to 1.30.0 (#15790)
Bumps
[github.com/fergusstrange/embedded-postgres](https://github.com/fergusstrange/embedded-postgres)
from 1.29.0 to 1.30.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/fergusstrange/embedded-postgres/releases">github.com/fergusstrange/embedded-postgres's
releases</a>.</em></p>
<blockquote>
<h2>v1.30.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: error typos and introduce error types by <a
href="https://github.com/dhaus67"><code>@​dhaus67</code></a> in <a
href="https://redirect.github.com/fergusstrange/embedded-postgres/pull/143">fergusstrange/embedded-postgres#143</a></li>
<li>fix: detect pg_ctl exists instead of bin dir by <a
href="https://github.com/wenerme"><code>@​wenerme</code></a> in <a
href="https://redirect.github.com/fergusstrange/embedded-postgres/pull/144">fergusstrange/embedded-postgres#144</a></li>
<li>fix: StartParameters on Windows by <a
href="https://github.com/hugodutka"><code>@​hugodutka</code></a> in <a
href="https://redirect.github.com/fergusstrange/embedded-postgres/pull/146">fergusstrange/embedded-postgres#146</a></li>
<li>Fix osx builds by <a
href="https://github.com/fergusstrange"><code>@​fergusstrange</code></a>
in <a
href="https://redirect.github.com/fergusstrange/embedded-postgres/pull/147">fergusstrange/embedded-postgres#147</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/dhaus67"><code>@​dhaus67</code></a> made
their first contribution in <a
href="https://redirect.github.com/fergusstrange/embedded-postgres/pull/143">fergusstrange/embedded-postgres#143</a></li>
<li><a href="https://github.com/wenerme"><code>@​wenerme</code></a> made
their first contribution in <a
href="https://redirect.github.com/fergusstrange/embedded-postgres/pull/144">fergusstrange/embedded-postgres#144</a></li>
<li><a href="https://github.com/hugodutka"><code>@​hugodutka</code></a>
made their first contribution in <a
href="https://redirect.github.com/fergusstrange/embedded-postgres/pull/146">fergusstrange/embedded-postgres#146</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/fergusstrange/embedded-postgres/compare/v1.29.0...v1.30.0">https://github.com/fergusstrange/embedded-postgres/compare/v1.29.0...v1.30.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/fergusstrange/embedded-postgres/commit/6192f2a75d261b76166d852e0e763f57d14e47fa"><code>6192f2a</code></a>
Clean up go mod files</li>
<li><a
href="https://github.com/fergusstrange/embedded-postgres/commit/24809fa067810e861262fd804135e30295f7fde8"><code>24809fa</code></a>
Fix osx builds (<a
href="https://redirect.github.com/fergusstrange/embedded-postgres/issues/147">#147</a>)</li>
<li><a
href="https://github.com/fergusstrange/embedded-postgres/commit/f5c275bdc5742cf324a86bd8bfd52655b1600800"><code>f5c275b</code></a>
fix: StartParameters on Windows (<a
href="https://redirect.github.com/fergusstrange/embedded-postgres/issues/146">#146</a>)</li>
<li><a
href="https://github.com/fergusstrange/embedded-postgres/commit/7c0ced30394508c74e955df154e4ee7c7b560b30"><code>7c0ced3</code></a>
fix: detect pg_ctl exists instead of bin dir (<a
href="https://redirect.github.com/fergusstrange/embedded-postgres/issues/144">#144</a>)</li>
<li><a
href="https://github.com/fergusstrange/embedded-postgres/commit/9ff00240d062ddfa7a26d0752381fedda09cb2de"><code>9ff0024</code></a>
fix: error types and introduce error types (<a
href="https://redirect.github.com/fergusstrange/embedded-postgres/issues/143">#143</a>)</li>
<li>See full diff in <a
href="https://github.com/fergusstrange/embedded-postgres/compare/v1.29.0...v1.30.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/fergusstrange/embedded-postgres&package-manager=go_modules&previous-version=1.29.0&new-version=1.30.0)](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>
2024-12-09 17:47:23 +05:00
Aaron Lehmann d3a563998c fix: fix broken 'Learn more' link in Listening Ports popup (#15777)
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-12-09 17:46:34 +05:00
dependabot[bot] 684c3c3b57 chore: bump google.golang.org/api from 0.209.0 to 0.210.0 (#15788)
Bumps
[google.golang.org/api](https://github.com/googleapis/google-api-go-client)
from 0.209.0 to 0.210.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/google-api-go-client/releases">google.golang.org/api's
releases</a>.</em></p>
<blockquote>
<h2>v0.210.0</h2>
<h2><a
href="https://github.com/googleapis/google-api-go-client/compare/v0.209.0...v0.210.0">0.210.0</a>
(2024-12-04)</h2>
<h3>Features</h3>
<ul>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2886">#2886</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/f446504cac24bfcb8d3266c14de2a44ed7968063">f446504</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2888">#2888</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/a990614ba53fcc403665d6003643db6bc4d03ce8">a990614</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2892">#2892</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/22e0d11172087cd646df9b9235dc9bdb8aba3044">22e0d11</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2893">#2893</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/2657039424359bca2583b00041e2c6228e4a939f">2657039</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2895">#2895</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/46fab242a8144b8887696df9a285a651315d6dd8">46fab24</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2896">#2896</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/efded92b5ef075836d41c82ddbcc71b73c6fa2e9">efded92</a>)</li>
<li>Async refresh dry run in parallel with sync refresh (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2849">#2849</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/acd258182eaf544256fba965e079b4198ad41efc">acd2581</a>)</li>
<li><strong>option/internaloption:</strong> Add AuthCreds helper (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2891">#2891</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/6ee8349e13c65c5a4f2f3caf9056d7c37e195fcf">6ee8349</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>gensupport:</strong> Context cancel error check (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2890">#2890</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/f57c82deba73faa59e85dcb1aa136de2d1a40664">f57c82d</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md">google.golang.org/api's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/googleapis/google-api-go-client/compare/v0.209.0...v0.210.0">0.210.0</a>
(2024-12-04)</h2>
<h3>Features</h3>
<ul>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2886">#2886</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/f446504cac24bfcb8d3266c14de2a44ed7968063">f446504</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2888">#2888</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/a990614ba53fcc403665d6003643db6bc4d03ce8">a990614</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2892">#2892</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/22e0d11172087cd646df9b9235dc9bdb8aba3044">22e0d11</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2893">#2893</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/2657039424359bca2583b00041e2c6228e4a939f">2657039</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2895">#2895</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/46fab242a8144b8887696df9a285a651315d6dd8">46fab24</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2896">#2896</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/efded92b5ef075836d41c82ddbcc71b73c6fa2e9">efded92</a>)</li>
<li>Async refresh dry run in parallel with sync refresh (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2849">#2849</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/acd258182eaf544256fba965e079b4198ad41efc">acd2581</a>)</li>
<li><strong>option/internaloption:</strong> Add AuthCreds helper (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2891">#2891</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/6ee8349e13c65c5a4f2f3caf9056d7c37e195fcf">6ee8349</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>gensupport:</strong> Context cancel error check (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2890">#2890</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/f57c82deba73faa59e85dcb1aa136de2d1a40664">f57c82d</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/de4bf86ee9cc0773839396de1df914108ac77d73"><code>de4bf86</code></a>
chore(main): release 0.210.0 (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2887">#2887</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/efded92b5ef075836d41c82ddbcc71b73c6fa2e9"><code>efded92</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2896">#2896</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/46fab242a8144b8887696df9a285a651315d6dd8"><code>46fab24</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2895">#2895</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/c1b41c96155bb5cb526cac34e4d69261ff403047"><code>c1b41c9</code></a>
chore(all): update all (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2889">#2889</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/acd258182eaf544256fba965e079b4198ad41efc"><code>acd2581</code></a>
feat: Async refresh dry run in parallel with sync refresh (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2849">#2849</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/2657039424359bca2583b00041e2c6228e4a939f"><code>2657039</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2893">#2893</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/22e0d11172087cd646df9b9235dc9bdb8aba3044"><code>22e0d11</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2892">#2892</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/6ee8349e13c65c5a4f2f3caf9056d7c37e195fcf"><code>6ee8349</code></a>
feat(option/internaloption): add AuthCreds helper (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2891">#2891</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/a990614ba53fcc403665d6003643db6bc4d03ce8"><code>a990614</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2888">#2888</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/f57c82deba73faa59e85dcb1aa136de2d1a40664"><code>f57c82d</code></a>
fix(gensupport): context cancel error check (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/2890">#2890</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/googleapis/google-api-go-client/compare/v0.209.0...v0.210.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/api&package-manager=go_modules&previous-version=0.209.0&new-version=0.210.0)](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>
2024-12-09 17:46:04 +05:00
dependabot[bot] 033c476302 chore: bump alpine from 3.20.3 to 3.21.0 in /scripts (#15793) 2024-12-09 22:43:27 +10:00
dependabot[bot] 943dfc7206 chore: bump github.com/aws/aws-sdk-go-v2/feature/rds/auth from 1.4.3 to 1.5.1 (#15789)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 17:33:05 +05:00
dependabot[bot] d0fcd660da chore: bump github.com/prometheus/common from 0.60.0 to 0.61.0 (#15791)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 17:32:38 +05:00
Dean Sheather 018723c6b0 chore: use cdrci2 account for CLA (#15783) 2024-12-09 22:30:41 +10:00
Phorcys 81279a9247 chore(examples/templates/azure-linux): migrate to hashicorp/cloud-init provider (#15785) 2024-12-09 16:30:32 +05:00
Muhammad Atif Ali 901ad3f0e4 ci: skip running test-e2e on PRs from forks (#15784)
Co-authored-by: Dean Sheather <dean@deansheather.com>
2024-12-09 09:50:57 +00:00
Jaayden Halko 5121f7bcbb feat: create e2e tests for IDP org sync settings page (#15767)
Idp organization sync setting is a premium feature located at
`/deployment/idp-org-sync`

This PR creates a minimal set of e2e tests.
2024-12-07 05:16:24 -05:00
Phorcys aa310e3979 chore: add template ID disclaimer (#15770)
Follow-up to #15757
2024-12-06 17:37:35 +01:00
Charlie Voiselle 9fe71d9daa feat: make username in Initialize.ps1 dynamic (#15751)
This PR switches the `UserId` from a constant to a generated values
based on the script environment. This enables users to rename their
machine and default user name without having to edit this element as
well.
2024-12-06 08:16:32 -05:00
Charlie Voiselle bae12e1f0b fix: remove backtick from valid password characters (#15756)
Since backticks are the PowerShell escape character, they are silently
consumed. To actually use backticks, they would need to be doubled when
used.

This change increases the safety of generated passwords for other
terraform modules that might use this value unawares.
2024-12-06 08:16:05 -05:00
Danielle Maywood 40624bf78b fix: update workspace TTL on template TTL change (#15761)
Relates to https://github.com/coder/coder/issues/15390

Currently when a user creates a workspace, their workspace's TTL is
determined by the template's default TTL. If the Coder instance is AGPL,
or if the template has disallowed the user from configuring autostop,
then it is not possible to change the workspace's TTL after creation.
Any changes to the template's default TTL only takes effect on _new_
workspaces.

This PR modifies the behaviour slightly so that on AGPL Coder, or on
enterprise when a template does not allow user's to configure their
workspace's TTL, updating the template's default TTL will also update
any workspace's TTL to match this value.
2024-12-06 11:01:39 +00:00
Danielle Maywood 67553a7bbe chore: fix TestWorkspaceAutobuild/NextStartAtIsValid flake (#15772)
Fixes https://github.com/coder/internal/issues/238

It appears we haven't got quartz piped through to enough of Coder for
the test to work as I had expected. Using the current time should be
sufficient for this test.
2024-12-06 10:41:31 +00:00
Phorcys 069655ace9 chore: unify template naming (#15757)
This PR changes template names and docs to follow the
`<provider>-<os/whatever>` format for all templates.
I've decided not to split this into multiple PRs because I'd have to
edit rebase the other PRs once one of them gets merged, this should be
relatively low-impact anyways.

This aligns with our goals to make templates more user-friendly.

Closes #15754
2024-12-05 22:37:25 +05:00
Jon Ayers 354d0fc4c8 fix: filter agent-exec env vars (#15764)
- Filters env vars specific to agent-exec from the exec'd process. This
is to prevent any issues when developing Coder in Coder, particularly
agent tests in the cli pkg.
2024-12-05 16:33:27 +00:00
Jon Ayers f8d938d299 fix: fix oom_score adjustments failing if caps set (#15758)
- Fixes an issue where oom scores would fail to be adjusted in cases
where the `coder` binary has capabilities set on it. This is because
`PR_SET_DUMPABLE` is set to `0` when a process is executed with elevated
capabilities. The fix is to flip `PR_SET_DUMPABLE` to `1` prior to
writing to `oom_score_adj`.
2024-12-05 15:30:58 +02:00
dependabot[bot] 0109c9fe6f ci: bump the github-actions group across 1 directory with 4 updates (#15762)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-05 13:12:07 +00:00
Ethan ca810975e7 fix: increase node max heap allocation during e2e builds (#15759)
We're already using a 16GB runner, so this should fix flakes like:
https://github.com/coder/coder/actions/runs/12172097355/job/33950290293
https://github.com/coder/coder/actions/runs/11653425091/job/32445787079

This is the same `NODE_OPTION` we already set in the dogfood dockerfile.
2024-12-05 06:03:50 +00:00
Ethan a0a5683430 chore(vpn): upsert agents with their network status (#15659)
Closes #14734.
- Each outgoing agent upsertion also includes the timestamp of the last wireguard handshake.
- Agent upsertions will be created, for existing agents, with an updated last handshake time on a regular, fixed, interval of 10 seconds.
2024-12-05 14:22:39 +11:00
Ethan ba48069325 chore: implement CoderVPN client & tunnel (#15612)
Addresses #14734.

This PR wires up `tunnel.go` to a `tailnet.Conn` via the new `/tailnet` endpoint, with all the necessary controllers such that a VPN connection can be started, stopped and inspected via the CoderVPN protocol.
2024-12-05 13:30:22 +11:00
Phorcys b5b0a0e746 fix: unify coder create and coder delete help message (#15752)
Closes #15668
2024-12-05 12:32:52 +11:00
Jon Ayers ce573b9faa fix: add agent exec abstraction (#15717) 2024-12-04 23:30:25 +02:00
Jaayden Halko 6c9ccca687 feat: implement CRUD UI for IDP organization sync settings (#15503)
resolves coder/internal#205

The goal is to create a new page located in deployment settings to allow
users to create and update organization IDP sync settings.

- [x] Use shadcn button for export policy button
- [x] Disable save button if form is not dirty
- [x] Disable "Add IdP organization" button if idp org name or coder
orgs are empty
- [x] Add footnote label below organization sync field input
- [x] Add button to Delete rows in mapping table
- [x] Create Multi-select combox box component to select coder org to
map to idp org
- [x] Storybook tests
- [x] Tooltip for assign default org switch
- [x] Display success/error toast on form submission

<img width="1181" alt="Screenshot 2024-12-02 at 20 33 07"
src="https://github.com/user-attachments/assets/86877d3b-82ec-4ed2-b239-bf8497352a9e">
2024-12-04 14:23:18 -05:00
bartekgatzcoder 3b1131ca01 fix(docs): fix a typo in extending-templates (#15744)
It's -> its
2024-12-04 10:17:39 -05:00
Hugo Dutka 75f417630b fix: persist the devtunnel file in a docker volume (#15731)
Addresses https://github.com/coder/coder/issues/15663.

This PR saves the entire coder home directory in a Docker volume to make
the dev tunnel URL persistent across container restarts.

I initially wanted to persist only the config directory, but Docker
Compose cannot set permissions on a named volume unless the directory
it’s mounted on already exists within the container. The
`/home/coder/.config` directory, however, is not created by default in
the Dockerfile. When I attempt to mount it, [Docker creates it with root
permissions](https://github.com/moby/moby/issues/2259#issue-21132999),
and Coder cannot write to it. I encounter the following error:

```
coder-1     | Started HTTP listener at http://0.0.0.0:7080
coder-1     | Opening tunnel so workspaces can connect to your deployment. For production scenarios, specify an external access URL
coder-1     | Encountered an error running "coder server", see "coder server --help" for more information
coder-1     | error: create tunnel: read or generate config: get config path: mkdirall config dir "/home/coder/.config/coderv2": mkdir /home/coder/.config/coderv2: permission denied
```

Creating the directory in the Dockerfile would resolve the issue for new
images but would break `docker-compose.yml` for all existing Coder
images. Mounting the entire home directory avoids this problem, but it
makes it less clear to admins which files need to be persisted. It’s a
trade-off - I believe keeping Docker Compose backwards-compatible is
more important, and I hope the added comment clarifies the purpose of
the volume for new users.
2024-12-04 12:21:54 +01:00
Dean Sheather 14a60303ac chore: rework RPC version negotiation (#15687)
Changes the RPC header format from `codervpn <version> <role>` to
`codervpn <role> <version1,version2,...>`.

The versions list is a list of the maximum supported minor version for
each major version, sorted by major versions.

E.g. `1.0,2.3,3.1` means `1.0, 2.0, 2.1, 2.2, 2.3, 3.0, 3.1` are
supported.

When we eventually support multiple versions, the peer's version list
will be compared against the current supported versions list to
determine the maximum major and minor version supported by both peers.

Closes #15601
2024-12-04 09:38:24 +00:00
Ethan 887ea14b6a ci: fetch annotated tags during release/build-dylib (#15738)
The release action [ran into an
issue](https://github.com/coder/coder/actions/runs/12147281426) building
the dylib today, as the version script that's run during the build job
was unable to find an annotated tag. This is a step it skips during
dry-runs.

```
ERROR: version.sh: the current commit is not tagged with an annotated tag
```

This was almost certainly caused by omitting the `git fetch --tags
--force` that's present on each other release action job, as the
workflow passes on a release dry-run when run against a regular branch,
that's not an annotated tag.

From an existing comment:
> If the event that triggered the build was an annotated tag (which our
tags are supposed to be), actions/checkout has a bug where the tag in
      question is only a lightweight tag and not a full annotated tag.
2024-12-04 19:09:40 +11:00
Stephen Kirby c8c8e50eb7 Revert "chore: release cherry-picks for 2.18.0" (#15734)
Reverts coder/coder#15719
2024-12-03 19:59:52 +00:00
Stephen Kirby 1afcd38273 chore: release cherry-picks for 2.18.0 (#15719)
- https://github.com/coder/coder/pull/15589
- https://github.com/coder/coder/pull/15683
- https://github.com/coder/coder/pull/15671

---------

Co-authored-by: Hugo Dutka <hugo@coder.com>
Co-authored-by: Sas Swart <sas.swart.cdk@gmail.com>
Co-authored-by: Spike Curtis <spike@coder.com>
Co-authored-by: Cian Johnston <cian@coder.com>
2024-12-03 13:56:03 -06:00
Cian Johnston e744cde86f fix(coderd): ensure that clearing invalid oauth refresh tokens works with dbcrypt (#15721)
https://github.com/coder/coder/pull/15608 introduced a buggy behaviour
with dbcrypt enabled.
When clearing an oauth refresh token, we had been setting the value to
the empty string.
The database encryption package considers decrypting an empty string to
be an error, as an empty encrypted string value will still have a nonce
associated with it and thus not actually be empty when stored at rest.

Instead of 'deleting' the refresh token, 'update' it to be the empty
string.
This plays nicely with dbcrypt.

It also adds a 'utility test' in the dbcrypt package to help encrypt a
value. This was useful when manually fixing users affected by this bug
on our dogfood instance.
2024-12-03 13:26:31 -06:00
Bruno Quaresma ebfc133641 fix: display build timings when all timings are loaded (#15728)
- [Refetch timings until script timings are
present](https://github.com/coder/coder/commit/2181bec72b5334e5e15dc575d2234860be02920b)
- [Stay on loading state when agent script timings are
empty](https://github.com/coder/coder/commit/b16fad165c8733c60150b0dfce5df73ab2669e36)

Fix https://github.com/coder/coder/issues/15273
2024-12-03 13:28:32 -03:00
Hugo Dutka c7c35ef4d7 chore: run macOS, windows, and race tests with Postgres in CI (#15520)
This PR is the second in a series aimed at closing
https://github.com/coder/coder/issues/15109.

## Changes

- adds `scripts/embedded-pg/main.go`, which can start a native Postgres
database. This is used to set up PG on Windows and macOS, as these
platforms don't support Docker in Github Actions.
- runs the `test-go-pg` job on macOS and Windows too
- adds the `test-go-race-go` job, which runs race tests with Postgres on
Linux
2024-12-03 13:33:17 +01:00
dependabot[bot] 066a5ad7cb chore: bump eslint-config-next from 14.2.16 to 14.2.18 in /offlinedocs (#15693) 2024-12-03 08:56:48 -03:00
Spike Curtis 682d35003a chore: upgrade yamux to 0.1.2 (#15727)
Upgrades yamux to 0.1.2, which includes a couple bug fixes.

> Significant Changes
> * Fixed a case where Streams may continue to exist and block operations even after their Session has been closed. #127 ensures when a Session closes that blocking Stream operations exit as well.
> * Allow Reads on locally closed streams. Prior to #131 calling Close() and then Read() on a Stream would fail. Close should only indicate the Stream is done writing. The peer must call Close before Read considers the stream closed. See #131 for details.
> * Tests have been improved significantly. See below for details.

https://github.com/hashicorp/yamux/releases/tag/v0.1.2
2024-12-03 15:20:44 +04:00
dependabot[bot] a2cf40b9d4 chore: bump prettier from 3.3.3 to 3.4.1 in /offlinedocs (#15694)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 13:25:38 +05:00
Spike Curtis 148a5a3593 fix: fix goroutine leak in log streaming over websocket (#15709)
fixes #14881

Our handlers for streaming logs don't read from the websocket. We don't allow the client to send us any data, but the websocket library we use requires reading from the websocket to properly handle pings and closing. Not doing so can [can cause the websocket to hang on write](https://github.com/coder/websocket/issues/405), leaking go routines which were noticed in #14881.

This fixes the issue, and in process refactors our log streaming to a encoder/decoder package which provides generic types for sending JSON over websocket.

I'd also like for us to upgrade to the latest https://github.com/coder/websocket but we should also upgrade our tailscale fork before doing so to avoid including two copies of the websocket library.
2024-12-03 10:12:30 +04:00
ケイラ e4f6c9ac15 chore: upgrade storybook (#15720) 2024-12-02 15:59:19 -07:00
Cian Johnston 0ea76637af fix(dogfood): downgrade containerd.io to work around containerd DinD issue (#15723)
ref: https://github.com/nestybox/sysbox/issues/879
2024-12-02 22:51:49 +00:00
Cian Johnston 0c541c977e chore(cli): fix test flake introduced by #15688 (#15724) 2024-12-02 22:11:42 +00:00
Danielle Maywood e21a301682 fix: make GetWorkspacesEligibleForTransition return even less false positives (#15594)
Relates to https://github.com/coder/coder/issues/15082

Further to https://github.com/coder/coder/pull/15429, this reduces the
amount of false-positives returned by the 'is eligible for autostart'
part of the query. We achieve this by calculating the 'next start at'
time of the workspace, storing it in the database, and using it in our
`GetWorkspacesEligibleForTransition` query.

The prior implementation of the 'is eligible for autostart' query would
return _all_ workspaces that at some point in the future _might_ be
eligible for autostart. This now ensures we only return workspaces that
_should_ be eligible for autostart.

We also now pass `currentTick` instead of `t` to the
`GetWorkspacesEligibleForTransition` query as otherwise we'll have one
round of workspaces that are skipped by `isEligibleForTransition` due to
`currentTick` being a truncated version of `t`.
2024-12-02 21:02:36 +00:00
Cian Johnston 2b57dcc68c feat(coderd): add matched provisioner daemons information to more places (#15688)
- Refactors `checkProvisioners` into `db2sdk.MatchedProvisioners`
- Adds a separate RBAC subject just for reading provisioner daemons
- Adds matched provisioners information to additional endpoints relating to
  workspace builds and templates
-Updates existing unit tests for above endpoints
-Adds API endpoint for matched provisioners of template dry-run job
-Updates CLI to show warning when creating/starting/stopping/deleting
 workspaces for which no provisoners are available

---------

Co-authored-by: Danny Kopping <danny@coder.com>
2024-12-02 20:54:32 +00:00
Sas Swart 7e1ac2e22b feat(site): show license utilization in general settings (#15683)
This PR is the first iteration towards #15297

We cannot yet show license utilization over time, so we show current
license utilization.
This is because we don't track user states over time. We only track the
current user state. A graph over time filtering by active users would
therefore not account for day to day changes in user state and be
inaccurate.
DB schema migrations and related updates will follow that allow us to
show license utilization over time.


![image](https://github.com/user-attachments/assets/91bd6e8c-e74c-4ef5-aa6b-271fd245da37)

---------

Co-authored-by: ケイラ <mckayla@hey.com>
2024-12-02 21:27:43 +02:00
dependabot[bot] d5d306f01d chore: bump @types/node from 20.17.6 to 20.17.9 in /offlinedocs (#15695) 2024-12-02 11:36:08 -07:00
Stephen Kirby 372d26a6b0 chore: update release calendar to correct duplicate security support version (#15718) 2024-12-02 12:06:09 -06:00
Edward Angert b06d833012 docs: improve dev containers documentation for user start-up (#15458)
- [x] TODO: verify and expand [What is an image, template, devcontainer,
or
workspace](https://coder.com/docs/@bp-dev-containers/admin#what-is-an-image-template-devcontainer-or-workspace)
- [x] TODO: verify and expand `## Add a devcontainer template to Coder`
- [x] TODO: verify and expand `## Layer and image caching`
- [x] TODO: link to and edit
[dotfiles](https://coder.com/docs/user-guides/workspace-dotfiles) doc
- [x] TODO:
https://github.com/coder/coder/pull/15458/files#diff-be0dd9ff983020129c7a94c628a0fc4a397a9bbc8b5eec92ec38f4b8c83fe167R10


[preview](https://coder.com/docs/@bp-dev-containers/admin/templates/managing-templates/devcontainers)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Cian Johnston <cian@coder.com>
Co-authored-by: Ben Potter <ben@coder.com>
Co-authored-by: Edward Angert <2408959-EdwardAngert@users.noreply.gitlab.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-12-02 09:19:04 -08:00
Cian Johnston 19ec6af2ad fix(dogfood): revert enabling process priority management for dogfood (#15713)
This reverts commit b08238c8db.
2024-12-02 13:22:10 +00:00
dependabot[bot] c47e7afae0 chore: bump prettier from 3.3.3 to 3.4.1 in /site (#15706)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-02 15:00:35 +05:00
Cian Johnston 694b4e0d3e feat(dogfood/contents): set coder_workspace_tags in dogfood template (#15653)
* Sets `coder_workspace_tags` on our dogfood template to target new tagged provisioner deployment added in coder/dogfood#103
2024-12-02 09:17:40 +00:00
Ethan abb3df7e35 fix(site): avoid constructing invalid apps url (#15711)
In Firefox, parsing a URL containing a `*` returns an error:
```
new URL("https://*--apps.sydney.fly.dev.coder.com") 
```
```
Uncaught TypeError: URL constructor: https://*--apps.sydney.fly.dev.coder.com is not a valid URL.
    <anonymous> debugger eval code:1
```

In Chrome and Node, this same URL does not produce an error.

This causes a workspace dashboard with apps to fail to load on Firefox.

![image](https://github.com/user-attachments/assets/eeea4fe5-3759-432b-b7ce-22dfad5f8218)
2024-12-02 08:45:38 +00:00
Cian Johnston 3014713c47 fix(cli): handle version mismatch re MatchedProvisioners response (#15682)
* Modifies `MatchedProvisioners` response of `codersdk.TemplateVersion`
to be a pointer
* CLI now checks for absence of `*MatchedProvisioners` before showing
warning regarding provisioners
* Extracts logic for warning about provisioners to a function
* Improves test coverage for CLI template push with
`coder_workspace_tags`.
2024-11-29 19:45:58 +00:00
Phorcys 0b4eb8bafc feat(examples/templates/gcp-devcontainer): promote module usage (#15549) 2024-11-29 18:27:46 +05:00
Phorcys 68dc820a7c feat(examples/templates/devcontainer-docker): promote module usage (#15544) 2024-11-29 18:23:36 +05:00
Sas Swart 56c792ab52 feat(site): warn on provisioner health during builds (#15589)
This PR adds warning alerts to log drawers for templates and template
versions. warning alerts for workspace builds to follow in a subsequent
PR. Phrasing to be finalised. Stories added and manually verified. See
screenshots below.

Updating a template version with no provisioners:
<img width="1250" alt="Screenshot 2024-11-27 at 11 06 28"
src="https://github.com/user-attachments/assets/47aa0940-57a8-44e1-b9a3-25a638fa2c8d">
Build Errors for template versions now show tags as well:
<img width="1250" alt="Screenshot 2024-11-27 at 11 07 01"
src="https://github.com/user-attachments/assets/566e5339-0fe1-4cf7-8eab-9bf4892ed28a">
Updating a template version with provisioners that are busy or
unresponsive:
<img width="1250" alt="Screenshot 2024-11-27 at 11 06 40"
src="https://github.com/user-attachments/assets/71977c8c-e4ed-457f-8587-2154850e7567">
Creating a new template with provisioners that are busy or unresponsive:
<img width="819" alt="Screenshot 2024-11-27 at 11 08 55"
src="https://github.com/user-attachments/assets/bda11501-b482-4046-95c5-feabcd1ad7f5">
Creating a new template when there are no provisioners to do the build:
<img width="819" alt="Screenshot 2024-11-27 at 11 08 45"
src="https://github.com/user-attachments/assets/e4279ebb-399e-4c6e-86e2-ead8f3ac7605">
2024-11-28 16:58:32 +02:00
Cian Johnston 74f7961018 chore(agent/agentexec): fix flake in agent/agentexec test (#15681)
Should hopefully fix https://github.com/coder/internal/issues/233
2024-11-28 14:28:10 +00:00
Jon Ayers a16f877c5b fix: update portforward storybook tests to include host (#15680) 2024-11-28 15:22:36 +02:00
Cian Johnston ef09b51912 fix(coderd): extract provisionerdserver.StaleInterval to 90 seconds (#15643)
Follow-up from https://github.com/coder/coder/pull/15578

Extracts `provisionerdserver.StaleInterval` and sets it to 90 seconds by
default
2024-11-28 12:57:43 +00:00
Phorcys 7a7db9f4ad feat(examples/templates/gcp-windows): add GCP region module (#15552) 2024-11-28 14:12:36 +05:00
Phorcys 56eb72236e feat(examples/templates/docker): switch code-server to a module and add jetbrains module (#15547) 2024-11-28 11:00:58 +05:00
Phorcys 946328f36e feat(examples/templates/gcp-linux): add GCP region, code-server and JetBrains Gateway modules (#15550) 2024-11-28 10:13:21 +05:00
Phorcys ba91a95f77 feat(examples/templates/gcp-vm-container): add GCP region selector, code-server and JetBrains modules (#15551) 2024-11-28 09:25:12 +05:00
Jon Ayers ffb0ebb5b6 fix: use url-parse for url construction (#15670)
This fixes some CodeQL-flagged issues. They're not real issues but the
refactor is small and it'll keep the analysis tools quiet.
2024-11-27 23:52:11 +02:00
ケイラ 40f12aeca3 chore: update group and role sync notes (#15658) 2024-11-27 14:39:03 -07:00
Jon Ayers 24d44b4518 fix: add additional context to agent exec errors (#15676) 2024-11-27 21:29:08 +02:00
Hugo Dutka b830c05e3e chore: track usage of built-in example templates (#15671)
Addresses https://github.com/coder/nexus/issues/99.

Changes:
- Save the id of the built-in example template used to create a template
version in the database
- Include the example id in telemetry
2024-11-27 20:01:08 +01:00
Jon Ayers b08238c8db chore: enable process priority management for dogfood (#15674) 2024-11-27 20:43:56 +02:00
Jon Ayers 1f238fed59 feat: integrate new agentexec pkg (#15609)
- Integrates the `agentexec` pkg into the agent and removes the
legacy system of iterating over the process tree. It adds some linting
rules to hopefully catch future improper uses of `exec.Command` in the package.
2024-11-27 20:12:15 +02:00
Jon Ayers 45d9274aca chore: disable parallelization when running security action (#15666)
- `make -j` appears to be broken for clean builds
2024-11-26 23:35:51 +02:00
Muhammad Atif Ali a9195bfe74 docs: add Amazon DCV Windows module to guides (#15610) 2024-11-26 21:41:22 +05:00
Muhammad Atif Ali 35594bb7fd chore: update testify to v1.9.0 in go.sum (#15662) 2024-11-26 12:41:20 +00:00
dependabot[bot] 84395730dc chore: bump github.com/mocktools/go-smtp-mock/v2 from 2.3.0 to 2.4.0 (#15644)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-26 16:26:59 +05:00
dependabot[bot] 0239507ee2 chore: bump github.com/gohugoio/hugo from 0.138.0 to 0.139.2 (#15646)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-26 16:26:08 +05:00
dependabot[bot] db6d345516 chore: bump github.com/coder/serpent from 0.9.0 to 0.10.0 (#15645)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-26 16:25:26 +05:00
dependabot[bot] ab8769e369 chore: bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#15648)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify)
from 1.9.0 to 1.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/stretchr/testify/releases">github.com/stretchr/testify's
releases</a>.</em></p>
<blockquote>
<h2>v1.10.0</h2>
<h2>What's Changed</h2>
<h3>Functional Changes</h3>
<ul>
<li>Add PanicAssertionFunc by <a
href="https://github.com/fahimbagar"><code>@​fahimbagar</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1337">stretchr/testify#1337</a></li>
<li>assert: deprecate CompareType by <a
href="https://github.com/dolmen"><code>@​dolmen</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1566">stretchr/testify#1566</a></li>
<li>assert: make YAML dependency pluggable via build tags by <a
href="https://github.com/dolmen"><code>@​dolmen</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1579">stretchr/testify#1579</a></li>
<li>assert: new assertion NotElementsMatch by <a
href="https://github.com/hendrywiranto"><code>@​hendrywiranto</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1600">stretchr/testify#1600</a></li>
<li>mock: in order mock calls by <a
href="https://github.com/ReyOrtiz"><code>@​ReyOrtiz</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1637">stretchr/testify#1637</a></li>
<li>Add assertion for NotErrorAs by <a
href="https://github.com/palsivertsen"><code>@​palsivertsen</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1129">stretchr/testify#1129</a></li>
<li>Record Return Arguments of a Call by <a
href="https://github.com/jayd3e"><code>@​jayd3e</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1636">stretchr/testify#1636</a></li>
<li>assert.EqualExportedValues: accepts everything by <a
href="https://github.com/redachl"><code>@​redachl</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1586">stretchr/testify#1586</a></li>
</ul>
<h3>Fixes</h3>
<ul>
<li>assert: make tHelper a type alias by <a
href="https://github.com/dolmen"><code>@​dolmen</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1562">stretchr/testify#1562</a></li>
<li>Do not get argument again unnecessarily in Arguments.Error() by <a
href="https://github.com/TomWright"><code>@​TomWright</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/820">stretchr/testify#820</a></li>
<li>Fix time.Time compare by <a
href="https://github.com/myxo"><code>@​myxo</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1582">stretchr/testify#1582</a></li>
<li>assert.Regexp: handle []byte array properly by <a
href="https://github.com/kevinburkesegment"><code>@​kevinburkesegment</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1587">stretchr/testify#1587</a></li>
<li>assert: collect.FailNow() should not panic by <a
href="https://github.com/marshall-lee"><code>@​marshall-lee</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1481">stretchr/testify#1481</a></li>
<li>mock: simplify implementation of FunctionalOptions by <a
href="https://github.com/dolmen"><code>@​dolmen</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1571">stretchr/testify#1571</a></li>
<li>mock: caller information for unexpected method call by <a
href="https://github.com/spirin"><code>@​spirin</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1644">stretchr/testify#1644</a></li>
<li>suite: fix test failures by <a
href="https://github.com/stevenh"><code>@​stevenh</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1421">stretchr/testify#1421</a></li>
<li>Fix issue <a
href="https://redirect.github.com/stretchr/testify/issues/1662">#1662</a>
(comparing infs should fail) by <a
href="https://github.com/ybrustin"><code>@​ybrustin</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1663">stretchr/testify#1663</a></li>
<li>NotSame should fail if args are not pointers <a
href="https://redirect.github.com/stretchr/testify/issues/1661">#1661</a>
by <a href="https://github.com/sikehish"><code>@​sikehish</code></a> in
<a
href="https://redirect.github.com/stretchr/testify/pull/1664">stretchr/testify#1664</a></li>
<li>Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in
CI by <a href="https://github.com/sikehish"><code>@​sikehish</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1667">stretchr/testify#1667</a></li>
<li>fix: compare functional option names for indirect calls by <a
href="https://github.com/arjun-1"><code>@​arjun-1</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1626">stretchr/testify#1626</a></li>
</ul>
<h3>Documantation, Build &amp; CI</h3>
<ul>
<li>.gitignore: ignore &quot;go test -c&quot; binaries by <a
href="https://github.com/dolmen"><code>@​dolmen</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1565">stretchr/testify#1565</a></li>
<li>mock: improve doc by <a
href="https://github.com/dolmen"><code>@​dolmen</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1570">stretchr/testify#1570</a></li>
<li>mock: fix FunctionalOptions docs by <a
href="https://github.com/snirye"><code>@​snirye</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1433">stretchr/testify#1433</a></li>
<li>README: link out to the excellent testifylint by <a
href="https://github.com/brackendawson"><code>@​brackendawson</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1568">stretchr/testify#1568</a></li>
<li>assert: fix typo in comment by <a
href="https://github.com/JohnEndson"><code>@​JohnEndson</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1580">stretchr/testify#1580</a></li>
<li>Correct the EventuallyWithT and EventuallyWithTf example by <a
href="https://github.com/JonCrowther"><code>@​JonCrowther</code></a> in
<a
href="https://redirect.github.com/stretchr/testify/pull/1588">stretchr/testify#1588</a></li>
<li>CI: bump softprops/action-gh-release from 1 to 2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1575">stretchr/testify#1575</a></li>
<li>mock: document more alternatives to deprecated
AnythingOfTypeArgument by <a
href="https://github.com/dolmen"><code>@​dolmen</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1569">stretchr/testify#1569</a></li>
<li>assert: Correctly document EqualValues behavior by <a
href="https://github.com/brackendawson"><code>@​brackendawson</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1593">stretchr/testify#1593</a></li>
<li>fix: grammar in godoc by <a
href="https://github.com/miparnisari"><code>@​miparnisari</code></a> in
<a
href="https://redirect.github.com/stretchr/testify/pull/1607">stretchr/testify#1607</a></li>
<li>.github/workflows: Run tests for Go 1.22 by <a
href="https://github.com/HaraldNordgren"><code>@​HaraldNordgren</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1629">stretchr/testify#1629</a></li>
<li>Document suite's lack of support for t.Parallel by <a
href="https://github.com/brackendawson"><code>@​brackendawson</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1645">stretchr/testify#1645</a></li>
<li>assert: fix typos in comments by <a
href="https://github.com/alexandear"><code>@​alexandear</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1650">stretchr/testify#1650</a></li>
<li>mock: fix doc comment for NotBefore by <a
href="https://github.com/alexandear"><code>@​alexandear</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1651">stretchr/testify#1651</a></li>
<li>Generate better comments for require package by <a
href="https://github.com/Neokil"><code>@​Neokil</code></a> in <a
href="https://redirect.github.com/stretchr/testify/pull/1610">stretchr/testify#1610</a></li>
<li>README: replace Testify V2 notice with <a
href="https://github.com/dolmen"><code>@​dolmen</code></a>'s V2
manifesto by <a
href="https://github.com/hendrywiranto"><code>@​hendrywiranto</code></a>
in <a
href="https://redirect.github.com/stretchr/testify/pull/1518">stretchr/testify#1518</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/fahimbagar"><code>@​fahimbagar</code></a> made
their first contribution in <a
href="https://redirect.github.com/stretchr/testify/pull/1337">stretchr/testify#1337</a></li>
<li><a href="https://github.com/TomWright"><code>@​TomWright</code></a>
made their first contribution in <a
href="https://redirect.github.com/stretchr/testify/pull/820">stretchr/testify#820</a></li>
<li><a href="https://github.com/snirye"><code>@​snirye</code></a> made
their first contribution in <a
href="https://redirect.github.com/stretchr/testify/pull/1433">stretchr/testify#1433</a></li>
<li><a href="https://github.com/myxo"><code>@​myxo</code></a> made their
first contribution in <a
href="https://redirect.github.com/stretchr/testify/pull/1582">stretchr/testify#1582</a></li>
<li><a
href="https://github.com/JohnEndson"><code>@​JohnEndson</code></a> made
their first contribution in <a
href="https://redirect.github.com/stretchr/testify/pull/1580">stretchr/testify#1580</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/stretchr/testify/commit/89cbdd9e7b39eb58896d316a7495597d3aba4371"><code>89cbdd9</code></a>
Merge pull request <a
href="https://redirect.github.com/stretchr/testify/issues/1626">#1626</a>
from arjun-1/fix-functional-options-diff-indirect-calls</li>
<li><a
href="https://github.com/stretchr/testify/commit/07bac606be2191ae89a281195e58d01e0de7b5f8"><code>07bac60</code></a>
Merge pull request <a
href="https://redirect.github.com/stretchr/testify/issues/1667">#1667</a>
from sikehish/flaky</li>
<li><a
href="https://github.com/stretchr/testify/commit/716de8dff46ed7ae3c6ebb7a6124db741ba7c018"><code>716de8d</code></a>
Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in
CI</li>
<li><a
href="https://github.com/stretchr/testify/commit/118fb8346630c192421c8914848381af9d4412a7"><code>118fb83</code></a>
NotSame should fail if args are not pointers <a
href="https://redirect.github.com/stretchr/testify/issues/1661">#1661</a>
(<a
href="https://redirect.github.com/stretchr/testify/issues/1664">#1664</a>)</li>
<li><a
href="https://github.com/stretchr/testify/commit/7d99b2b43d8f60a8982a78cde6e8bd287dea5da0"><code>7d99b2b</code></a>
attempt 2</li>
<li><a
href="https://github.com/stretchr/testify/commit/05f87c016035811e6d8371f1887ec360c318f53f"><code>05f87c0</code></a>
more similar</li>
<li><a
href="https://github.com/stretchr/testify/commit/ea7129e00694592e20cb34c58a6b8a251418b9da"><code>ea7129e</code></a>
better fmt</li>
<li><a
href="https://github.com/stretchr/testify/commit/a1b9c9efe3c25c50678b1e492045164b914e255f"><code>a1b9c9e</code></a>
Merge pull request <a
href="https://redirect.github.com/stretchr/testify/issues/1663">#1663</a>
from ybrustin/master</li>
<li><a
href="https://github.com/stretchr/testify/commit/8302de98b17649445fc1f1992fc3fecdb40c59ba"><code>8302de9</code></a>
Merge branch 'master' into master</li>
<li><a
href="https://github.com/stretchr/testify/commit/89352f7958086841c72425ccd6f43ab299e1309c"><code>89352f7</code></a>
Merge pull request <a
href="https://redirect.github.com/stretchr/testify/issues/1518">#1518</a>
from hendrywiranto/adjust-readme-remove-v2</li>
<li>Additional commits viewable in <a
href="https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.9.0&new-version=1.10.0)](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>
2024-11-26 16:24:27 +05:00
dependabot[bot] 9e78aaeea3 ci: bump the github-actions group with 3 updates (#15649)
Bumps the github-actions group with 3 updates:
[step-security/harden-runner](https://github.com/step-security/harden-runner),
[github/codeql-action](https://github.com/github/codeql-action) and
[aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action).

Updates `step-security/harden-runner` from 2.10.1 to 2.10.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/step-security/harden-runner/releases">step-security/harden-runner's
releases</a>.</em></p>
<blockquote>
<h2>v2.10.2</h2>
<h2>What's Changed</h2>
<ol>
<li>
<p>Fixes low-severity command injection weaknesses
The advisory is here: <a
href="https://github.com/step-security/harden-runner/security/advisories/GHSA-g85v-wf27-67xc">https://github.com/step-security/harden-runner/security/advisories/GHSA-g85v-wf27-67xc</a></p>
</li>
<li>
<p>Bug fix to improve detection of whether Harden-Runner is running in a
container</p>
</li>
</ol>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/step-security/harden-runner/compare/v2...v2.10.2">https://github.com/step-security/harden-runner/compare/v2...v2.10.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/step-security/harden-runner/commit/0080882f6c36860b6ba35c610c98ce87d4e2f26f"><code>0080882</code></a>
Merge pull request <a
href="https://redirect.github.com/step-security/harden-runner/issues/476">#476</a>
from step-security/rc-16</li>
<li><a
href="https://github.com/step-security/harden-runner/commit/4a3a88bbf8f2e304f84e1042472c02dce37eba82"><code>4a3a88b</code></a>
Update dist</li>
<li><a
href="https://github.com/step-security/harden-runner/commit/556aae632a6c1f630efa52e90d706218618e5f2f"><code>556aae6</code></a>
Merge pull request <a
href="https://redirect.github.com/step-security/harden-runner/issues/480">#480</a>
from h0x0er/jatin/cleanup</li>
<li><a
href="https://github.com/step-security/harden-runner/commit/6c39b8466160e86ad8606033d399fe7f4052aee1"><code>6c39b84</code></a>
chore: clean the code</li>
<li><a
href="https://github.com/step-security/harden-runner/commit/40401cf6183a0ab2dae5c7e485c1d073fe911e91"><code>40401cf</code></a>
Update for isdocker</li>
<li><a
href="https://github.com/step-security/harden-runner/commit/806ab1cccb47a439a89d5f8f85d3ea41a7fb1e4c"><code>806ab1c</code></a>
Update check for isdocker</li>
<li><a
href="https://github.com/step-security/harden-runner/commit/28468118cdb665b2214b64175253b83fcb4b25f6"><code>2846811</code></a>
update dist</li>
<li><a
href="https://github.com/step-security/harden-runner/commit/df8a07c1712fac199e8d6e78d64a46092afffa44"><code>df8a07c</code></a>
Merge pull request <a
href="https://redirect.github.com/step-security/harden-runner/issues/475">#475</a>
from h0x0er/fix-execSync</li>
<li><a
href="https://github.com/step-security/harden-runner/commit/30636fb583e59a926da2f17677e5cd3b63cf1be1"><code>30636fb</code></a>
bug fixes</li>
<li>See full diff in <a
href="https://github.com/step-security/harden-runner/compare/91182cccc01eb5e619899d80e4e971d6181294a7...0080882f6c36860b6ba35c610c98ce87d4e2f26f">compare
view</a></li>
</ul>
</details>
<br />

Updates `github/codeql-action` from 3.27.4 to 3.27.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.27.5</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<p>Note that the only difference between <code>v2</code> and
<code>v3</code> of the CodeQL Action is the node version they support,
with <code>v3</code> running on node 20 while we continue to release
<code>v2</code> to support running on node 16. For example
<code>3.22.11</code> was the first <code>v3</code> release and is
functionally identical to <code>2.22.11</code>. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.</p>
<h2>3.27.5 - 19 Nov 2024</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v3.27.5/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<p>Note that the only difference between <code>v2</code> and
<code>v3</code> of the CodeQL Action is the node version they support,
with <code>v3</code> running on node 20 while we continue to release
<code>v2</code> to support running on node 16. For example
<code>3.22.11</code> was the first <code>v3</code> release and is
functionally identical to <code>2.22.11</code>. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.</p>
<h2>[UNRELEASED]</h2>
<p>No user facing changes.</p>
<h2>3.27.5 - 19 Nov 2024</h2>
<p>No user facing changes.</p>
<h2>3.27.4 - 14 Nov 2024</h2>
<p>No user facing changes.</p>
<h2>3.27.3 - 12 Nov 2024</h2>
<p>No user facing changes.</p>
<h2>3.27.2 - 12 Nov 2024</h2>
<ul>
<li>Fixed an issue where setting up the CodeQL tools would sometimes
fail with the message &quot;Invalid value 'undefined' for header
'authorization'&quot;. <a
href="https://redirect.github.com/github/codeql-action/pull/2590">#2590</a></li>
</ul>
<h2>3.27.1 - 08 Nov 2024</h2>
<ul>
<li>The CodeQL Action now downloads bundles compressed using Zstandard
on GitHub Enterprise Server when using Linux or macOS runners. This
speeds up the installation of the CodeQL tools. This feature is already
available to GitHub.com users. <a
href="https://redirect.github.com/github/codeql-action/pull/2573">#2573</a></li>
<li>Update default CodeQL bundle version to 2.19.3. <a
href="https://redirect.github.com/github/codeql-action/pull/2576">#2576</a></li>
</ul>
<h2>3.27.0 - 22 Oct 2024</h2>
<ul>
<li>Bump the minimum CodeQL bundle version to 2.14.6. <a
href="https://redirect.github.com/github/codeql-action/pull/2549">#2549</a></li>
<li>Fix an issue where the <code>upload-sarif</code> Action would fail
with &quot;upload-sarif post-action step failed: Input required and not
supplied: token&quot; when called in a composite Action that had a
different set of inputs to the ones expected by the
<code>upload-sarif</code> Action. <a
href="https://redirect.github.com/github/codeql-action/pull/2557">#2557</a></li>
<li>Update default CodeQL bundle version to 2.19.2. <a
href="https://redirect.github.com/github/codeql-action/pull/2552">#2552</a></li>
</ul>
<h2>3.26.13 - 14 Oct 2024</h2>
<p>No user facing changes.</p>
<h2>3.26.12 - 07 Oct 2024</h2>
<ul>
<li>
<p><em>Upcoming breaking change</em>: Add a deprecation warning for
customers using CodeQL version 2.14.5 and earlier. These versions of
CodeQL were discontinued on 24 September 2024 alongside GitHub
Enterprise Server 3.10, and will be unsupported by CodeQL Action
versions 3.27.0 and later and versions 2.27.0 and later. <a
href="https://redirect.github.com/github/codeql-action/pull/2520">#2520</a></p>
<ul>
<li>
<p>If you are using one of these versions, please update to CodeQL CLI
version 2.14.6 or later. For instance, if you have specified a custom
version of the CLI using the 'tools' input to the 'init' Action, you can
remove this input to use the default version.</p>
</li>
<li>
<p>Alternatively, if you want to continue using a version of the CodeQL
CLI between 2.13.5 and 2.14.5, you can replace
<code>github/codeql-action/*@v3</code> by
<code>github/codeql-action/*@v3.26.11</code> and
<code>github/codeql-action/*@v2</code> by
<code>github/codeql-action/*@v2.26.11</code> in your code scanning
workflow to ensure you continue using this version of the CodeQL
Action.</p>
</li>
</ul>
</li>
</ul>
<h2>3.26.11 - 03 Oct 2024</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/github/codeql-action/commit/f09c1c0a94de965c15400f5634aa42fac8fb8f88"><code>f09c1c0</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2616">#2616</a>
from github/update-v3.27.5-a6c8729a5</li>
<li><a
href="https://github.com/github/codeql-action/commit/67b73eaba559c7e6913377065b0362ccbfc94e87"><code>67b73ea</code></a>
Update changelog for v3.27.5</li>
<li><a
href="https://github.com/github/codeql-action/commit/a6c8729a5d7573eb8d440e52a9645ce4db61d97c"><code>a6c8729</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2614">#2614</a>
from github/marcogario/per-platform-proxy</li>
<li><a
href="https://github.com/github/codeql-action/commit/8f3b48727ff1b076c28967a258b95fcee30a3a48"><code>8f3b487</code></a>
Start-proxy: Fetch OS specific binary</li>
<li><a
href="https://github.com/github/codeql-action/commit/cba5fb58d4f85affaf03eb9da32f5b6c9d76838b"><code>cba5fb5</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2613">#2613</a>
from github/dependabot/npm_and_yarn/npm_and_yarn-018...</li>
<li><a
href="https://github.com/github/codeql-action/commit/e782c3a145d9946aba8fa390e406acbe4e4c05c5"><code>e782c3a</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2612">#2612</a>
from github/angelapwen/report-linux-runner-release</li>
<li><a
href="https://github.com/github/codeql-action/commit/db6788195b646f87b3d1c616b0c14a6d5b7fa9a6"><code>db67881</code></a>
Update checked-in dependencies</li>
<li><a
href="https://github.com/github/codeql-action/commit/ecde4d232d18cf2dba6c1a6b76810332abff736f"><code>ecde4d2</code></a>
Bump cross-spawn from 7.0.3 to 7.0.6 in the npm_and_yarn group</li>
<li><a
href="https://github.com/github/codeql-action/commit/e3c67a01d31d9c173ba5ffccc9d0f275540d99de"><code>e3c67a0</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/2610">#2610</a>
from github/dependabot/npm_and_yarn/npm-d2ca52e617</li>
<li><a
href="https://github.com/github/codeql-action/commit/f9ada54538b47b6db28c4d11f53848689968909e"><code>f9ada54</code></a>
Telemetry: report OS release for GitHub-hosted Linux runners</li>
<li>Additional commits viewable in <a
href="https://github.com/github/codeql-action/compare/ea9e4e37992a54ee68a9622e985e60c8e8f12d9f...f09c1c0a94de965c15400f5634aa42fac8fb8f88">compare
view</a></li>
</ul>
</details>
<br />

Updates `aquasecurity/trivy-action` from 0.28.0 to 0.29.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aquasecurity/trivy-action/releases">aquasecurity/trivy-action's
releases</a>.</em></p>
<blockquote>
<h2>v0.29.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: Allow skipping setup by <a
href="https://github.com/rvesse"><code>@​rvesse</code></a> in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/414">aquasecurity/trivy-action#414</a></li>
<li>Fix oras command not found in &quot;Update Trivy Cache&quot; action
by <a href="https://github.com/Tiryoh"><code>@​Tiryoh</code></a> in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/413">aquasecurity/trivy-action#413</a></li>
<li>Update README.md by <a
href="https://github.com/simar7"><code>@​simar7</code></a> in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/420">aquasecurity/trivy-action#420</a></li>
<li>feat: add token for <code>setup-trivy</code> by <a
href="https://github.com/DmitriyLewen"><code>@​DmitriyLewen</code></a>
in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/421">aquasecurity/trivy-action#421</a></li>
<li>fix: bump <code>setup-trivy</code> and add new <code>contrib</code>
directory path info by <a
href="https://github.com/DmitriyLewen"><code>@​DmitriyLewen</code></a>
in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/424">aquasecurity/trivy-action#424</a></li>
<li>docs: remove ignore-unfixed from IaC scan example by <a
href="https://github.com/nikpivkin"><code>@​nikpivkin</code></a> in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/429">aquasecurity/trivy-action#429</a></li>
<li>chore(deps): Bump trivy to v0.57.1 by <a
href="https://github.com/simar7"><code>@​simar7</code></a> in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/434">aquasecurity/trivy-action#434</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/rvesse"><code>@​rvesse</code></a> made
their first contribution in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/414">aquasecurity/trivy-action#414</a></li>
<li><a href="https://github.com/Tiryoh"><code>@​Tiryoh</code></a> made
their first contribution in <a
href="https://redirect.github.com/aquasecurity/trivy-action/pull/413">aquasecurity/trivy-action#413</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/aquasecurity/trivy-action/compare/0.28.0...0.29.0">https://github.com/aquasecurity/trivy-action/compare/0.28.0...0.29.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/aquasecurity/trivy-action/commit/18f2510ee396bbf400402947b394f2dd8c87dbb0"><code>18f2510</code></a>
chore(deps): Bump trivy to v0.57.1 (<a
href="https://redirect.github.com/aquasecurity/trivy-action/issues/434">#434</a>)</li>
<li><a
href="https://github.com/aquasecurity/trivy-action/commit/93941cebba762da4c91a91883859bf1bfb221c73"><code>93941ce</code></a>
docs: remove ignore-unfixed from IaC scan example (<a
href="https://redirect.github.com/aquasecurity/trivy-action/issues/429">#429</a>)</li>
<li><a
href="https://github.com/aquasecurity/trivy-action/commit/d2a392a13760cb64cb6bbd31d4bed2a7d9a5298d"><code>d2a392a</code></a>
fix: bump <code>setup-trivy</code> and add new <code>contrib</code>
directory path info (<a
href="https://redirect.github.com/aquasecurity/trivy-action/issues/424">#424</a>)</li>
<li><a
href="https://github.com/aquasecurity/trivy-action/commit/ee8934673cc18947baf4b05c01c4100ff36648da"><code>ee89346</code></a>
feat: add token for <code>setup-trivy</code> (<a
href="https://redirect.github.com/aquasecurity/trivy-action/issues/421">#421</a>)</li>
<li><a
href="https://github.com/aquasecurity/trivy-action/commit/cf990b19d84bbbe1eb8833659989a7c1029132e3"><code>cf990b1</code></a>
Update README.md (<a
href="https://redirect.github.com/aquasecurity/trivy-action/issues/420">#420</a>)</li>
<li><a
href="https://github.com/aquasecurity/trivy-action/commit/bff40be51b9207cf8f2148d628a9836cc7370247"><code>bff40be</code></a>
docs: Fix oras command not found (<a
href="https://redirect.github.com/aquasecurity/trivy-action/issues/413">#413</a>)</li>
<li><a
href="https://github.com/aquasecurity/trivy-action/commit/fc1500abdcdc9fc681e98d8912a52fa70dbc67de"><code>fc1500a</code></a>
feat: Allow skipping setup (<a
href="https://redirect.github.com/aquasecurity/trivy-action/issues/414">#414</a>)</li>
<li>See full diff in <a
href="https://github.com/aquasecurity/trivy-action/compare/915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2...18f2510ee396bbf400402947b394f2dd8c87dbb0">compare
view</a></li>
</ul>
</details>
<br />


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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-26 16:24:10 +05:00
Hugo Dutka 83c493e832 chore: fix more flaky tests on Windows with Postgres (#15629)
Addresses the following flakes:

- https://github.com/coder/internal/issues/222
- https://github.com/coder/internal/issues/223
- https://github.com/coder/internal/issues/224
- https://github.com/coder/internal/issues/225
- https://github.com/coder/internal/issues/226
- https://github.com/coder/internal/issues/227
- https://github.com/coder/internal/issues/228
- https://github.com/coder/internal/issues/229
- https://github.com/coder/internal/issues/230
2024-11-26 11:56:07 +01:00
Dean Sheather 06c99793f4 chore: add csharp_namespace to vpn.proto (#15634) 2024-11-26 19:58:18 +10:00
Vincent Vielle 8afb10e090 chore: improve validation of Security tag in swaggerparser (#15660)
Aims to resolve #15605 

There's currently one option valid for the `@Security` tag in
swaggerparser - which fails in the CI if we try to put any other value.

At least one of our endpoints does not accept `CoderSessionToken` as an
option for the authentication and so we need to add new possibilities in
order to keep the documentation up-to-date.

In this PR , I added `ProvisionerKey` which is the way our provisioner
daemon can authenticate to the backend - also modified a bit the code to
simplify other options later.
2024-11-26 07:19:43 +01:00
Vincent Vielle 60ddcf5de2 chore: improve testing coverage on ExtractProvisionerDaemonAuthenticated middleware (#15622)
This one aims to resolve #15604 

Created some table tests for the main cases - 
also preferred to create two isolated cases for the most complicated
cases in order to keep table tests simple enough.

Give us full coverage on the middleware logic, for both optional and non
optional cases - PSK and ProvisionerKey.
2024-11-26 04:02:20 +01:00
Eric Paulsen d60b58874e fix: update /builds transition example (#15657) 2024-11-26 00:52:23 +00:00
Cian Johnston e550365e35 chore(docs): update documentation for coder_workspace_tags (#15620)
Adds documentation relating to
https://github.com/coder/coder/issues/15087 and
https://github.com/coder/coder/issues/15427

See also: https://github.com/coder/coder/pull/15578
2024-11-25 21:01:18 +00:00
Danielle Maywood 0896f339c4 refactor(coderd/provisionerdserver): use quartz.Clock instead of TimeNowFn (#15642)
Replace `TimeNowFn` in `provisionerdserver` with `quartz.Clock` as
well as pass `coderd`'s `Clock` to `provisionerdserver`.
2024-11-25 16:25:36 +00:00
Jon Ayers bbc549d2df feat: add agent exec pkg (#15577) 2024-11-25 17:22:12 +02:00
Cian Johnston 7876dc5fb1 feat(helm/provisioner): support deploying multiple provisioners in same namespace (#15637)
Fixes https://github.com/coder/coder/issues/15437

- Adds support for `coder.serviceAccount.disableCreate` (originally
added to `helm/coder` in https://github.com/coder/coder/pull/14817).
- Adds documentation and examples in `helm/provisioner/README.md` on
deploying multiple provisioners in the same namespace leveraging
`nameOverride`.
2024-11-25 14:23:37 +00:00
Spike Curtis e6506f0679 feat: change port-forward to opportunistically listen on IPv6 (#15640)
If the local IP address is not explicitly set, previously we assumed 127.0.0.1 (that is, IPv4 only localhost). This PR adds support to opportunistically _also_ listen on IPv6 ::1.
2024-11-25 16:33:28 +04:00
Cian Johnston 1cdc3e8921 feat!: extract provisioner tags from coder_workspace_tags data source (#15578)
Relates to https://github.com/coder/coder/issues/15087 and
https://github.com/coder/coder/issues/15427

- Extracts provisioner job tags from `coder_workspace_tags` on template
version creation using `provisioner/terraform/tfparse` added in
https://github.com/coder/coder/pull/15236
- Drops a WARN log in coderd if no matching provisioners found.
- Also drops a warning message in the CLI if no provisioners are found.
- To support both CLI and UI warnings, added a
`codersdk.MatchedProvisioners` struct to the `TemplateVersion` response
containing details of how many provisioners were around at the time of
the insert.

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2024-11-25 11:19:14 +00:00
Spike Curtis 648cdd006c fix: fix parsing of IPv6 addresses in coder port-forward (#15627)
fixes: #15561

Fixes parsing of IPv6 local addresses on `coder port-forward`
2024-11-25 14:06:59 +04:00
Vincent Vielle a8becfb7a4 fix: improve log on provisioner daemon started with pk (#15588)
Resolve #15126 

This PR aims to fetch the provisioned key details when starting a
provisioned daemon - for now in order to access the tags associated to
the provisioned key and display them accordingly in the starting logs.

We do not want to change any other logic inside this PR as it was
already working as expected.
2024-11-25 10:11:27 +01:00
Kayla Washburn-Love 32b4b77c45 fix: use ExternalImage for external auth providers (#15572) 2024-11-22 15:24:18 -07:00
Bruno Quaresma f3e1dd8d1c fix: deduplicate agent script timings (#15631)
Related to https://github.com/coder/coder/issues/15413
2024-11-22 14:29:31 -03:00
Toshiki Shimomura e87b0bb455 fix(site): set min and max attributes for workspace number parameters (#15182)
Implements #14532.

This PR sets `min` and `max` attributes for workspace number parameter
`<input>` elements using
[inputProps](https://mui.com/material-ui/api/text-field/#text-field-prop-inputProps).

Note: When we update MUI to v6 or later, it is better to use
`slotProps.htmlInput` instead.

---------

Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-11-22 09:50:22 -06:00
dependabot[bot] e3cc3be718 chore: bump google.golang.org/api from 0.205.0 to 0.209.0 (#15628)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-22 18:58:12 +05:00
Ethan 45f7d77d6f fix(site): remove hard-coded activity bump label (#15583)
Closes #15536.

The setting description is already dynamically set correctly, and I
don't believe it warrants repeating.


![image](https://github.com/user-attachments/assets/467b2ef3-468a-4634-819f-98f36c86b5ab)
2024-11-22 23:48:23 +11:00
dependabot[bot] e3082f1bdc chore: bump cross-spawn from 6.0.5 to 6.0.6 in /scripts/apidocgen (#15599)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-22 17:46:44 +05:00
Ethan a35c01de54 fix(site): show error on template upload failure (#15558)
Closes #15441.
2024-11-22 23:46:21 +11:00
Spike Curtis b5fbfd727c fix: fix hang in teardown of TestConn_CoordinatorRollingRestart (#15624)
fixes a flake seen on main: https://github.com/coder/coder/actions/runs/11967210463/job/33364072261

the TCP echo server had a waitgroup to ensure that all accepted connections get torn down, but no explicit teardown of the connection. We depended on the tailnet agent closing its side of the connection, which depends on closing the tunneled connection. The tunneled `FIN` could race with tearing down the tunnel itself.

So, this PR adds explicit `t.Cleanup` to close the echo connection. It also removes the waitgroup. The purpose of the waitgroup was to ensure that all goroutines created by the echo listener get shut down, but we have `goleak` for that, which fails much faster than the 20 minutes this test run took.
2024-11-22 11:44:56 +04:00
Spike Curtis 103824f726 fix: fix panic while tearing down reconnecting PTY (#15615)
fixes https://github.com/coder/internal/issues/221

Fixes an issue where two goroutines were sharing the `err` variable, leading to a data race where we'd fail to process the error and then nil-pointer panic.

I ended up refactoring reconnecting PTY stuff into the `reconnectingpty` package, instead of having it on the agent.  That `createTailnet` routine had waaay too many deeply nested goroutines, which is I'm sure a big contributor to the bug appearing in the first place.
2024-11-22 09:46:25 +04:00
Edward Angert 684e75e2a7 docs: create a markdown code snippet file to make it easier for contributors (#15611)
adds snippets to make some of the docs markdown components a little
easier to use

- wraps selected text where it seems appropriate
- limits code block languages (these are suggestions, you can choose
from the list or enter anything)

tabs example:

![tabs
gif](https://github.com/user-attachments/assets/226b942e-4b34-4d3b-8561-84c5a17e2805)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-21 22:09:56 +00:00
Steven Masley 26438aa91f chore: implement OIDCClaimFieldValues for idp sync mappings auto complete (#15576)
When creating IDP sync mappings, these are the values that can be
selected from. These are the values that can be mapped from in
org/group/role sync.
2024-11-21 13:04:00 -06:00
Steven Masley 5b7fa78676 chore: add deployment config option to append custom csp directives (#15596)
Allows adding custom static CSP directives to Coder. Niche use case but
makes this easier then creating a reverse proxy that has to replace the
header. We want to preserve our directives, so having an append option
is preferred to a "replace" option via a reverse proxy.


Closes https://github.com/coder/coder/issues/15118
2024-11-21 11:53:53 -06:00
Danny Kopping f38f746f5d chore: ensure coder is logged before querying orgs (#15618) 2024-11-21 16:04:21 +01:00
Steven Masley 78f9f43c97 chore: do not refresh tokens that have already failed refreshing (#15608)
Once a token refresh fails, we remove the `oauth_refresh_token` from the
database. This will prevent the token from hitting the IDP for
subsequent refresh attempts.

Without this change, a bad script can cause a failing token to hit a
remote IDP repeatedly with each `git` operation. With this change, after
the first hit, subsequent hits will fail locally, and never contact the
IDP.

The solution in both cases is to authenticate the external auth link. So
the resolution is the same as before.
2024-11-20 20:13:07 -06:00
Muhammad Atif Ali dcbcf6740c docs: add guide for CI/CD template testing (#15528)
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2024-11-20 23:58:51 +05:00
Vincent Vielle a518017a88 feat(coderd): add endpoint to fetch provisioner key details (#15505)
This PR is the first step aiming to resolve #15126 - 

Creating a new endpoint to return the details associated to a
provisioner key.

This is an authenticated endpoints aiming to be used by the provisioner
daemons - using the provisioner key as authentication method.

This endpoint is not ment to be used with PSK or User Sessions.
2024-11-20 18:04:47 +01:00
Cian Johnston 593d659ec8 chore(scripts/develop.sh): auto determine first org name and run terraform init (#15603)
Updates `develop.sh` to automatically determine the name of the 'first
org' when pushing the initial template.

Also runs `terraform init` before running `coder templates push` (pet
peeve).
2024-11-20 14:01:13 +00:00
Hugo Dutka 6ed76921dd chore: fix windows postgres tests (#15593)
Patches tests that caused Windows Postgres CI in
https://github.com/coder/coder/pull/15520 to consistently fail.

I tested this by temporarily adding Postgres Windows CI to this PR.
However, I reverted those changes to merge them with
https://github.com/coder/coder/pull/15520. For reference, here's [a
passing CI
run](https://github.com/coder/coder/actions/runs/11918816662/job/33219786238)
from an earlier commit.

**Note:** Although Windows tests now pass, they remain quite flaky. I
recommend running Postgres Windows CI to gather data on these flakes,
but I don’t think it should be a required job just yet.
2024-11-20 13:30:31 +01:00
Hugo Dutka 97ce44a77d chore: track terraform module source type in telemetry (#15590) 2024-11-20 11:03:48 +01:00
Dean Sheather fbe2fa66f5 chore: add test for coord rolling restart (#14680)
Closes https://github.com/coder/team-coconut/issues/50

---------

Co-authored-by: Ethan Dickson <ethan@coder.com>
2024-11-20 18:04:33 +11:00
Spike Curtis 9e63caf593 docs: add crypto_keys to list of dbcrypt fields (#15602)
closes: https://github.com/coder/internal/issues/220

Updates docs that talk about what db fields we encrypt.  We've recently added `crypto_keys.secret` to the list, but didn't add it to the docs.
2024-11-20 11:03:46 +04:00
Ethan 6e7f65bc59 fix(cli): properly handle build log streaming during coder ping (#15600)
Closes #15584.

- The `Collecting Diagnostics` spinner now starts after the workspace
build logs (if any) have finished streaming.
- Removes network interfaces with negative MTUs from `healthsdk`
diagnostics.
- Improves the wording on diagnostics for MTUs below the 'safe' value to
indicate that direct connections may be degraded, or rendered unusable
(i.e. if every packet is dropped).
2024-11-20 15:50:12 +11:00
Ethan 32fc844b47 chore: support building Coder Desktop .dylib (#15512)
Relates to #14734.
2024-11-20 14:13:03 +11:00
Danielle Maywood 576e1f48fe feat!: allow disabling notifications (#15509)
Resolves https://github.com/coder/coder/issues/15513

Disables notifications when both `$CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT` and `$CODER_EMAIL_SMARTHOST` are unset.

Breaking change: `$CODER_EMAIL_SMARTHOST` is no longer set by default as `localhost:587`, meaning any deployments that make use of this default value will need to add it back.

---------

Co-authored-by: Danny Kopping <danny@coder.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2024-11-19 15:05:12 +00:00
Ethan 1c08580f23 chore(cli): use option source name for deprecation warnings (#15581)
Closes #15568.
2024-11-19 10:15:38 +00:00
Ethan e72d58b4f6 fix: guard server log lumberjack with mutex (#15582)
(Hopefully) closes https://github.com/coder/internal/issues/213.
2024-11-19 19:47:35 +11:00
Spike Curtis 029cd5d064 fix(tailnet): prevent redial after Coord graceful restart (#15586)
fixes: https://github.com/coder/internal/issues/217

> There are a couple problems:
>
> One is that we assert the RPCs succeed, but if the pipeDialer context is canceled at the end of the test, then these assertions happen after the test is officially complete, which panics and affects other tests.

This converts these to just return the error rather than assert.

> The other is that the retrier is slightly bugged: if the current retry delay is 0 AND the ctx is done, (e.g. after successfully connecting and then gracefully disconnecting), then retrier.Wait(c.ctx) is racy and could return either true or false.

Fixes the phantom redial by explicitly checking the context before dialing. Also, in the test, we assert that the controller is closed before completing the test.
2024-11-19 11:37:11 +04:00
Spike Curtis 85c3c4c025 feat(tailnet): add alias with username and short alias to DNS (#15585)
Adds DNS aliases of the form `<agent>.<workspace>.<username>.coder.` and
`<workspace>.coder.`
2024-11-19 11:23:17 +04:00
Steven Masley c3c23ed3d9 chore: add query to fetch top level idp claim fields (#15525)
Adds an api endpoint to grab all available sync field options for IDP
sync. This is for autocomplete on idp sync forms. This is required for
organization admins to have some insight into the claim fields available
when configuring group/role sync.
2024-11-18 14:31:39 -06:00
Jon Ayers 48bb452829 fix: fix tailnet resume using incorrect DB reference (#15522)
- We were instantiating a cryptokey cache with a vanilla reference to
the database instead of one wrapped by dbcrypt.
- Fixes an issue where failing to instantiate unrelated keycaches does
not fatally error out.
2024-11-18 14:09:04 -06:00
Steven Masley 4fedc7cf3d chore: include merged claims into the database (#15570)
Merging happens before IDP sync. Storing this will make some SQL queries
much simplier.
2024-11-18 11:58:19 -06:00
dependabot[bot] 097b84f27b chore: bump cross-spawn from 7.0.3 to 7.0.5 in /offlinedocs (#15553)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 19:53:19 +05:00
dependabot[bot] c803e7d6f7 chore: bump cross-spawn from 7.0.3 to 7.0.6 in /site (#15567)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 19:51:46 +05:00
dependabot[bot] 1c6cec3c43 ci: bump github/codeql-action from 3.27.1 to 3.27.4 in the github-actions group (#15563)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 19:38:29 +05:00
dependabot[bot] 36ba932c3a chore: bump github.com/go-playground/validator/v10 from 10.22.0 to 10.23.0 (#15565)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 19:38:16 +05:00
dependabot[bot] a9554a52bf chore: bump github.com/hashicorp/hcl/v2 from 2.22.0 to 2.23.0 (#15564)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 19:37:46 +05:00
Spike Curtis 1aaaad998c fix: fix listening flake on TestTailnet_ForcesWebSockets (#15555)
Fixes a test flake on TestTailnet_ForcesWebsockets like:

```
    t.go:106: 2024-11-18 07:44:25.939 [debu]  w2: dial tcp  addr_port="[fd7a:115c:a1e0:46cc:bd8e:400d:1bc6:f6ac]:35565"
    t.go:106: 2024-11-18 07:44:25.943 [debu]  w1.net.netstack: netstack: could not connect to local server at 127.0.0.1:35565 (or [::1]:35565)%!(EXTRA *net.OpError=dial tcp [::1]:35565: connect: connection refused)
    conn_test.go:146:
        	Error Trace:	/Users/spike/repos/coder/tailnet/conn_test.go:146
        	Error:      	Received unexpected error:
        	            	connect tcp [fd7a:115c:a1e0:46cc:bd8e:400d:1bc6:f6ac]:35565: connection was refused
        	Test:       	TestTailnet/ForcesWebSockets
    t.go:106: 2024-11-18 07:44:25.945 [info]  w1: closing tailnet Conn
    t.go:106: 2024-11-18 07:44:25.945 [debu]  w1: closing configMaps configLoop
    t.go:106: 2024-11-18 07:44:25.945 [debu]  w1: closing nodeUpdater updateLoop
    t.go:106: 2024-11-18 07:44:25.945 [debu]  w1: closed netstack
    conn_test.go:135:
        	Error Trace:	/Users/spike/repos/coder/tailnet/conn_test.go:135
        	            				/Users/spike/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.8.darwin-arm64/src/runtime/asm_arm64.s:1222
        	Error:      	Received unexpected error:
        	            	connection closed:
        	            	    github.com/coder/coder/v2/tailnet.init
        	            	        <autogenerated>:1
        	Test:       	TestTailnet/ForcesWebSockets
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1039771dc]

goroutine 2224 [running]:
github.com/coder/coder/v2/tailnet_test.TestTailnet.func3.2()
	/Users/spike/repos/coder/tailnet/conn_test.go:136 +0x7c
created by github.com/coder/coder/v2/tailnet_test.TestTailnet.func3 in goroutine 109
	/Users/spike/repos/coder/tailnet/conn_test.go:133 +0x7dc
```

Test didn't synchronize listening on the port before dialing it. 

It also has a nil pointer deference when the test fails, which causes a bunch of unrelated output. Also fixed.
2024-11-18 16:05:16 +04:00
Dean Sheather d63bd213f7 chore: add vpn-daemon run subcommand for windows (#15526)
`coder vpn-daemon run` will instantiate a RPC connection with the
specified pipe handles and communicate with the (yet to be implemented)
parent process.

The tests don't ensure that the tunnel is actually usable yet as the
tunnel functionality isn't implemented, but it does make sure that the
tunnel tries to read from the RPC pipe.

Closes #14735
2024-11-18 21:10:01 +10:00
Marcin Tojek 8ca8e016fa fix(site): wait until port is available in e2e (#15537)
Related: https://github.com/coder/internal/issues/212

This PR modifies the logic responsible for creating a server in E2E
tests to check if the port is free. Alternatively, we could refactor the
framework to dynamically create server instances, but this solution
might be a cheaper quick win.

Note:

I'll leave it as is now, it might be worth asking somebody with a
frontend skillset to double-check this contribution.

---------

Signed-off-by: Danny Kopping <danny@coder.com>
Co-authored-by: Danny Kopping <danny@coder.com>
2024-11-18 10:28:16 +00:00
Spike Curtis 5861e516b9 chore: add standard test logger ignoring db canceled (#15556)
Refactors our use of `slogtest` to instantiate a "standard logger" across most of our tests.  This standard logger incorporates https://github.com/coder/slog/pull/217 to also ignore database query canceled errors by default, which are a source of low-severity flakes.

Any test that has set non-default `slogtest.Options` is left alone. In particular, `coderdtest` defaults to ignoring all errors. We might consider revisiting that decision now that we have better tools to target the really common flaky Error logs on shutdown.
2024-11-18 14:09:22 +04:00
Cian Johnston 4719d2406f chore(testutil): extract testutil.CreateZip and testutil.CreateTar helpers (#15540)
Extracts `testutil.CreateTar` and `testutil.CreateZip` test helpers.
2024-11-18 09:17:04 +00:00
Phorcys f9d6698384 feat(examples/templates/azure-linux): promote module usage (#15517) 2024-11-18 13:40:12 +05:00
Spike Curtis 747f7ce173 feat: add support for WorkspaceUpdates to WebsocketDialer (#15534)
closes #14730

Adds support for WorkspaceUpdates to the WebsocketDialer. This allows us to dial the new endpoint added in #14847 and connect it up to a `tailnet.Controllers` to connect to all agents over the tailnet.

I refactored the fakeWorkspaceUpdatesProvider to a mock and moved it to `tailnettest` so it could be more easily reused.  The Mock is a little more full-featured.
2024-11-18 10:54:11 +04:00
Spike Curtis 16992ee548 feat(tailnet): add workspace updates support to Controller (#15529)
re: #14730

Adds support in `tailnet.Controller` for WorkspaceUpdates.

Also checks configured controllers against the clients returned by the dialer, so that if we connect with a dialer that doesn't support an RPC (for instance the in-memory dialer for ServerTailnet doesn't support WorkspaceUpdates), we throw an error if there is a controller expecting it.
2024-11-18 10:41:19 +04:00
Hugo Dutka aa0dc2daa1 chore: track terraform modules in telemetry (#15450)
Addresses https://github.com/coder/nexus/issues/35.

This PR:

- Adds a `workspace_modules` table to track modules used by the
Terraform provisioner in provisioner jobs.
- Adds a `module_path` column to the `workspace_resources` table,
allowing to identify which module a resource originates from.
- Starts pushing this new information into telemetry.

For the person reviewing this PR, do not fret about the 1,500 new lines
- ~1,000 of them are auto-generated.
2024-11-16 21:56:19 +01:00
Kayla Washburn-Love 968c52bc36 fix: add error that provisionerkeys require the externalprovisioners feature (#15541) 2024-11-15 14:43:32 -07:00
Steven Masley 16ade985ae chore: make scim auth header case insensitive for 'bearer' (#15538)
Fixes status codes to return more than 500. The way we were using the
package, it always returned a status code 500
2024-11-15 12:30:11 -06:00
Joobi S B 4cb807670d chore: generate countries.tsx from Go code (#15274)
Closes https://github.com/coder/coder/issues/15074

We have a hard-coded list of countries at
https://github.com/coder/coder/blob/main/site/src/pages/SetupPage/countries.tsx.
This means Go code in coder/coder doesn't have an easy way of utilizing
it.

## Solution
Generate countries.tsx from Go code. Generated by `scripts/apitypings`
2024-11-15 12:05:21 -06:00
Steven Masley aea6208515 chore: use codersdk return type, not package type (#15539) 2024-11-15 18:01:42 +00:00
Cian Johnston 12a9d6336b fix(agent): start rpty lifecycle after all reads/writes (#15535)
Fixes https://github.com/coder/internal/issues/214

#15475 missed that we also write to `rpty` after starting
`rpty.lifecycle()`.
This PR moves the function call right at the end. Hopefully this should
address the data races before we go resorting to mutexes.
2024-11-15 14:48:17 +00:00
Cian Johnston aca5be5e50 feat(provisionersdk): allow variadic tags in provisionersdk.MutateTags (#15518)
Relates to https://github.com/coder/coder/issues/15087 and
https://github.com/coder/coder/issues/15427

Allows specifying multiple sets of provisioner tags into `MutateTags`.
These tags get additively merged.

This will simplify handling tags from multiple sources when sniffing
tags from the template.
2024-11-15 12:31:02 +00:00
Sas Swart 450c72f95c chore(coderd/database): fix duplicate migration numbers (#15533) 2024-11-15 11:39:05 +00:00
Marcin Tojek 23470789f1 fix: ignore cancellation error in test (#15532)
Fixes: https://github.com/coder/internal/issues/211
2024-11-15 12:20:35 +01:00
Sas Swart dbf41a1160 chore(coderd/database): fix duplicate migration numbers (#15530)
Renaming migrations to avoid duplicate numbering
2024-11-15 10:55:47 +00:00
Sas Swart 814dd6f854 feat(coderd): update API to allow filtering provisioner daemons by tags (#15448)
This PR provides new parameters to an endpoint that will be necessary
for #15048
2024-11-15 11:33:22 +02:00
Spike Curtis 40802958e9 fix: use explicit api versions for agent and tailnet (#15508)
Bumps the Tailnet and Agent API version 2.3, and creates some extra controls and machinery around these versions.

What happened is that we accidentally shipped two new API features without bumping the version.  `ScriptCompleted` on the Agent API in Coder v2.16 and `RefreshResumeToken` on the Tailnet API in Coder v2.15.

Since we can't easily retroactively bump the versions, we'll roll these changes into API version 2.3 along with the new WorkspaceUpdates RPC, which hasn't been released yet.  That means there is some ambiguity in Coder v2.15-v2.17 about exactly what methods are supported on the Tailnet and Agent APIs.  This isn't great, but hasn't caused us major issues because 

1. RefreshResumeToken is considered optional, and clients just log and move on if the RPC isn't supported. 
2. Agents basically never get started talking to a Coderd that is older than they are, since the agent binary is normally downloaded from Coderd at workspace start.

Still it's good to get things squared away in terms of versions for SDK users and possible edge cases around client and server versions.

To mitigate against this thing happening again, this PR also:

1. adds a CODEOWNERS for the API proto packages, so I'll review changes
2. defines interface types for different API versions, and has the agent explicitly use a specific version.  That way, if you add a new method, and try to use it in the agent without thinking explicitly about versions, it won't compile.

With the protocol controllers stuff, we've sort of already abstracted the Tailnet API such that the interface type strategy won't work, but I'll work on getting the Controller to be version aware, such that it can check the API version it's getting against the controllers it has -- in a later PR.
2024-11-15 11:16:28 +04:00
Spike Curtis 916df4d411 feat: set DNS hostnames in workspace updates controller (#15507)
re: #14730

Adds support for the workspace updates protocol controller to also program DNS names for each agent.

Right now, we only program names like `myagent.myworkspace.me.coder` and `myworkspace.coder.` (if there is exactly one agent in the workspace).  We also want to support `myagent.myworkspace.username.coder.`, but for that we need to update WorkspaceUpdates RPC to also send the workspace owner's username, which will be in a separate PR.
2024-11-15 11:00:19 +04:00
Muhammad Atif Ali 365ce67f21 chore: add provenance attestation to docker-base image (#14999)
Enables [build
attestation](https://docs.docker.com/build/metadata/attestations/slsa-provenance/)
for the docker-base image.
Contributes to #14879 and coder/internal#89

As an experiment, we are only doing it with the coder-base image for
now.
2024-11-15 08:16:33 +05:00
Aaron Lehmann f1cb3a5b11 fix: correct example for /extend endpoint in the documentation (#15521)
The example in the docs wrongly shows a POST to this endpoint.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2024-11-14 12:13:27 -05:00
Steven Masley b6d0b7713a chore: implement user link claims as a typed golang object (#15502)
Move claims from a `debug` column to an actual typed column to be used.
This does not functionally change anything, it just adds some Go typing to build
on.
2024-11-14 10:05:44 -06:00
Phorcys 6b1fafbacc feat(examples/templates/aws-linux): use modules for code-server and jetbrains (#15500) 2024-11-14 15:45:08 +01:00
Ethan b96177613b ci: fix go tests not running if examples are updated (#15514)
- https://github.com/coder/coder/pull/15504 broke CI on main because of
the aforementioned issue, this also fixes the test failure.
2024-11-14 14:20:51 +00:00
Ben Potter d3eb896543 fix: remove built-in image for Docker template (#15504)
The hardcoded image is an anti-pattern, leading to weird errors if the
`docker` group is absent. We should either provide a better error
in-product or just have a better image.

@matifali - also down to use a Devcontainers universal image instead or
make this a parameter. Let me know what you think the best "default
install" is
2024-11-14 06:40:50 -07:00
Cian Johnston bebc38ee94 feat(provisioner/terraform/tfparse): implement WorkspaceTagDefaultsFromFile (#15236)
Relates to https://github.com/coder/coder/issues/15087 and
https://github.com/coder/coder/issues/15427

Adds functionality to `provisioner/terraform/tfparse` to extract the
default values for a `coder_workspace_tags` data source from a given
file.
2024-11-14 12:24:48 +00:00
Spike Curtis 08216aaad6 feat: add workspace updates controller (#15506)
re: #14730

Adds a protocol controller for WorkspaceUpdates RPC that takes all the agents we learn about over the RPC, and programs them into the Coordination controller, so that we set up tunnels to all the agents.

Handling DNS is in a PR up the stack, as is actually wiring it up to anything.
2024-11-14 16:16:04 +04:00
Marcin Tojek e7ab3e1b6a chore: log cancellation error in test (#15511)
Related: https://github.com/coder/internal/issues/211
2024-11-14 12:47:00 +01:00
Danny Kopping cb1a006ae4 chore: add link to RBAC usage doc in README (#15510)
Some new joiners had found the README, but not the usage doc

Signed-off-by: Danny Kopping <danny@coder.com>
2024-11-14 10:01:19 +00:00
Mathias Fredriksson e55e8ee1b2 fix(cli): add backwards compat for old telemetry env and tests (#15476) 2024-11-14 01:07:52 +02:00
Steven Masley 99dd13d4cd chore: add cli command to update organization sync settings (#15459) 2024-11-13 13:44:21 -06:00
Stephen Kirby 75b299071c docs: update version flags (#15501) 2024-11-13 13:40:06 -06:00
Cian Johnston 55dccae5a3 chore(docs): document how to correctly override list(string) parameters (#15497)
- Adds documentation for how to correctly hold --parameter with list(string)
- Adds tests for the aforementioned documented correct finger positions for --parameter list(string)
2024-11-13 15:41:36 +00:00
Muhammad Atif Ali 6ff302b740 docs: add Docker to provider authentication docs (#15494)
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2024-11-13 15:40:41 +00:00
Cian Johnston 4a6b28f5df feat(provisioner): add support for workspace_owner_login_type (#15499)
- Adds support for the `coder_workspace_owner.login_type` attribute.
- Adds a currently disabled test for `coder_workspace_owner.login_type`
2024-11-13 15:34:58 +00:00
Cian Johnston 1c938cda4b chore(cli): exp prompt-example: add option to multi-select (#15496)
Adds a `--things` flag to our `multi-select` example prompt command.

```
go run ./cmd/coder exp prompt-example multi-select --things=Code,Bike,Potato=mashed
"Code, Bike, Potato=mashed" are nice choices.
```
2024-11-13 12:14:43 +00:00
Danielle Maywood f2fe379bd2 fix: make GetWorkspacesEligibleForTransition return less false-positives (#15429)
Relates to https://github.com/coder/coder/issues/15082

The old implementation of `GetWorkspacesEligibleForTransition` returns
many workspaces that are not actually eligible for transition. This new
implementation reduces this number significantly (at least on our
dogfood instance).
2024-11-13 10:24:20 +00:00
Ethan fa69d1ca74 ci: reenable link checker & fix broken links (#15489)
Follow-up on #15484.
2024-11-13 16:04:10 +11:00
Vincent Vielle d6442db25a feat(cli): rotate file logs for coderd (#15438)
Related to #15309 

As we already are doing for agent logs - this PR is enabling the logs
rotation for coderd logs.

Currently keeping the same logic than we had for agent - with 5MB as the
file size for rotation.
2024-11-12 21:48:32 +01:00
Edward Angert 56e219b50d docs: update template-from-scratch (#15101)
closes https://github.com/coder/internal/issues/104

- [x] update screenshots
- [x] consistent md
- [x] confirm and update `Dockerfile` and `main.tf`
   - matched up to the Docker Containers starter template
- upload template
   - [x] confirm CLI steps
   - [x] add steps in tab for Dashboard
- [x] ~confirm that the expand works~ it doesn't


<https://coder.com/docs/@template-from-scratch-update/tutorials/template-from-scratch>

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-12 14:01:51 -05:00
Edward Angert eff07a2db0 docs: clarify admin email telemetry (#15485)
add a note to the telemtery doc that explains that we do collect the
admin email


https://coder.com/docs/@telemetry-clarification/admin/setup/telemetry#what-we-collect

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-12 11:24:13 -05:00
Bruno Quaresma bebe4f06d2 chore: sort inserted users on dbmem (#15483) 2024-11-12 10:44:31 -03:00
Ethan 97b3bbf4a0 ci: disable weekly-docs temporarily (#15484)
I updated it in #15424 and it's doing suspect things to block PRs 🙃 

https://github.com/coder/coder/actions/runs/11797850940/job/32862729001?pr=15482
2024-11-12 13:41:00 +00:00
Cian Johnston 30e6fbd35c fix(coderd): ensure correct RBAC when enqueueing notifications (#15478)
- Assert rbac in fake notifications enqueuer
- Move fake notifications enqueuer to separate notificationstest package
- Update dbauthz rbac policy to allow provisionerd and autostart to create and read notification messages
- Update tests as required
2024-11-12 12:40:46 +00:00
dependabot[bot] bb5c3a2dd8 chore: bump google.golang.org/grpc from 1.67.1 to 1.68.0 (#15471)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from
1.67.1 to 1.68.0.
2024-11-12 15:14:27 +04:00
Spike Curtis d1305ac25e fix: stop logging error when template schedule query is canceled (#15402)
Fixes test flakes _a la_

```
    t.go:108: 2024-11-05 09:52:37.996 [erro]  workspacestats: failed to load template schedule bumping activity, defaulting to bumping by 60min  request_id=f14215d2-73dc-47ba-aa81-422c62f257e4  workspace_id=545d73c7-3a62-4466-8c08-b6abb12867b7  template_id=49747428-3abb-40e4-a6b2-03653e9f2506 ...
        error= fetch object:
                   github.com/coder/coder/v2/coderd/database/dbauthz.(*querier).GetTemplateByID.fetch[...].func1
                       /home/runner/work/coder/coder/coderd/database/dbauthz/dbauthz.go:497
                 - pq: canceling statement due to user request
         *** slogtest: log detected at level ERROR; TEST FAILURE ***
```

seen here on main: https://github.com/coder/coder/actions/runs/11681605747/job/32527006174
2024-11-12 15:08:15 +04:00
Ethan 6117f46706 chore: include if direct connection is over private network in ping diagnostics (#15313)
Whilst the `networking-troubleshooting` docs page already mentions that
a direct connection can be established over a private network, even if
there are no STUN servers, it's worth this is the case at the end of the
ping output.

This also removes a print statement that was dirtying up the diagnostic
output, and corrects the name of the `--disable-direct-connections`
flag.
2024-11-12 17:33:35 +11:00
dependabot[bot] c519a129fc chore: bump google.golang.org/api from 0.204.0 to 0.205.0 (#15473)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-12 06:29:04 +00:00
dependabot[bot] 4e2a46eee8 chore: bump github.com/charmbracelet/bubbletea from 1.1.0 to 1.2.1 (#15472)
Bumps
[github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea)
from 1.1.0 to 1.2.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/charmbracelet/bubbletea/releases">github.com/charmbracelet/bubbletea's
releases</a>.</em></p>
<blockquote>
<h2>v1.2.0</h2>
<h1>It’s performance boost time</h1>
<p>Sometimes you have to take matters into your own hands. That’s
exactly what <a
href="https://github.com/LeperGnome"><code>@​LeperGnome</code></a> did
when he wanted faster rendering. This release features adjustments to
the rendering algorithm for faster repaints. We encourage you to upgrade
and give it a go!</p>
<blockquote>
<p>[!NOTE]
Renderer changes are no laughing matter. We’ve tested the new renderer
extensively, however if you notice any bugs let us know. Rendering
accuracy is among our top priorities.</p>
</blockquote>
<h2>Changelog</h2>
<ul>
<li>rendering speed improvements by <a
href="https://github.com/LeperGnome"><code>@​LeperGnome</code></a> in <a
href="https://redirect.github.com/charmbracelet/bubbletea/pull/1132">charmbracelet/bubbletea#1132</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/LeperGnome"><code>@​LeperGnome</code></a> made
their first contribution in <a
href="https://redirect.github.com/charmbracelet/bubbletea/pull/1132">charmbracelet/bubbletea#1132</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/charmbracelet/bubbletea/compare/v1.1.2...v1.2.0">https://github.com/charmbracelet/bubbletea/compare/v1.1.2...v1.2.0</a></p>
<hr />
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><!-- raw HTML
omitted --></p>
<p>Thoughts? Questions? We love hearing from you. Feel free to reach out
on <a href="https://twitter.com/charmcli">Twitter</a>, <a
href="https://mastodon.technology/@charm">The Fediverse</a>, or on <a
href="https://charm.sh/chat">Discord</a>.</p>
<h2>v1.1.2</h2>
<h1>This and that</h1>
<p>A tiny tiny release that fixes the tests on Windows, and uses the
latest <code>ansi</code> package definitions.</p>
<!-- raw HTML omitted -->
<h2>Changelog</h2>
<!-- raw HTML omitted -->
<h3>New Features</h3>
<ul>
<li>12b04c5d6001056875bc712f81fa1efd470fa592: feat(ci): use meta lint
workflow (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
<li>3209d62ae751da63a38237666d6706ab7c9f0006: feat(ci): use meta
lint-sync workflow to sync linter config (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>566879aa33ce13f27a6bdab4a274e08be01bac9c: fix(ci): run lint workflow
on all platforms (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
<li>cd1e4d34a7e0232ea94afcc168eec107450aa332: fix: exec tests on windows
(<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
</ul>
<h3>Documentation updates</h3>
<ul>
<li>d928d8dcabcd4bca0efc22fb661de0cc27c66b21: docs: update contributing
guidelines (<a
href="https://redirect.github.com/charmbracelet/bubbletea/issues/1186">#1186</a>)
(<a
href="https://github.com/bashbunni"><code>@​bashbunni</code></a>)</li>
<li>de4788dc763d5a6ce7ca555c5ee6fce3179dedc4: docs: update readme badge
images (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
</ul>
<!-- raw HTML omitted -->
<hr />
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/5b65f9afee63a23935373397c858891ddf0e868d"><code>5b65f9a</code></a>
chore: go mod tidy</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/e16a768eabe59bb0e4d4fe7a40439e27346dcf66"><code>e16a768</code></a>
fix: screen_test.go: fix test cases for ClearScreen and
EnterAltScreen</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/c78a084f81ea3011662876d8ae65752875f25aa3"><code>c78a084</code></a>
fix: renderer: use HomeCursorPosition instead of CursorOrigin</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/50249d492da0c103dfc37d2e47e1be49217479b1"><code>50249d4</code></a>
fix: screen_test.go: fix test cases for cursor movement</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/99b85ff94fbbf85dc1a0c8f5753e0b18f484816e"><code>99b85ff</code></a>
fix: renderer: erase the rest of the line when it's shorter than the
width</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/f4d1e0ead8047cc5557e638ed424e66e18a36c11"><code>f4d1e0e</code></a>
chore(deps): bump github.com/charmbracelet/x/ansi from 0.4.2 to 0.4.5
(<a
href="https://redirect.github.com/charmbracelet/bubbletea/issues/1224">#1224</a>)</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/d6aee5bd5f9492b96f31969a09d1c38f21532120"><code>d6aee5b</code></a>
chore(deps): bump github.com/charmbracelet/lipgloss from 0.13.1 to 1.0.0
(<a
href="https://redirect.github.com/charmbracelet/bubbletea/issues/1219">#1219</a>)</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/3bbf24dec24acebdb32ef675cb9788c90206e911"><code>3bbf24d</code></a>
chore(deps): bump github.com/charmbracelet/lipgloss in /examples (<a
href="https://redirect.github.com/charmbracelet/bubbletea/issues/1220">#1220</a>)</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/2472d90201467bb911eb0ba37f4a9da69ad33209"><code>2472d90</code></a>
fix: remove unnecessary line break</li>
<li><a
href="https://github.com/charmbracelet/bubbletea/commit/5f70edd7873cccfc82de75a624b1b28305c9be4e"><code>5f70edd</code></a>
chore(ci): sync golangci-lint config (<a
href="https://redirect.github.com/charmbracelet/bubbletea/issues/1222">#1222</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/charmbracelet/bubbletea/compare/v1.1.0...v1.2.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/charmbracelet/bubbletea&package-manager=go_modules&previous-version=1.1.0&new-version=1.2.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>
2024-11-12 13:55:00 +11:00
Ethan a5d19776af chore: increase autostop requirement leeway to two hours (#15445)
Closes https://github.com/coder/coder/issues/12612

The problem in the linked issue was caused due to a mismatch of when the
Web UI tooltip shows up (2 hours before an autostop requirement) and the
leeway in the `autostop_requirement` algorithm (workspace builds must be
1 hour before an autostop requirement to skip them).

Now, restarting your workspace whilst the tooltip is showing will skip
the upcoming autostop requirement.

This also could have been fixed by only showing the tooltip one hour
before the autostop requirement, but it looks like 1 hour was chosen
arbitrarily, and it doesn't hurt to give users more time to skip the
autostop.
2024-11-12 13:53:21 +11:00
Dean Sheather 6cc1067319 chore: add Tokyo server to dogfood template (#15479) 2024-11-11 23:56:06 +00:00
Cian Johnston b6e7498cb8 fix(agent/reconnectingpty): generate rpty id before starting lifecycle (#15475)
Fixes https://github.com/coder/coder/issues/12687

There was a race condition where we would start the rpty lifecycle
before generating the ID, leading to a data race where we would try to
concurrently read and write the struct field.
2024-11-11 15:02:55 +00:00
dependabot[bot] bc9d875efe chore: bump github.com/gohugoio/hugo from 0.136.5 to 0.138.0 (#15470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 18:10:41 +05:00
dependabot[bot] 827fc41b86 chore: bump the x group with 9 updates (#15469)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 18:03:06 +05:00
dependabot[bot] 7f294bbb70 ci: bump the github-actions group with 2 updates (#15474)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 18:02:29 +05:00
Muhammad Atif Ali 329e08686f chore: improve PR deployments (#15430) 2024-11-11 17:58:32 +05:00
Mathias Fredriksson 78b4967571 docs: fix mention of incorrect env var to enable/disable telemetry (#15467) 2024-11-11 11:12:39 +00:00
Edward Angert 50e95ba676 docs: adjust manual github action screenshot in contributing.md (#15439)
resolves #15407

adjust manual github action screenshot in contributing.md


[preview](https://coder.com/docs/@15407-contrib-image/CONTRIBUTING#deploying-a-pr)
(once ready)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-08 13:15:57 -05:00
Bruno Quaresma 308df177c9 chore: use hsl for tailwind and shadcn theming (#15453)
Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
2024-11-08 14:33:50 -03:00
Danny Kopping 111029ec07 chore: clarify template provisioning speed doc (#15383)
I noticed a few inaccuracies in this doc, or aspects which could've been
explained a little more. In other cases, I've added some specificity in
service of clarity.

---------

Signed-off-by: Danny Kopping <danny@coder.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-08 16:06:20 +00:00
Steven Masley 782214bcd8 chore: move organizatinon sync to runtime configuration (#15431)
Moves the configuration from environment to database backed, to allow
configuring organization sync at runtime.
2024-11-08 08:44:14 -06:00
Spike Curtis 7b33ab0dcf fix: set dogfood go version to match go.mod (#15446)
Updates our dogfood image to use the same go version as `go.mod`. This allows us to skip downloading the new go version on builds.
2024-11-08 13:51:04 +04:00
Ethan 5d853fcfd8 chore: support adding dns hosts to tailnet.Conn (#15419)
Relates to #14718.

The remaining changes (regarding the Tailscale DNS service) will need to
be made on `coder/tailscale`.
2024-11-08 09:37:56 +00:00
Spike Curtis e5661c2748 feat: add support for multiple tunnel destinations in tailnet (#15409)
Closes #14729

Expands the Coordination controller used by the CLI client to allow multiple tunnel destinations (agents).  Our current client uses just one, but this unifies the logic so that when we add Coder VPN, 1 is just a special case of "many."
2024-11-08 13:32:07 +04:00
Spike Curtis 8c00ebc6ee chore: refactor ServerTailnet to use tailnet.Controllers (#15408)
chore of #14729

Refactors the `ServerTailnet` to use `tailnet.Controller` so that we reuse logic around reconnection and handling control messages, instead of reimplementing.  This unifies our "client" use of the tailscale API across CLI, coderd, and wsproxy.
2024-11-08 13:18:56 +04:00
Ethan f7cbf5dd79 fix: support windows specific zip mime type for template uploads (#15442)
![image](https://github.com/user-attachments/assets/15ae6dc4-84a3-4c20-b603-ed38cc14a250)
Despite being encoded the same, the API was previously rejecting zip
files with this MIME type.
2024-11-08 18:24:12 +11:00
Spike Curtis 718722af1b chore: refactor tailnetAPIConnector to tailnet.Controller (#15361)
Refactors `workspacesdk.tailnetAPIConnector` as a `tailnet.Controller` to reuse all the reconnection and graceful disconnect logic.

chore re: #14729
2024-11-08 10:10:54 +04:00
Ethan d2e496901f fix: set content type when uploading edited template (#15440)
Fixes a bug where a file produced by `generateVersionFiles` (as used
when uploading a web UI edited template) produced a file where the
`type` field was unset.
This meant the change in #15410 used the unset type value as the content
header when uploading, causing it to always fail.
2024-11-08 05:59:17 +00:00
Edward Angert f7694568eb docs: add workplace scheduling to manifest (#15384)
- [ ] check links to
<https://coder.com/docs/@workspace-scheduling/admin/templates/managing-templates/schedule#dormancy-threshold-enterprise-premium>
- @mattvollmer reports that
<https://coder.com/docs/templates/managing-templates/schedule#dormancy-threshold-enterprise>
is missing. I'll try to find refs to it



[preview](https://coder.com/docs/@workspace-scheduling/admin/templates/managing-templates/schedule)

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-08 00:54:52 -05:00
Edward Angert e688ff723b docs: add deploy id to license doc (#15415)
resolves #15414 

adds a section to licensing doc to show where to find the deployment ID


[preview](https://coder.com/docs/@15414-deploy-id/admin/licensing#find-your-deployment-id)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-07 21:54:11 -08:00
Jaayden Halko de2f42eedd fix: enable Tailwind with storybook (#15418)
This adds index.css to the storybook preview file and references to
#storybook-root element in the tailwind config

---------

Co-authored-by: Spike Curtis <spike@coder.com>
Co-authored-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com>
2024-11-07 20:56:42 -05:00
Bruno Quaresma cb9991a9bf chore: add VSCode TailwindCSS extension as recommendation (#15436) 2024-11-07 17:19:32 -03:00
Hugo Dutka f85ef84cc5 fix: use container with Postgres 13 for dump.sql (#15411) 2024-11-07 16:49:26 +01:00
Cian Johnston 9f05b192b4 chore(docs): fix inconsistencies in external provisioner docs (#15416)
This PR:
- Updates the table in `docs/admin/provisioners.md` to include highlight
multi-org changes
- Updates the instructions for the provisionerd helm chart when using
provisioner keys

---------

Co-authored-by: Ben Potter <ben@coder.com>
2024-11-07 13:28:53 +00:00
Spike Curtis 2d061e698d chore: refactor tailnetAPIConnector to use dialer (#15347)
refactors `tailnetAPIConnector` to use the `Dialer` interface in `tailnet`, introduced lower in this stack of PRs. This will let us use the same Tailnet API handling code across different things that connect to the Tailnet API (CLI client, coderd, workspace proxies, and soon: Coder VPN).

chore re: #14729
2024-11-07 17:24:19 +04:00
Spike Curtis ba483efd0f chore: add logging for Run failures in workspacetraffic (#15425)
Run logs are currently dropped on the floor when workspacetraffic tests fail.

e.g. https://github.com/coder/coder/runs/32640144785


This prints the logs when we get a failure, like

```
    run_test.go:341: 
        	Error Trace:	/Users/spike/repos/coder/scaletest/workspacetraffic/run_test.go:341
        	            				/Users/spike/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.8.darwin-arm64/src/runtime/asm_arm64.s:1222
        	Error:      	Received unexpected error:
        	            	badness:
        	            	    github.com/coder/coder/v2/scaletest/workspacetraffic.(*Runner).Run
        	            	        /Users/spike/repos/coder/scaletest/workspacetraffic/run.go:174
        	Test:       	TestRun/App
        	Messages:   	RUN LOGS:
        	            	2024-11-07 13:04:30.274 [debu]  config  agent_id=00000000-0000-0000-0000-000000000000  reconnecting_pty_id=95bb480f-cd26-4633-8332-328d44ffa997  height=25  width=80  tick_interval=1s  bytes_per_tick=1024
        	            	2024-11-07 13:04:30.274 [debu]  connect to workspace agent  agent_id=00000000-0000-0000-0000-000000000000
        	            	2024-11-07 13:04:30.274 [info]  sending traffic to workspace app  agent_id=00000000-0000-0000-0000-000000000000  app=echo
        	            	2024-11-07 13:04:30.276 [debu]  reading from agent  agent_id=00000000-0000-0000-0000-000000000000
        	            	2024-11-07 13:04:30.276 [debu]  writing to agent  agent_id=00000000-0000-0000-0000-000000000000
        	            	2024-11-07 13:04:31.526 [debu]  done reading from agent  agent_id=00000000-0000-0000-0000-000000000000
        	            	2024-11-07 13:04:32.276 [debu]  done writing to agent  agent_id=00000000-0000-0000-0000-000000000000
        	            	
        	            	END RUN LOGS
```

So, hopefully we can diagnose flakes.
2024-11-07 17:16:43 +04:00
Spike Curtis cee6b1ebde fix: wait for prompt on rich param CLI test (#15406)
Fixes a race in TestUpdateValidateRichParameters where the parameter is sent prior to the prompt.

Causes errors like: https://github.com/coder/coder/actions/runs/11681622439/job/32527173007

```
    ptytest.go:132: 2024-11-05 10:02:18.819: cmd: "bool_parameter"
    ptytest.go:167: 2024-11-05 10:02:18.819: cmd: matched "bool_parameter" = "bool_parameter"
    update_test.go:440: 2024-11-05 10:02:18.819: cmd: stdin: "cat\r\n"
    ptytest.go:132: 2024-11-05 10:02:18.819: cmd: "> Enter a value (default: \"\"): can't validate build parameter \"bool_parameter\": boolean value can be either \"true\" or \"false\""
    ptytest.go:167: 2024-11-05 10:02:18.819: cmd: matched "boolean value can be either" = "\n> Enter a value (default: \"\"): can't validate build parameter \"bool_parameter\": boolean value can be either"
    update_test.go:440: 2024-11-05 10:02:18.819: cmd: stdin: "\r\n"
    ptytest.go:167: 2024-11-05 10:02:18.819: cmd: matched "Enter a value" = " \"true\" or \"false\"\n> Enter a value"
    update_test.go:440: 2024-11-05 10:02:18.819: cmd: stdin: "false\r\n"
    ptytest.go:132: 2024-11-05 10:02:18.821: cmd: "> Enter a value (default: \"\"): can't validate build parameter \"bool_parameter\": boolean value can be either \"true\" or \"false\""
```
2024-11-07 16:47:15 +04:00
Cian Johnston 6781b0fc87 fix(helm/provisioner): prefer provisioner key if both psk and key are set (#15417)
Relates to https://github.com/coder/coder/pull/15416

This PR modifies the provisioner helm chart logic:
- Previously, when both provisionerDaemon.keySecretName and provisionerDaemon.pskSecretName
  were both set, we would fail to install the chart. This required users to have an obnoxious workaround
  in place where setting provisionerDaemon.pskSecretName="" was required in order to use provisioner
  keys. We now check for pskSecretName being set to the default value when keySecretName is also specified,
  and switch to provisioner key authentication instead of PSK. The previous workaround is still supported.
- We also had omitted to check for provisionerd.Tags being set along with provisionerDaemon.keySecretName.
  This would result in a crashlooping provisioner deployment, as setting both of these configuration options is
  not allowed. We now fast-fail the Helm deployment if we detect this scenario.
2024-11-07 12:33:58 +00:00
Spike Curtis 71dc91e496 fix: fix loss of buffered input on cliui.Prompt (#15421)
fixes https://github.com/coder/internal/issues/203
2024-11-07 16:19:03 +04:00
Ethan 098728138f chore: add a tailscale router that uses the CoderVPN protocol (#15391)
Closes #14732.
2024-11-07 22:45:17 +11:00
Ethan 6e18742ad3 ci: replace unmaintained markdown link checker (#15424)
The old one was flaking a bunch and blocking PRs. This is the one
recommended by the maintainer of the old.
2024-11-07 22:30:43 +11:00
dependabot[bot] 7318cc0e34 chore: bump @types/node from 20.16.10 to 20.17.6 in /offlinedocs (#15350)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-07 13:07:51 +05:00
Spike Curtis d7e86278c8 chore: add resume token controller (#15346)
Implements a controller for the Tailnet API resume token RPC, by refactoring from `workspacesdk`.

chore re: #14729
2024-11-07 11:32:20 +04:00
Jaayden Halko d4131badb6 feat: implement Premium features page using shadcn/ui and Tailwind (#15094)
resolves coder/internal#176

This is a proof of concept to showcase the use of Tailwind + shadcn/ui.
The goal here was to implement a lower complexity page to reduce the
initial risk and highlight the specific global changes needed.

Changes:

- Create a separate version of Premium features content for Enterprise
and OSS users
- Use shadcn/ui button component and setup styling and variants to match
the buttons defined in the Coder Kit Figma.
https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=3-1756
- Setup theming using CSS variables and custom Tailwind colors by using
the dark class name on the root element.
- CSS variable design token naming and colors defined in Figma.
https://www.figma.com/design/WfqIgsTFXN2BscBSSyXWF8/Coder-kit?node-id=1-2


<img width="1199" alt="Screenshot 2024-11-01 at 12 46 03 PM"
src="https://github.com/user-attachments/assets/a251450f-8447-405a-9cc4-9f6aad9cd19f">
<img width="1197" alt="Screenshot 2024-11-01 at 12 45 36 PM"
src="https://github.com/user-attachments/assets/e78a5a40-cbdf-4d85-9ffe-873505800fcc">
2024-11-06 12:53:00 -05:00
Danny Kopping cafb963bf4 chore: clarify section description to indicate that notifications can be disabled (#15381)
The current description of "Configure your notification preferences.
Icons on the right of each notification indicate delivery method, either
SMTP or Webhook." doesn't really say what this page is for.

I've adjusted the wording, and also changed the tooltip of the delivery
method icon to be more clear.

Signed-off-by: Danny Kopping <danny@coder.com>
2024-11-06 18:43:39 +01:00
Bruno Quaresma 7f510051fb refactor: increase group name limit to 255 (#15377)
Close https://github.com/coder/coder/issues/15184
2024-11-06 14:39:50 -03:00
Marcin Tojek 17363098e2 fix: use correct Content-Type for template archive (#15410)
Fixes: https://github.com/coder/coder/issues/14124
2024-11-06 18:38:48 +01:00
Bruno Quaresma 18c2386e9e chore(site): fix reset password storybook flake (#15380)
Fix https://github.com/coder/internal/issues/69
2024-11-06 14:24:32 -03:00
Spike Curtis 335e4ab6bf chore: refactor sending telemetry (#15345)
Implements a tailnet API Telemetry controller by refactoring from `workspacesdk`.

chore re: #14729
2024-11-06 20:23:23 +04:00
Spike Curtis 9126cd78a6 chore: refactor DERP setting loop (#15344)
Implements a Tailnet API DERP controller by refactoring from `workspacesdk`

chore re: #14729
2024-11-06 20:04:05 +04:00
Ethan f0a4de5e1a fix: use NoLock dbmem subqueries for GetWorkspaceAgentScriptTimingsByBuildID (#15405)
Closes https://github.com/coder/internal/issues/202.

Addresses the problem mentioned in the issue, and also makes sure
subtests don't reuse `testing.T` from the main test.
2024-11-06 23:43:58 +11:00
Jaayden Halko 4ec6871cea chore: update missing RBAC action descriptions (#15389)
Add missing action descriptions so that these appear when in the
frontend when creating/updating custom roles.
2024-11-05 18:16:10 -05:00
Edward Angert 0961468398 fix: add root-level code of conduct link (#15386)
closes #15369

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-05 17:15:26 -05:00
Stephen Kirby 1532ea7d2d docs: bump versions in docs for 2.17 (#15387) 2024-11-05 12:53:34 -06:00
Edward Angert 62fa7e5ab8 docs: disable markdown link check on mailto links (#15382)
to satisfy CI

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-05 12:35:46 -05:00
Vincent Vielle 4fe2c5f09a fix: improve password validation flow (#15132)
Refers to #14984 

Currently, password validation is done backend side and is not explicit
enough so it can be painful to create first users.
We'd like to make this validation easier - but also duplicate it
frontend side to make it smoother.

Flows involved : 
- First user set password
- New user set password
- Change password

---------

Co-authored-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com>
2024-11-05 17:22:32 +01:00
Ethan 8b5a18cade fix(site): watch build logs while job is pending or running (#15341)
Closes #15292.

Currently, if the frontend never sees a build job enter 'running', it'll
never end up watching the logs. If we start watching the logs earlier
we're able to catch cases where the job goes `pending` -> `failed`, such
as when the build fails immediately.
2024-11-06 01:20:27 +11:00
Ethan 3c60dc3bb5 fix(site): show error on duplicate template rename attempt (#15348)
Fixes #15311.
2024-11-06 01:18:38 +11:00
Steven Masley 2d00b50eb6 chore: remove excess join in GetQuotaConsumedForUser query (#15338)
Filter is applied in original workspace query. We do not need to join
`workspaces` twice. Use build_number instead of `created_at`
for determining the last build.
2024-11-05 08:12:56 -06:00
Spike Curtis 886dcbec84 chore: refactor coordination (#15343)
Refactors the way clients of the Tailnet API (clients of the API, which include both workspace "agents" and "clients") interact with the API.  Introduces the idea of abstract "controllers" for each of the RPCs in the API, and implements a Coordination controller by refactoring from `workspacesdk`.

chore re: #14729
2024-11-05 13:50:10 +04:00
dependabot[bot] 765314ce18 ci: bump the github-actions group with 4 updates (#15359)
Bumps the github-actions group with 4 updates:
[crate-ci/typos](https://github.com/crate-ci/typos),
[google-github-actions/auth](https://github.com/google-github-actions/auth),
[google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud)
and
[google-github-actions/get-gke-credentials](https://github.com/google-github-actions/get-gke-credentials).

Updates `crate-ci/typos` from 1.26.8 to 1.27.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.27.0</h2>
<h2>[1.27.0] - 2024-11-01</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1106">October
2024</a> changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h1>Change Log</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>The format is based on <a href="http://keepachangelog.com/">Keep a
Changelog</a>
and this project adheres to <a href="http://semver.org/">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased] - ReleaseDate</h2>
<h2>[1.27.0] - 2024-11-01</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1106">October
2024</a> changes</li>
</ul>
<h2>[1.26.8] - 2024-10-24</h2>
<h2>[1.26.7] - 2024-10-24</h2>
<h2>[1.26.6] - 2024-10-24</h2>
<h2>[1.26.5] - 2024-10-24</h2>
<h2>[1.26.4] - 2024-10-24</h2>
<h2>[1.26.3] - 2024-10-24</h2>
<h3>Fixes</h3>
<ul>
<li>Accept <code>additionals</code></li>
</ul>
<h2>[1.26.2] - 2024-10-24</h2>
<h3>Fixes</h3>
<ul>
<li>Accept <code>tesselate</code> variants</li>
</ul>
<h2>[1.26.1] - 2024-10-23</h2>
<h3>Fixes</h3>
<ul>
<li>Respect <code>--force-exclude</code> for binary files</li>
</ul>
<h2>[1.26.0] - 2024-10-07</h2>
<h3>Compatibility</h3>
<ul>
<li><em>(pre-commit)</em> Requires 3.2+</li>
</ul>
<h3>Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/crate-ci/typos/commit/d01f29c66d1bf1a08730750f61d86c210b0d039d"><code>d01f29c</code></a>
chore: Release</li>
<li><a
href="https://github.com/crate-ci/typos/commit/52e950bb130b2bdee93bba2b1973c8f7d8ac5c46"><code>52e950b</code></a>
chore: Release</li>
<li><a
href="https://github.com/crate-ci/typos/commit/19cfc03ea4e6fd581972b77eb3761351a4db7ee6"><code>19cfc03</code></a>
docs: Update changelog</li>
<li><a
href="https://github.com/crate-ci/typos/commit/f80b1564bd618fb5325b8c0d52849ac7da0bbaea"><code>f80b156</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1140">#1140</a>
from epage/oct</li>
<li><a
href="https://github.com/crate-ci/typos/commit/6b5c8079a9416f5aba90f4cc1348921aa72d9538"><code>6b5c807</code></a>
feat(dict): Oct updates</li>
<li><a
href="https://github.com/crate-ci/typos/commit/d64f202a88f87f2e3fbbd1f5a45ab2ec3ef9b832"><code>d64f202</code></a>
chore(deps): Update compatible (<a
href="https://redirect.github.com/crate-ci/typos/issues/1137">#1137</a>)</li>
<li><a
href="https://github.com/crate-ci/typos/commit/e903c4628799da0b9fc51e03d200e4fa62ba2c0a"><code>e903c46</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1136">#1136</a>
from PigeonF/PigeonF/push-mlqnlvmswwmp</li>
<li><a
href="https://github.com/crate-ci/typos/commit/b994765ef920d85d7a7115db2e9afce611cdcf93"><code>b994765</code></a>
chore: Fix typo &quot;potemtial&quot; -&gt; &quot;potential&quot;</li>
<li>See full diff in <a
href="https://github.com/crate-ci/typos/compare/0d9e0c2c1bd7f770f6eb90f87780848ca02fc12c...d01f29c66d1bf1a08730750f61d86c210b0d039d">compare
view</a></li>
</ul>
</details>
<br />

Updates `google-github-actions/auth` from 2.1.6 to 2.1.7
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google-github-actions/auth/releases">google-github-actions/auth's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.7</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: update relase workflows by <a
href="https://github.com/verbanicm"><code>@​verbanicm</code></a> in <a
href="https://redirect.github.com/google-github-actions/auth/pull/452">google-github-actions/auth#452</a></li>
<li>Release: v2.1.7 by <a
href="https://github.com/google-github-actions-bot"><code>@​google-github-actions-bot</code></a>
in <a
href="https://redirect.github.com/google-github-actions/auth/pull/453">google-github-actions/auth#453</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google-github-actions/auth/compare/v2.1.6...v2.1.7">https://github.com/google-github-actions/auth/compare/v2.1.6...v2.1.7</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/google-github-actions/auth/commit/6fc4af4b145ae7821d527454aa9bd537d1f2dc5f"><code>6fc4af4</code></a>
Release: v2.1.7 (<a
href="https://redirect.github.com/google-github-actions/auth/issues/453">#453</a>)</li>
<li><a
href="https://github.com/google-github-actions/auth/commit/212f83afe868cc88aa354e1efbf778eff05d970a"><code>212f83a</code></a>
fix: update relase workflows (<a
href="https://redirect.github.com/google-github-actions/auth/issues/452">#452</a>)</li>
<li>See full diff in <a
href="https://github.com/google-github-actions/auth/compare/8254fb75a33b976a221574d287e93919e6a36f70...6fc4af4b145ae7821d527454aa9bd537d1f2dc5f">compare
view</a></li>
</ul>
</details>
<br />

Updates `google-github-actions/setup-gcloud` from 2.1.1 to 2.1.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google-github-actions/setup-gcloud/releases">google-github-actions/setup-gcloud's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.2</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: update release workflows by <a
href="https://github.com/verbanicm"><code>@​verbanicm</code></a> in <a
href="https://redirect.github.com/google-github-actions/setup-gcloud/pull/698">google-github-actions/setup-gcloud#698</a></li>
<li>Release: v2.1.2 by <a
href="https://github.com/google-github-actions-bot"><code>@​google-github-actions-bot</code></a>
in <a
href="https://redirect.github.com/google-github-actions/setup-gcloud/pull/699">google-github-actions/setup-gcloud#699</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google-github-actions/setup-gcloud/compare/v2.1.1...v2.1.2">https://github.com/google-github-actions/setup-gcloud/compare/v2.1.1...v2.1.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/google-github-actions/setup-gcloud/commit/6189d56e4096ee891640bb02ac264be376592d6a"><code>6189d56</code></a>
Release: v2.1.2 (<a
href="https://redirect.github.com/google-github-actions/setup-gcloud/issues/699">#699</a>)</li>
<li><a
href="https://github.com/google-github-actions/setup-gcloud/commit/413dc083dd5818edda432148520965d8255c729a"><code>413dc08</code></a>
fix: update release workflows (<a
href="https://redirect.github.com/google-github-actions/setup-gcloud/issues/698">#698</a>)</li>
<li>See full diff in <a
href="https://github.com/google-github-actions/setup-gcloud/compare/f0990588f1e5b5af6827153b93673613abdc6ec7...6189d56e4096ee891640bb02ac264be376592d6a">compare
view</a></li>
</ul>
</details>
<br />

Updates `google-github-actions/get-gke-credentials` from 2.2.1 to 2.2.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google-github-actions/get-gke-credentials/releases">google-github-actions/get-gke-credentials's
releases</a>.</em></p>
<blockquote>
<h2>v2.2.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix package name by <a
href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a
href="https://redirect.github.com/google-github-actions/get-gke-credentials/pull/312">google-github-actions/get-gke-credentials#312</a></li>
<li>fix: update release workflows by <a
href="https://github.com/verbanicm"><code>@​verbanicm</code></a> in <a
href="https://redirect.github.com/google-github-actions/get-gke-credentials/pull/313">google-github-actions/get-gke-credentials#313</a></li>
<li>Release: v2.2.2 by <a
href="https://github.com/google-github-actions-bot"><code>@​google-github-actions-bot</code></a>
in <a
href="https://redirect.github.com/google-github-actions/get-gke-credentials/pull/315">google-github-actions/get-gke-credentials#315</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google-github-actions/get-gke-credentials/compare/v2.2.1...v2.2.2">https://github.com/google-github-actions/get-gke-credentials/compare/v2.2.1...v2.2.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/google-github-actions/get-gke-credentials/commit/206d64b64b0eba0a6e2f25113d044c31776ca8d6"><code>206d64b</code></a>
Release: v2.2.2 (<a
href="https://redirect.github.com/google-github-actions/get-gke-credentials/issues/315">#315</a>)</li>
<li><a
href="https://github.com/google-github-actions/get-gke-credentials/commit/0fead37d80f46cbcae8eb09300bd8186eb3b2d31"><code>0fead37</code></a>
fix: update release workflows (<a
href="https://redirect.github.com/google-github-actions/get-gke-credentials/issues/313">#313</a>)</li>
<li><a
href="https://github.com/google-github-actions/get-gke-credentials/commit/d7d8311fd5e889897561404341b15a5c01310725"><code>d7d8311</code></a>
Fix package name (<a
href="https://redirect.github.com/google-github-actions/get-gke-credentials/issues/312">#312</a>)</li>
<li>See full diff in <a
href="https://github.com/google-github-actions/get-gke-credentials/compare/6051de21ad50fbb1767bc93c11357a49082ad116...206d64b64b0eba0a6e2f25113d044c31776ca8d6">compare
view</a></li>
</ul>
</details>
<br />


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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Atif Ali <me@matifali.dev>
2024-11-05 19:43:41 +11:00
Ethan 871cc05e99 chore: add a dns.OSConfigurator implementation that uses the CoderVPN protocol (#15342)
Closes #14733.
2024-11-05 19:23:16 +11:00
Muhammad Atif Ali 076399b3bd chore: correct typos and configure permissions in pr-deploy.yaml (#15372) 2024-11-05 09:41:48 +05:00
dependabot[bot] 98e584b36f chore: bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1 (#15371)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-05 08:59:20 +05:00
Steven Masley 8024c1dff4 fix: allow workspace owners to view timings (#15364)
Anyone with authz access to a workspace should be able to read timings
information of its builds.

To do this without `AsSystemContext` would do an extra 4 db calls.
2024-11-04 20:45:43 -06:00
Muhammad Atif Ali 2cf745766c chore: use typos extension in vscode (#15136)
This synchronises the spellchecker with our CI.

We use https://github.com/crate-ci/typos in CI, so let us use typos in
vscode too.

https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode
2024-11-04 10:26:04 -08:00
Cian Johnston dc29b81286 fix(site/static/icon): add filebrowser icon (#15367)
Fixes https://github.com/coder/coder/issues/15365

We used to hit
https://raw.githubusercontent.com/filebrowser/logo/master/icon_raw.svg
for the filebrowser icon but coder/modules#334 modified the icon URL to
point to a self-hosted icon.

I simply copied the icon from the `coder/modules` repo.
2024-11-04 18:17:16 +00:00
dependabot[bot] cfc4cb07b6 chore: bump @types/node from 20.16.10 to 20.17.6 in /site (#15351) 2024-11-04 10:56:00 -07:00
Muhammad Atif Ali f25a07502a chore: fix links in README.md (#15366) 2024-11-04 22:55:40 +05:00
dependabot[bot] 735e965bdd chore: bump @types/lodash from 4.17.9 to 4.17.13 in /site (#15334) 2024-11-04 14:35:02 -03:00
Hugo Dutka 1bfa7d42e8 chore: add postgres template caching for tests (#15336)
This PR is the first in a series aimed at closing
[#15109](https://github.com/coder/coder/issues/15109).

### Changes

- **Template Database Creation:**  
`dbtestutil.Open` now has the ability to create a template database if
none is provided via `DB_FROM`. The template database’s name is derived
from a hash of the migration files, ensuring that it can be reused
across tests and is automatically updated whenever migrations change.

- **Optimized Database Handling:**  
Previously, `dbtestutil.Open` would spin up a new container for each
test when `DB_FROM` was unset. Now, it first checks for an active
PostgreSQL instance on `localhost:5432`. If none is found, it creates a
single container that remains available for subsequent tests,
eliminating repeated container startups.

These changes address the long individual test times (10+ seconds)
reported by some users, likely due to the time Docker took to start and
complete migrations.
2024-11-04 17:23:31 +01:00
Muhammad Atif Ali 1c29944862 chore: update link to licensed features in README.md (#15362) 2024-11-04 20:19:23 +05:00
dependabot[bot] ffa82659a2 chore: bump the vite group across 1 directory with 2 updates (#15321)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 15:52:11 +05:00
dependabot[bot] a8caa65124 chore: bump github.com/charmbracelet/lipgloss from 0.13.0 to 1.0.0 (#15354)
Bumps
[github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss)
from 0.13.0 to 1.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/charmbracelet/lipgloss/releases">github.com/charmbracelet/lipgloss's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.0</h2>
<h1>At last: v1.0.0</h1>
<!-- raw HTML omitted -->
<p>This is an honorary release indicating that Lip Gloss is now stable.
Thank you, open source community, for all your love, support,
contributions, and great style.</p>
<p>Stay tuned for a v2 alpha!</p>
<h2>v0.13.1</h2>
<h1>Table improvements, on stream</h1>
<p><a href="https://github.com/bashbunni"><code>@​bashbunni</code></a>
went to town in this release and fixed a bunch of bugs, mostly around
table. Best of all, she did most of it <a
href="https://www.twitch.tv/bashbunni">on stream</a>.</p>
<h2>Changelog</h2>
<h3>Table</h3>
<ul>
<li>fix(table): use table height by <a
href="https://github.com/Broderick-Westrope"><code>@​Broderick-Westrope</code></a>
in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/358">charmbracelet/lipgloss#358</a></li>
<li>fix(table): unset data rows without causing nil pointer err by <a
href="https://github.com/bashbunni"><code>@​bashbunni</code></a> in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/372">charmbracelet/lipgloss#372</a></li>
<li>fix(table): shared indices for first row of data and headers
(StyleFunc bug) by <a
href="https://github.com/bashbunni"><code>@​bashbunni</code></a> in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/377">charmbracelet/lipgloss#377</a></li>
<li>fix(table): do not shrink table with offset by <a
href="https://github.com/bashbunni"><code>@​bashbunni</code></a> in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/373">charmbracelet/lipgloss#373</a></li>
<li>fix(table): include margins for cell width by <a
href="https://github.com/bashbunni"><code>@​bashbunni</code></a> in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/401">charmbracelet/lipgloss#401</a></li>
</ul>
<h3>Other Stuff</h3>
<ul>
<li>fix(render): strip carriage returns from strings by <a
href="https://github.com/bashbunni"><code>@​bashbunni</code></a> in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/386">charmbracelet/lipgloss#386</a></li>
</ul>
<h2>Bonus</h2>
<ul>
<li>docs(example): rainbow string by <a
href="https://github.com/caarlos0"><code>@​caarlos0</code></a> in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/96">charmbracelet/lipgloss#96</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/Broderick-Westrope"><code>@​Broderick-Westrope</code></a>
made their first contribution in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/358">charmbracelet/lipgloss#358</a></li>
<li><a href="https://github.com/swrenn"><code>@​swrenn</code></a> made
their first contribution in <a
href="https://redirect.github.com/charmbracelet/lipgloss/pull/364">charmbracelet/lipgloss#364</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/charmbracelet/lipgloss/compare/v0.13.0...v0.13.1">https://github.com/charmbracelet/lipgloss/compare/v0.13.0...v0.13.1</a></p>
<hr />
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><!-- raw HTML
omitted --></p>
<p>Thoughts? Questions? We love hearing from you. Feel free to reach out
on <a href="https://twitter.com/charmcli">Twitter</a>, <a
href="https://mastodon.technology/@charm">The Fediverse</a>, or on <a
href="https://charm.sh/chat">Discord</a>.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/761d265f761271293f20f9bf62884b15f2d7c0cc"><code>761d265</code></a>
feat(deps): bump github.com/charmbracelet/x/ansi from 0.4.0 to
0.4.2</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/342e7b051b45419b6f052c1d4b83e904e14414ff"><code>342e7b0</code></a>
chore(ci): sync golangci-lint config</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/da324b123d09dc2d194c6911d440371ed463e4c8"><code>da324b1</code></a>
feat(deps): bump github.com/charmbracelet/x/ansi from 0.3.2 to
0.4.0</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/78fd6fd42f6e6b028bac3dcc8dcd9652fc15afa0"><code>78fd6fd</code></a>
chore(ci): sync golangci-lint config</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/407dc3d2cf84b9abeae83e7a12277a84ab01eab4"><code>407dc3d</code></a>
feat(ci): add lint-sync workflow</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/284c0c5c55441a0d11bd07c5496593e676f4dfd0"><code>284c0c5</code></a>
docs(list): fix list examples in godoc (<a
href="https://redirect.github.com/charmbracelet/lipgloss/issues/404">#404</a>)</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/d8581323b63a3bb43c6d5247a00353d7cbd1d236"><code>d858132</code></a>
fix(table): include margins in cell width (<a
href="https://redirect.github.com/charmbracelet/lipgloss/issues/401">#401</a>)</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/80b4221fc123fbe3374dee85216be698cf7c8556"><code>80b4221</code></a>
chore(lint): update linter (<a
href="https://redirect.github.com/charmbracelet/lipgloss/issues/405">#405</a>)</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/fa2f4b06ca711f1be00f83bc9a64d49e6bbb9ee7"><code>fa2f4b0</code></a>
docs(readme): update example screenshot with blend</li>
<li><a
href="https://github.com/charmbracelet/lipgloss/commit/68ca8486fcd181ba9d7df258c5ef0979b53090b9"><code>68ca848</code></a>
docs: update contributing guidelines (<a
href="https://redirect.github.com/charmbracelet/lipgloss/issues/396">#396</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/charmbracelet/lipgloss/compare/v0.13.0...v1.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/charmbracelet/lipgloss&package-manager=go_modules&previous-version=0.13.0&new-version=1.0.0)](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>
2024-11-04 20:28:05 +11:00
dependabot[bot] cf96d91625 chore: bump dayjs from 1.11.4 to 1.11.13 in /site (#15332)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 11:34:35 +05:00
dependabot[bot] 3796344d3f chore: bump github.com/elastic/go-sysinfo from 1.14.0 to 1.15.0 (#15353)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 11:33:50 +05:00
dependabot[bot] a1b03fa6d2 chore: bump google.golang.org/api from 0.203.0 to 0.204.0 (#15356)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 11:33:33 +05:00
dependabot[bot] 4a8fe424df chore: bump github.com/open-policy-agent/opa from 0.69.0 to 0.70.0 (#15358)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-03 22:33:18 -08:00
dependabot[bot] 56326307f2 chore: bump github.com/hashicorp/terraform-json from 0.22.1 to 0.23.0 (#15355)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 11:33:04 +05:00
dependabot[bot] 98bb560f63 chore: bump the react group across 2 directories with 2 updates (#15319)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 06:11:44 +00:00
Muhammad Atif Ali 3a5a42ffa9 chore: update workflow permissions (#15349) 2024-11-04 11:09:40 +05:00
Muhammad Atif Ali 065263a852 chore: update dependabot config and pin Docker images (#15194) 2024-11-04 11:01:54 +05:00
dependabot[bot] b529393f6f chore: bump @chakra-ui/react from 2.9.3 to 2.10.3 in /offlinedocs (#15326)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 11:01:34 +05:00
dependabot[bot] 6153880e9c chore: bump @swc/jest from 0.2.36 to 0.2.37 in /site (#15331)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 11:00:35 +05:00
dependabot[bot] 9f867a48c3 chore: bump typescript from 5.6.2 to 5.6.3 in /site (#15335)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 11:00:27 +05:00
dependabot[bot] 7b81b3fb8a chore: bump @types/lodash from 4.14.196 to 4.17.13 in /offlinedocs (#15325)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 10:55:22 +05:00
dependabot[bot] 8a72e9a4d2 chore: bump next from 14.2.14 to 14.2.16 in /offlinedocs (#15324)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 10:55:14 +05:00
dependabot[bot] 48253581ed chore: bump chromatic from 11.3.0 to 11.16.3 in /site (#15329)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 10:54:43 +05:00
Benjamin Peinhardt 040e5cf9f3 docs: provide example regexes to properly escape . characters (#14983) 2024-11-03 10:01:06 -06:00
Edward Angert 1f93b80e09 chore: fix docs/admin links and upgrade notice (#15043)
- Update links to /docs/admin to match the new structure
- TODO: remove the release string from the "upgrade available"
instructions link
- [x]
https://github.com/coder/coder/blob/update-upgrade-config-links/cli/server.go#L646


![2024-10-11_11-35-40](https://github.com/user-attachments/assets/fd95e821-d5ad-4c91-a38a-066046c7072c)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-01 19:43:51 +00:00
Stephen Kirby 399c830b51 chore(docs): add info on new build timings in docs (#15310)
Adds information on workspace build timings in workspace lifecycle and
template troubleshooting docs.
2024-11-01 12:17:50 -05:00
Bruno Quaresma e232aee011 feat(site): add agent connection timings (#15276)
Local preview:

<img width="1260" alt="Screenshot 2024-10-29 at 16 16 01"
src="https://github.com/user-attachments/assets/10fdb20d-1f2a-4b0a-a8a1-171050ee620d">


Close https://github.com/coder/internal/issues/116

---------

Co-authored-by: Danny Kopping <danny@coder.com>
2024-11-01 13:29:00 -03:00
Edward Angert 18ef954a03 docs: add new best practice doc to speed up templates and workspaces (#15296)
closes https://github.com/coder/coder/issues/14858

- [x] TODO: update `build-timeline.png`
- [x] TODO: `Best practices` doesn't show up in the sidebar until you're
actually in the doc 🤔


[preview](https://coder.com/docs/@bp-speed-up-templates/tutorials/best-practices/speed-up-templates)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
Co-authored-by: Ben Potter <ben@coder.com>
2024-11-01 11:24:35 -05:00
dependabot[bot] 13b97cf3dc chore: bump @storybook/addon-actions from 8.1.11 to 8.3.5 in /site (#15330) 2024-11-01 09:58:48 -06:00
dependabot[bot] 8da30a1e59 chore: update typescript from 5.6.2 to 5.6.3 in /offlinedocs (#15323) 2024-11-01 09:58:14 -06:00
dependabot[bot] 85f05ad396 chore: bump @types/jest from 29.5.13 to 29.5.14 in /site in the jest group (#15320) 2024-11-01 12:47:47 -03:00
Steven Masley 854044e811 chore: fix concurrent CommitQuota transactions for unrelated users/orgs (#15261)
The failure condition being fixed is `w1` and `w2` could belong
to different users, organizations, and templates and still cause a
serializable failure if run concurrently. This is because the old query 
did a `seq scan` on the `workspace_builds` table. Since that is the 
table being updated, we really want to prevent that.

So before this would fail for any 2 workspaces. Now it only fails if
`w1` and `w2` are owned by the same user and organization.
2024-11-01 11:05:49 -04:00
dependabot[bot] 47f9a8aeb8 chore: bump eslint-config-next from 14.2.14 to 14.2.16 in /offlinedocs (#15327)
Bumps
[eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next)
from 14.2.14 to 14.2.16.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">eslint-config-next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.15</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>support breadcrumb style catch-all parallel routes <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/65063">#65063</a></li>
<li>Provide non-dynamic segments to catch-all parallel routes <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/65233">#65233</a></li>
<li>Fix client reference access causing metadata missing <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70732">#70732</a></li>
<li>feat(next/image): add support for decoding prop <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70298">#70298</a></li>
<li>feat(next/image): add images.localPatterns config <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70529">#70529</a></li>
<li>fix(next/image): handle undefined images.localPatterns config in
images-manifest.json</li>
<li>fix: Do not omit alt on getImgProps return type, ImgProps <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70608">#70608</a></li>
<li>[i18n] Routing fix <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70761">#70761</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ztanner"><code>@​ztanner</code></a>, <a
href="https://github.com/agadzik"><code>@​agadzik</code></a>, <a
href="https://github.com/huozhi"><code>@​huozhi</code></a>, <a
href="https://github.com/styfle"><code>@​styfle</code></a>, <a
href="https://github.com/icyJoseph"><code>@​icyJoseph</code></a> and <a
href="https://github.com/wyattjoh"><code>@​wyattjoh</code></a> for
helping!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/3c01e3a9a17e5cc8d060b87e57d30ef544fe5dcd"><code>3c01e3a</code></a>
v14.2.16</li>
<li><a
href="https://github.com/vercel/next.js/commit/737c29e49f9532cce3da8e25d88bc82cf5f5fe9a"><code>737c29e</code></a>
v14.2.15</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/commits/v14.2.16/packages/eslint-config-next">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-config-next&package-manager=npm_and_yarn&previous-version=14.2.14&new-version=14.2.16)](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>
2024-11-01 10:14:51 -03:00
Ethan 5f60a8d9e3 fix: create contexts per sub-test to fix flake (#15314)
Flake seen here:
https://github.com/coder/coder/actions/runs/11624011543/job/32371950701

https://coder.com/blog/go-testing-contexts-and-t-parallel
2024-11-01 23:22:36 +11:00
Spike Curtis 005ea536a5 fix: fix Listen/Unlisten race on Pubsub (#15315)
Fixes #15312

When we need to `Unlisten()` for an event, instead of immediately removing the event from the `p.queues`, we store a channel to signal any goroutines trying to Subscribe to the same event when we are done. On `Subscribe`, if the channel is present, wait for it before calling `Listen` to ensure the ordering is correct.
2024-11-01 14:35:26 +04:00
Cian Johnston fbbefa228d chore(.gitignore): add .zed_server to .gitignore (#15316) 2024-11-01 09:58:52 +00:00
Mathias Fredriksson bd9151d224 fix(coderd/database/pubsub): prevent listeners read outside mutex lock (#15303)
https://github.com/coder/coder/actions/runs/11611105362/job/32331771969#logs

```
2024-10-31T11:36:45.9225038Z WARNING: DATA RACE
2024-10-31T11:36:45.9225120Z Write at 0x00c0000d8030 by goroutine 26:
2024-10-31T11:36:45.9225200Z   runtime.mapdelete()
2024-10-31T11:36:45.9225412Z       /opt/hostedtoolcache/go/1.22.8/x64/src/runtime/map.go:696 +0x0
2024-10-31T11:36:45.9225647Z   github.com/coder/coder/v2/coderd/database/pubsub.(*PGPubsub).subscribeQueue.func2()
2024-10-31T11:36:45.9225906Z       /home/runner/work/coder/coder/coderd/database/pubsub/pubsub.go:277 +0x131
2024-10-31T11:36:45.9225993Z   runtime.deferreturn()
2024-10-31T11:36:45.9226210Z       /opt/hostedtoolcache/go/1.22.8/x64/src/runtime/panic.go:602 +0x5d
2024-10-31T11:36:45.9226283Z   testing.tRunner()
2024-10-31T11:36:45.9226519Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1689 +0x21e
2024-10-31T11:36:45.9226603Z   testing.(*T).Run.gowrap1()
2024-10-31T11:36:45.9226831Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x44
2024-10-31T11:36:45.9226836Z 
2024-10-31T11:36:45.9226934Z Previous read at 0x00c0000d8030 by goroutine 112:
2024-10-31T11:36:45.9227159Z   github.com/coder/coder/v2/coderd/database/pubsub.(*PGPubsub).subscribeQueue.func2()
2024-10-31T11:36:45.9227462Z       /home/runner/work/coder/coder/coderd/database/pubsub/pubsub.go:284 +0x1b6
2024-10-31T11:36:45.9227661Z   github.com/coder/coder/v2/enterprise/replicasync.(*Manager).subscribe.func3()
2024-10-31T11:36:45.9227936Z       /home/runner/work/coder/coder/enterprise/replicasync/replicasync.go:228 +0x53
2024-10-31T11:36:45.9227941Z 
2024-10-31T11:36:45.9228019Z Goroutine 26 (running) created at:
2024-10-31T11:36:45.9228096Z   testing.(*T).Run()
2024-10-31T11:36:45.9228318Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x825
2024-10-31T11:36:45.9228498Z   github.com/coder/coder/v2/enterprise/replicasync_test.TestReplica()
2024-10-31T11:36:45.9228777Z       /home/runner/work/coder/coder/enterprise/replicasync/replicasync_test.go:33 +0x4b
2024-10-31T11:36:45.9228847Z   testing.tRunner()
2024-10-31T11:36:45.9229063Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1689 +0x21e
2024-10-31T11:36:45.9229142Z   testing.(*T).Run.gowrap1()
2024-10-31T11:36:45.9229366Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x44
2024-10-31T11:36:45.9229369Z 
2024-10-31T11:36:45.9229443Z Goroutine 112 (finished) created at:
2024-10-31T11:36:45.9229685Z   github.com/coder/coder/v2/enterprise/replicasync.(*Manager).subscribe()
2024-10-31T11:36:45.9229952Z       /home/runner/work/coder/coder/enterprise/replicasync/replicasync.go:226 +0x568
2024-10-31T11:36:45.9230092Z   github.com/coder/coder/v2/enterprise/replicasync.New()
2024-10-31T11:36:45.9230361Z       /home/runner/work/coder/coder/enterprise/replicasync/replicasync.go:101 +0x1344
2024-10-31T11:36:45.9230547Z   github.com/coder/coder/v2/enterprise/replicasync_test.TestReplica.func1()
2024-10-31T11:36:45.9230836Z       /home/runner/work/coder/coder/enterprise/replicasync/replicasync_test.go:48 +0x26a
2024-10-31T11:36:45.9230904Z   testing.tRunner()
2024-10-31T11:36:45.9231127Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1689 +0x21e
2024-10-31T11:36:45.9231207Z   testing.(*T).Run.gowrap1()
2024-10-31T11:36:45.9231431Z       /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x44
```
2024-11-01 11:24:29 +04:00
Ethan b1298a3c1e feat: add WorkspaceUpdates tailnet RPC (#14847)
Closes #14716
Closes #14717

Adds a new user-scoped tailnet API endpoint (`api/v2/tailnet`) with a new RPC stream for receiving updates on workspaces owned by a specific user, as defined in #14716. 

When a stream is started, the `WorkspaceUpdatesProvider` will begin listening on the user-scoped pubsub events implemented in #14964. When a relevant event type is seen (such as a workspace state transition), the provider will query the DB for all the workspaces (and agents) owned by the user. This gets compared against the result of the previous query to produce a set of workspace updates. 

Workspace updates can be requested for any user ID, however only workspaces the authorised user is permitted to `ActionRead` will have their updates streamed.
Opening a tunnel to an agent requires that the user can perform `ActionSSH` against the workspace containing it.
2024-11-01 14:53:53 +11:00
Ethan f941e78079 chore: add db query to retrieve workspaces & their agents (#14792)
Second PR for #14716.

Adds a query that, given a user ID, returns all the workspaces they own, that can also be `ActionRead` by the requesting user.

```
type GetWorkspacesAndAgentsByOwnerIDRow struct {
	WorkspaceID      uuid.UUID            `db:"workspace_id" json:"workspace_id"`
	WorkspaceName    string               `db:"workspace_name" json:"workspace_name"`
	JobStatus        ProvisionerJobStatus `db:"job_status" json:"job_status"`
	Transition       WorkspaceTransition  `db:"transition" json:"transition"`
	Agents           []AgentIDNamePair    `db:"agents" json:"agents"`
}
```
 `JobStatus` and `Transition` are set using the latest build/job of the workspace. Deleted workspaces are not included.
2024-11-01 14:36:12 +11:00
Ethan 31506e694b chore: send workspace pubsub events by owner id (#14964)
We currently send empty payloads to pubsub channels of the form `workspace:<workspace_id>` to notify listeners of updates to workspaces (such as for refreshing the workspace dashboard).

To support https://github.com/coder/coder/issues/14716, we'll instead send `WorkspaceEvent` payloads to pubsub channels of the form `workspace_owner:<owner_id>`. This enables a listener to receive events for all workspaces owned by a user.
This PR replaces the usage of the old channels without modifying any existing behaviors.

```
type WorkspaceEvent struct {
	Kind        WorkspaceEventKind `json:"kind"`
	WorkspaceID uuid.UUID          `json:"workspace_id" format:"uuid"`
	// AgentID is only set for WorkspaceEventKindAgent* events
	// (excluding AgentTimeout)
	AgentID *uuid.UUID `json:"agent_id,omitempty" format:"uuid"`
}
```

We've defined `WorkspaceEventKind`s based on how the old channel was used, but it's not yet necessary to inspect the types of any of the events, as the existing listeners are designed to fire off any of them.

```
WorkspaceEventKindStateChange     WorkspaceEventKind = "state_change"
WorkspaceEventKindStatsUpdate     WorkspaceEventKind = "stats_update"
WorkspaceEventKindMetadataUpdate  WorkspaceEventKind = "mtd_update"
WorkspaceEventKindAppHealthUpdate WorkspaceEventKind = "app_health"

WorkspaceEventKindAgentLifecycleUpdate  WorkspaceEventKind = "agt_lifecycle_update"
WorkspaceEventKindAgentLogsUpdate       WorkspaceEventKind = "agt_logs_update"
WorkspaceEventKindAgentConnectionUpdate WorkspaceEventKind = "agt_connection_update"
WorkspaceEventKindAgentLogsOverflow     WorkspaceEventKind = "agt_logs_overflow"
WorkspaceEventKindAgentTimeout          WorkspaceEventKind = "agt_timeout"
```
2024-11-01 14:17:05 +11:00
Colin Adler 088f21965b feat: add audit logs for dormancy events (#15298) 2024-10-31 17:55:42 -05:00
Mathias Fredriksson 14565615be test(coderd/database/pubsub): fix data race in err assignment (#15306) 2024-10-31 22:37:19 +02:00
Danielle Maywood 330acd1270 chore: create ResourceNotificationMessage and AsNotifier (#15301)
Closes https://github.com/coder/coder/issues/15213

This PR enables sending notifications without requiring the auth system
context, instead using a new auth notifier context.
2024-10-31 17:01:51 +00:00
Steven Masley 9d03e0429f fix: workspaces query to correctly user username from users table (#15305)
The subquery on the users table was incorrectly using the username from
the `workspaces` table, not the `users` table.

This passed `sqlc-vet` because the column did exist in the query, it
just was not the correct one.
2024-10-31 12:33:07 -04:00
Bruno Quaresma 4849b4d8ac refactor(site): refactor DAU chart to avoid seat consumption focus (#15307)
Related to
[https://github.com/coder/coder/issues/15297](https://github.com/coder/coder/issues/15297#issuecomment-2450052538)

- Clearly display this as Daily Active Users
- Remove the user limit bar at the top for licensed deployments
- Explain in the tooltip that this is for measuring user activity and
has no connection to license consumption
2024-10-31 12:26:30 -03:00
Mathias Fredriksson 6e54bd9183 test(coderd/notifications): fix data race in tests and smpttest (#15304) 2024-10-31 15:48:49 +02:00
Cian Johnston 591cefa428 fix(coderd/provisionerdserver): prevent NPE if no user link exists (#15289) 2024-10-30 19:16:59 +00:00
Colin Adler 3de98c25db feat: add prometheus metric for tracking user statuses (#15281) 2024-10-30 18:41:16 +00:00
Stephen Kirby e9fbfcc45b chore(docs): include custom roles examples and mention of password reset (#15294)
Added example custom roles for admin inspiration, mention of headless
authentication use case, and user-activated password reset.
2024-10-30 11:41:52 -05:00
Kayla Washburn-Love 85ff8e0267 chore: tweak e2e test timeouts (#15275) 2024-10-30 10:07:19 -06:00
Ethan 371a2e12ab fix: check correct default during template push from stdin (#15293)
I used the wrong default in #14643 - not sure how or why I didn't catch
that..
2024-10-30 15:05:10 +00:00
Steven Masley 144d3f3e3d chore: record lifecycle duration metric to prometheus (#15279)
`autobuild_execution_duration_seconds` keeps track of how long autobuild
takes and exposes it via prometheus histogram
2024-10-30 10:20:47 -04:00
Muhammad Atif Ali afacb07140 chore: tighten GitHub workflow permissions (#15282) 2024-10-30 16:17:42 +05:00
Muhammad Atif Ali df6afd3354 fix(install.sh): fix installation script for remote hosts (#15288) 2024-10-30 15:49:28 +05:00
Danielle Maywood 823a2ea22e chore(cli): drop 'notification' prefix for configuring email auth (#15270)
Closes https://github.com/coder/coder/issues/14644
2024-10-30 10:06:10 +00:00
Stephen Kirby 25738388d5 chore(docs): add documentation on custom roles (#15280)
These docs were overwritten in the restructure merge.
2024-10-29 20:58:26 -05:00
Kayla Washburn-Love bbd2dd80e2 fix: show template name on workspace page when template display name is unset (#15262) 2024-10-29 12:30:13 -06:00
Garrett Delfosse d83f4eb076 fix: stop activity bump if no tracked sessions (#15237)
Part of https://github.com/coder/coder/issues/15176

I originally kept this the same because I wanted to be conservative
about when we start dropping activity, but this is proving to be a
problem when using `coder ssh` with `--usage-app=disabled`. Because the
workspace agent still counts this as a connection (I think it still
should so it's counted somewhere) but not as a SSH / IDE session. This
leads to background ssh tasks that want to be untracked still continuing
to bump activity when it shouldn't. This makes it so we have to have an
explicit session to bump activity.
2024-10-29 18:08:24 +00:00
Colin Adler ceb168be95 fix(flake.nix): remove preBuild to fix building on Linux (#15259) 2024-10-29 12:57:13 -05:00
Jon Ayers 097fdaffe2 chore: add quota to source-controlled template (#15271) 2024-10-29 16:31:46 +00:00
Bruno Quaresma 3c7808c575 fix(site): update workspace timings to use theme colors (#15269)
Fix https://github.com/coder/coder/issues/15266

After fix:
<img width="1210" alt="Screenshot 2024-10-29 at 09 37 02"
src="https://github.com/user-attachments/assets/35ff0361-6323-4e26-b4f2-05da6f1651c6">
<img width="1200" alt="Screenshot 2024-10-29 at 09 36 49"
src="https://github.com/user-attachments/assets/c2e55364-9f21-4bd1-bda6-aedf106a9742">
<img width="1202" alt="Screenshot 2024-10-29 at 09 36 40"
src="https://github.com/user-attachments/assets/2d0222d9-cf25-4ef9-8d74-f426fbae7bec">
2024-10-29 13:02:24 -03:00
Joobi S B 7982ad7659 feat: expose premium trial form via CLI (#15054)
This PR closes https://github.com/coder/coder/issues/14856
2024-10-29 13:02:20 +00:00
Danielle Maywood 78ff375fed feat: log when attempted password resets fail (#15267)
Closes https://github.com/coder/coder/issues/15154

Log when someone attempts to either
- Request a one-time passcode for an account that doesn't exist
- Attempt to change a password with an invalid one-time passcode and/or
email

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2024-10-29 12:19:56 +00:00
Bruno Quaresma 4cad6f75a9 fix(site): fix workspace timings verbiage (#15268) 2024-10-29 09:05:41 -03:00
Danielle Maywood 4e20eea9e6 chore: remove unused 'must_reset_password' column (#15265)
Closes https://github.com/coder/internal/issues/153

Remove the 'must_reset_password' as it was introduced for use in the
"forgot password?" flow but never used.
2024-10-29 09:57:40 +00:00
Michael Smith 1d925ab043 fix: ensure user admins can always see users table (#15226)
Closes #15212

## Changes made
- Updated logic so that proxy config is only requested when appropriate,
instead of for all users on all deployment pages
- Split up the main context provider for the `/deployment` and
`/organizations` routes, and updated layout logic for
`ManagementSettingsLayout` layout component. This ensures the sidebar is
always visible, even if request errors happen
- Added additional routing safeguards to make sure that even if a user
can view one page in the deployment section, they won't be able to
navigate directly to any arbitrary deployment page
- Updated logic for sidebar navigation to ensure that nav items only
appear when the user truly has permission
- Centralized a lot of the orgs logic into the `useAuthenticated` hook
- Added additional check cases to the `permissions.tsx` file, to give
more granularity, and added missing type-checking
- Extended the API for the `RequirePermissions` component to let it
redirect users anywhere
- Updated some of our testing setup files to ensure that types were
defined correctly

---------

Co-authored-by: McKayla Washburn <mckayla@hey.com>
2024-10-29 01:06:33 -04:00
Jon Ayers fd60e1c2ba fix: fix security workflow not installing protoc properly (#15263) 2024-10-29 01:30:43 +00:00
Stephen Kirby 971388762c chore(docs): change mentions of enterprise to premium (#15258)
Matches our latest licensing verbiage.
2024-10-28 15:56:51 -05:00
dependabot[bot] 742413e149 chore: bump google.golang.org/api from 0.202.0 to 0.203.0 (#15246)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 20:47:19 +00:00
Jon Ayers fb4219f57d fix: parse int to correct bit size (#15257) 2024-10-28 20:31:01 +00:00
Colin Adler 074faec7d7 chore: update Terraform to 1.9.8 (#15256) 2024-10-28 15:24:57 -05:00
Colin Adler 516ba9e28e chore: update Go to 1.22.8 (#15255) 2024-10-28 15:09:43 -05:00
Steven Masley 7cb20d7b26 chore: name unlabeled db transaction metrics (#15251) 2024-10-28 13:15:29 -04:00
dependabot[bot] ecb22461bb chore: bump github.com/gohugoio/hugo from 0.134.1 to 0.136.5 (#15247)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 17:13:51 +00:00
dependabot[bot] 1636124ed1 chore: bump github.com/fatih/color from 1.17.0 to 1.18.0 (#15248)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 17:11:31 +00:00
dependabot[bot] cdd40fb292 ci: bump the github-actions group with 2 updates (#15245)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 21:59:30 +05:00
Ethan 1d33990e78 fix: ensure make gen runs on any changes (#15253)
Previously, `make gen` ran on CI whenever a non-docs change was made.
Based off the problem described in #15252, it sounds like CI should
*always* be running `gen`.

(Because I broke it, currently PR `gen` is getting skipped unless the
`ci` category is updated)
2024-10-29 03:46:18 +11:00
Vincent Vielle 95a348ecc7 fix(coderd): improve use case handling in notifier for appearance fetchers (#15242)
Fixing #15241 & add tests.
2024-10-28 16:53:20 +01:00
Ethan 03940f5fef chore: ensure make gen runs on CI when docs are updated (#15252)
https://github.com/coder/coder/pull/15203 was merged with a failing
`make gen`, as it only updated the docs. This makes it so this can't
happen again.

The capitalization of the Go type used in the auto-generated docs
(`codersdk.OAuth2GithubConfig`) wasn't updated as it would technically
be a breaking change for the sdk.
2024-10-28 15:22:37 +00:00
Edward Angert 007f0a35a4 fix: adjust instances of Github to GitHub (#15203)
s/Github/GitHub

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-10-28 07:43:30 -04:00
Phorcys c8f68cbc46 feat: use hashicorp/cloud-init provider for AWS-linux example (#15240)
Same as #15050 but for the `aws-linux` template.
Tested, works as expected.
2024-10-28 07:43:45 +00:00
Phorcys 91c337a2ff feat: use hashicorp/cloud-init provider in AWS devcontainer template (#15050)
This PR makes templates uses the
[hashicorp/cloud-init](https://registry.terraform.io/providers/hashicorp/cloudinit/latest/docs)
provider instead of hardcoding a cloud-init config.
2024-10-27 13:17:03 +00:00
Steven Masley 9308331d9a chore: change promtheus label to 'tx_id' (#15238)
the 'id' label was not coming through. Maybe it's reserved? Or used in
the chain somewhere.
2024-10-25 18:50:42 -04:00
Steven Masley e03ef62a13 chore: add scim service provider config endpoint (#15235)
Adds a static `/scim/v2/ServiceProviderConfig` endpoint. Our scim
support is static, so the response config is also defined statically.
2024-10-25 18:27:34 -04:00
Colin Adler 27f5ff2dd1 chore: correctly document SCIM authentication (#15234) 2024-10-25 12:40:13 -05:00
Steven Masley 900e2cd39c chore: implement better 404 for unimplemented scim endpoints (#15232)
Prior to this, html was returned.
2024-10-25 13:23:12 -04:00
Colin Adler 487b37b228 feat(enterprise): support bearer tokens in SCIM authentication (#15233) 2024-10-25 11:52:57 -05:00
Garrett Delfosse 0dd942e197 fix: stop incrementing activity on empty agent stats (#15204) 2024-10-25 16:49:44 +00:00
Jon Ayers cd890aa3a0 feat: enable key rotation (#15066)
This PR contains the remaining logic necessary to hook up key rotation
to the product.
2024-10-25 17:14:35 +01:00
Steven Masley ccfffc6911 chore: add tx metrics and logs for serialization errors (#15215)
Before db_metrics were all or nothing. Now `InTx` metrics are always recorded, and query metrics are opt in.


Adds instrumentation & logging around serialization failures in the database.
2024-10-25 12:14:15 -04:00
Cian Johnston df34858c3c chore(coderd): extract fileszip to package archive for reuse (#15229)
Related to https://github.com/coder/coder/issues/15087
As part of sniffing the workspace tags from an uploaded file, we need to
be able to handle both zip and tar files. Extracting the functions to
a separate `archive` package will be helpful here.
2024-10-25 15:14:39 +01:00
Cian Johnston 5ad47471b5 chore(provisioner/terraform): extract terraform parsing logic to package tfparse (#15230)
Related to https://github.com/coder/coder/issues/15087

Extracts the logic for extracting variables and workspace tags
to a separate package `tfparse`.

---------

Co-authored-by: Danielle Maywood <danielle@themaywoods.com>
2024-10-25 14:48:12 +01:00
Spike Curtis d9f1aafa94 fix: stop logging errors on cancel in notifier (#15186)
fixes https://github.com/coder/internal/issues/121

We shouldn't log errors when context is canceled, e.g. on shutdown.  This breaks our tests and alarms customers needlessly.
2024-10-25 16:28:54 +04:00
Cian Johnston 5bcaa93198 chore(enterprise/coderd/license): fix time-related flake in license expiration warning test (#15228)
Fixes a time-related test flake in enterprise/coderd/license/license_test.go
2024-10-25 12:19:50 +01:00
Eric Paulsen b62f3e6af5 feat(helm): add topologySpreadConstraints value (#15168) 2024-10-25 09:14:39 +01:00
Vincent Vielle e5668720b8 fix(coderd): improve password update logic (#15210)
Working on #15202

The main change is to fetch the user doing the action to verify if it
should be able to change the password if there's no old_password set.
2024-10-24 22:48:15 +02:00
Steven Masley f258232be9 chore: return json for disabled scim routes (#15222)
Customers reporting html pages returned to SCIM. Likely a disabled SCIM.
We should just report a more consumable error by the SCIM provider.

Previous behavior was a status code 200 HTML page
2024-10-24 16:26:16 -04:00
Garrett Delfosse 81e99bec6b fix: close server pty connections on client disconnect (#15201) 2024-10-24 15:12:35 -04:00
Colin Adler 69c1d981e3 fix(site): sanitize login redirect (#15208) 2024-10-24 13:59:26 -05:00
Charlie Voiselle 7efdf811ae chore: fix incorrect quote in Workspace Delete confirmation modal (#15216)
Tiny PR to change left-hand double quote on right side to right-hand double quote.
2024-10-24 14:43:10 -04:00
Danielle Maywood 095c9797c9 feat: notify users on template deprecation (#15195)
Closes https://github.com/coder/coder/issues/15117

Notify users when a template has been deprecated.
2024-10-24 13:12:12 +01:00
Jon Ayers bcd68ee249 fix: fix build in security workflow (#15209)
- Fixes an issue where building the Docker image failed due to moving
the directory hosting the Dockerfile
- Removed the Palo Alto scanning since our subscription there is set to
expire. Trivy is still running though.
2024-10-24 01:21:18 +01:00
Steven Masley 163631e79c chore: use system context for fetching template information (#15205)
The authz check is Update() on the original template. This is not ideal,
but it follows the existing behavior. We are implicitly granting this
read access since template admins need to be able to see what
users/groups exist to assign.
2024-10-23 17:03:17 -05:00
Cian Johnston fed70bdeb8 fix(helm/coder): set serviceAccount.disableCreate=false by default, add tests (#15197)
* Sets `serviceaccount.disableCreate=false` by default (accidentally
changed by #14817)
* Reverts changes made in https://github.com/coder/coder/pull/15196
2024-10-23 21:11:02 +01:00
Edward Angert 0fba291ffe docs: add date to Quickstart guide (#15199)
and try to trick the CI into passing + building the page 😬

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-10-23 12:56:17 -05:00
Ethan 57386ed677 fix: make helm golden files to fix ci (#15196)
The go tests that would have checked for the outdated golden files
didn't get run as part of https://github.com/coder/coder/pull/14817
because only `helm/**` files were modified.
2024-10-23 08:38:52 -07:00
Edward Angert ed5da65a54 chore(docs): add Quickstart doc to tutorials (#14744)
New doc to get users up and running quickly

preview: https://coder.com/docs/@quickstart-guide/tutorials/quickstart

## To Do

- [x] update or remove Codium steps
- [x] add to sidebar
- [x] add to README and others as needed
- [x] reference https://github.com/coder/coder/pull/11946 and the
discussion to influence this PR

closes https://github.com/coder/internal/issues/107

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-10-23 11:31:29 -04:00
Edward Angert d7baa49d6d docs: add primary to wsproxy ls (#15185)
Add primary to `coder wsproxy ls` results in
<https://coder.com/docs/admin/networking/workspace-proxies#step-2-deploy-the-proxy>

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-10-23 11:15:55 -04:00
Edward Angert 20a9e9bdfb chore(docs): remove workspace proxy map (#15070)
remove workspace proxy map

- replace later with another image or diagram

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-10-23 11:15:32 -04:00
Bruno Quaresma d89ecebb4e feat(site): add workspace timings (#15068)
Demo:

https://github.com/user-attachments/assets/046a7224-48e4-4e66-a2ff-a8e1252ad18b
2024-10-23 10:09:37 -03:00
MaxTNielsen cd92220ab8 feat(helm): add setting to disable service account creation (#14817)
Add a setting to disable service account creation
2024-10-23 13:25:57 +01:00
dependabot[bot] b828412edd chore: bump google.golang.org/api from 0.201.0 to 0.202.0 (#15188)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 03:05:58 -07:00
Cian Johnston 84f0cf215f chore(docs): update external provisioners helm docs (#15155)
Closes https://github.com/coder/coder/issues/14985

Updates external provisioner documentation to show steps for using
provisioner keys via Helm:

---------

Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2024-10-23 09:25:53 +01:00
dependabot[bot] f61c59fed9 chore: bump github.com/unrolled/secure from 1.14.0 to 1.17.0 (#15187)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 07:54:32 +00:00
dependabot[bot] b7f9c1aa2e chore: bump google.golang.org/api from 0.200.0 to 0.201.0 (#15162)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 07:51:05 +00:00
dependabot[bot] d613390162 chore: bump gopkg.in/DataDog/dd-trace-go.v1 from 1.68.0 to 1.69.0 (#15160)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 07:50:28 +00:00
dependabot[bot] 6cad5dbd52 chore: bump github.com/chromedp/chromedp from 0.10.0 to 0.11.0 (#15159)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 07:49:20 +00:00
dependabot[bot] fa6c859e83 chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.27 to 1.28.0 (#15161)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 07:48:52 +00:00
dependabot[bot] eabf618479 chore: bump go.uber.org/mock from 0.4.0 to 0.5.0 (#15163)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 07:48:20 +00:00
dependabot[bot] b67a850659 ci: bump the github-actions group with 4 updates (#15158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 12:40:46 +05:00
Spike Curtis 32d5875fa4 fix: wait for server tailnet background routines to exit on Close (#15183)
fixes https://github.com/coder/internal/issues/114

We need to wait for ServerTailnet goroutines to finish when closing down, otherwise we can race with the shutdown of coderd & the coordinator, which causes errors.
2024-10-23 10:09:56 +04:00
Steven Masley 343f8ec9ab chore: join owner, template, and org in new workspace view (#15116)
Joins in fields like `username`, `avatar_url`, `organization_name`,
`template_name` to `workspaces` via a **view**. 
The view must be maintained moving forward, but this prevents needing to
add RBAC permissions to fetch related workspace fields.
2024-10-22 09:20:54 -05:00
Danielle Maywood 5076161078 fix: show audit logs for forgot password flow (#15181)
Fixes https://github.com/coder/coder/issues/15150

Audit logs for requesting a password reset, and a user updating their
password, now show up in the audit log.
2024-10-22 13:47:30 +01:00
Vincent Vielle 297089e944 feat(coderd): add company logo when available for email notifications (#14935)
This PR aims to close #14253 

We keep the default behavior using the Coder logo if there's no logo
set.
Otherwise we want to use the logo based on the URL set in appearance.

---------

Co-authored-by: defelmnq <yvincent@coder.com>
2024-10-22 14:06:19 +02:00
Cian Johnston c42f487668 fix(helm/provisioner): fail if psk and key are both set (#15157)
Relates to https://github.com/coder/coder/issues/14985

Context:
https://github.com/coder/coder/pull/15122#discussion_r1808458819

Specifying both `provisionerDaemon.pskSecretName` and
`provisionerDaemon.keySecretName` will now result in an error.

This prevents a potential `CrashLoopBackoff` debug session due to the
following error:

```
error: cannot provide both provisioner key --key and pre-shared key --psk
```
2024-10-22 08:38:47 +01:00
Bruno Quaresma 76bfa9ba17 fix(site): fix validation server error on change password form (#15170)
Before:


![image](https://github.com/user-attachments/assets/4fd83c78-4d30-4a92-af2c-7c986a03b426)

After:

<img width="528" alt="Screenshot 2024-10-21 at 13 07 34"
src="https://github.com/user-attachments/assets/797ddeaa-8fb4-4d22-9a1b-93809b92432b">


Fix https://github.com/coder/coder/issues/15152
2024-10-21 16:22:29 +00:00
Cian Johnston 212aeff724 fix(cli): fix potential panic in traceError if unwrapped err is nil (#15166)
Seen while investigating #12721:

Root cause was a developer error, but this definitely shouldn't panic.

Before:
```
/ # coder stat
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1f12eb0]

goroutine 1 [running]:
github.com/coder/coder/v2/cli.traceError({0x90e89a0?, 0x40007a8210})
        /home/runner/work/coder/coder/cli/root.go:1119 +0x70
github.com/coder/coder/v2/cli.cliHumanFormatError({0x40003065a0, 0x1c8}, {0x90e89a0, 0x40007a8210}, 0x40007a81e0?)
        /home/runner/work/coder/coder/cli/root.go:985 +0x190
github.com/coder/coder/v2/cli.cliHumanFormatError({0x40000d0f00, 0x139}, {0x90e89a0, 0x40007a81e0}, 0x40001c4480?)
        /home/runner/work/coder/coder/cli/root.go:985 +0x1d8
github.com/coder/coder/v2/cli.cliHumanFormatError({0x40000d0b40, 0xf}, {0x90e5f00, 0x40006a3a80}, 0x90e5d40?)
        /home/runner/work/coder/coder/cli/root.go:985 +0x1d8
github.com/coder/coder/v2/cli.cliHumanFormatError({0x0, 0x0}, {0x90e5ce0, 0x40003b14c0}, 0x2?)
        /home/runner/work/coder/coder/cli/root.go:985 +0x1d8
github.com/coder/coder/v2/cli.formatRunCommandError(0x40007a8108, 0x400079fce7)
        /home/runner/work/coder/coder/cli/root.go:1057 +0x30c
github.com/coder/coder/v2/cli.cliHumanFormatError({0x0, 0x0}, {0x90e5ec0, 0x40007a8108}, 0xaa0aed0?)
        /home/runner/work/coder/coder/cli/root.go:980 +0xe0
github.com/coder/coder/v2/cli.cliHumanFormatError({0x0, 0x0}, {0x90e5160, 0x40007a8120}, 0x90e50e0?)
        /home/runner/work/coder/coder/cli/root.go:966 +0x144
github.com/coder/coder/v2/cli.(*PrettyErrorFormatter).Format(0x400079fda0, {0x90e5160?, 0x40007a8120?})
        /home/runner/work/coder/coder/cli/root.go:927 +0x48
github.com/coder/coder/v2/cli.(*RootCmd).RunWithSubcommands(0x400068ed80, {0x400053a2c8, 0x30, 0x57})
        /home/runner/work/coder/coder/cli/root.go:175 +0x278
main.main()
        /home/runner/work/coder/coder/enterprise/cmd/coder/main.go:11 +0x40
```

After:
```
Encountered an error running "coder stat", see "coder stat --help" for more information
error: <nil>
```
2024-10-21 17:12:57 +01:00
Danielle Maywood 23f61c68b4 fix: urlencode email in reset password link (#15167)
Fixes https://github.com/coder/coder/issues/15151

This runs `urlencode` (provided by `text/template`) on the email address
in the link. This ensures the link will work if a user has an email in
the form `user+label@example.com`.
2024-10-21 16:09:59 +01:00
Danielle Maywood 13f6645ab9 fix(cli): improve container detection when cgroupns=private (#15156)
Fixes https://github.com/coder/coder/issues/12721

If a container in docker is started with `--cgroupns=private` (which is
the default behaviour in docker) then `/proc/1/cgroup` has the following
content:
```
0::/
```

If a container in docker is started with `--cgroupns=host` then
`/proc/1/cgroup` has the following content (hash will vary):
```
0::/docker/aa86ac98959eeedeae0ecb6e0c9ddd8ae8b97a9d0fdccccf7ea7a474f4e0bb1f
```

Currently we are determining if a host is containerized by assuming the
second scenario. This means the existing behaviour of sniffing
`/proc/1/cgroup` is not always sufficient for checking if a host is
containerized.

According to [the cgroups(7)
man-page](https://man7.org/linux/man-pages/man7/cgroups.7.html) there
exists a `cgroup.type` file in a nonroot cgroup. This exists in Linux
versions after `4.14`.

> Linux 4.14 added thread mode for cgroups v2.

> With the addition of thread mode, each nonroot cgroup now contains a
new file, cgroup.type

This means we can check for the existence of
`/sys/fs/cgroup/cgroup.type` to see if we are in a container or not.
2024-10-21 15:28:32 +01:00
Ethan c5a4095610 fix: include custom agent headers in tailnet to support DERP connections (#15145)
Fixes #15131.
2024-10-21 20:59:21 +11:00
Spike Curtis 29099d4727 chore: refactor notifier to use quartz.TickerFunc (#15134)
In investigating https://github.com/coder/internal/issues/109 I noticed many of the notification tests are still using `time.Sleep` and `require.Eventually`. This is an initial effort to start converting these to Quartz.

One product change is to switch the `notifier` to use a `TickerFunc` instead of a normal Ticker, since it allows the test to assert that a batch process is complete via the Quartz `Mock` clock.  This does introduce one slight behavioral change in that the notifier waits the fetch interval before processing its first batch.  In practice, this is inconsequential: no one will notice if we send notifications immediately on startup, or just a little later.

But, it does make a difference to some tests, which are fixed up here.
2024-10-21 12:07:19 +04:00
Spike Curtis 8c8bd3141f chore: stop creating coderd for notification unit tests (#15133)
A bunch of notification tests create a whole `coderd`, when all they use is the database and logger.  This makes the tests more expensive to run, and pollutes the test logs with a bunch of stuff that doesn't matter (e.g. tailnet).
2024-10-21 10:39:37 +04:00
Danny Kopping b9d441ff5f fix: use concurrency-safe bytes buffer to avoid race (#15142)
Fixes https://github.com/coder/internal/issues/93

`bytes.Buffer` is not concurrency-safe.

`cmd` could write to the buffer concurrently while we're reading the
buffer in

```
require.Eventually(t, func() bool {
	return bytes.Contains(output.Bytes(), []byte("ERROR: Downloaded agent binary returned unexpected version output"))
}, testutil.WaitShort, testutil.IntervalSlow)
```

Not sure about the `os: process already finished` flake, though.

---------

Signed-off-by: Danny Kopping <danny@coder.com>
2024-10-21 17:24:18 +11:00
Ethan 9b8e707517 chore: skip ssh exec-ing test on windows (#15146)
See coder/internal#117
2024-10-21 04:17:20 +00:00
Kayla Washburn-Love d2c1562a94 chore: cleanup some query handling (#15130) 2024-10-18 11:35:55 -06:00
Bruno Quaresma aaa1223408 feat(site): add forgot password link (#15108)
Demo:

https://github.com/user-attachments/assets/139eb8c0-5bd6-4bbd-8064-a4acc526afda
2024-10-18 09:50:22 -03:00
Cian Johnston 413928b57a feat(helm/provisioner): add support for provisioner keys, add note re psk (#15122)
- Adds `provisionerDaemon.keySecretName` and
`provisionerDaemon.keySecretKey`
- Omitting `provisionerDaemon.pskSecretName` will now cause the PSK
secret to no longer be created.
- Adds a note in `NOTES.txt` regarding provisioner PSKs.
- Adds validation that either `provisionerDaemon.keySecretName` or
`provisionerDaemon.pskSecretName` is specified, and will fail the
install in this case.
2024-10-18 11:33:33 +01:00
Spike Curtis d18e8304d6 fix: reduce parallelism and increase worker size on go-test-race (#15106)
Sets parallelism on go-test-race to 4 concurrent tests and 4 concurrent
packages. Increases to 16-core runner.
2024-10-18 10:45:31 +04:00
jatin 7f98fa3abb chore: remove duplicated harden-runner step (#15127) 2024-10-17 13:12:57 -05:00
Garrett Delfosse b54950cc6e fix: order provisioner keys by creation date (#15125)
Closes https://github.com/coder/internal/issues/110

The flake reported in the issue has already been fixed by
https://github.com/coder/coder/pull/14875, but this further covers that
we return a list the same order every time.
2024-10-17 13:57:52 -04:00
Garrett Delfosse 5f640eb219 fix: correct connection_median_latency_ms in query (#15086)
Closes https://github.com/coder/coder/issues/14805
2024-10-17 12:22:26 -04:00
Ethan c81fd1d868 fix: correct default wsproxy table columns (#15124)
Closes #15123
2024-10-17 13:09:53 +00:00
Marcin Tojek bab17a3556 test: improve logging around TestAgentScript (#15121) 2024-10-17 13:06:34 +02:00
Joobi S B 5ebc748e94 feat: allow promoting an existing template version to active from CLI (#15051)
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-10-17 14:15:14 +05:00
Ethan 46cce333b1 fix: check unstaged files during ci lint (#15120) 2024-10-17 05:37:43 +00:00
Kayla Washburn-Love 40fb57aa23 chore: turn e2e enterprise tests into e2e premium tests (#14979) 2024-10-16 16:54:30 -06:00
Vincent Vielle 02f6203dc7 chore(cli): rename build options to ephemeral parameters in cli (#15030)
This PR aims to rename `build-option` to `ephemeral-parameters` based on
#10488 conversation.

`build-option` has been renamed `ephemeral-parameter` and can be used to
define a value for an ephemeral parameter in the template.

`build-options` has been renamed `prompt-ephemeral-parameters` and can
be used to prompt the user to put values for the ephemeral parameters in
the template.

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: defelmnq <yvincent@coder.com>
2024-10-16 23:54:12 +02:00
Colin Adler 512cbf1682 chore: update github.com/gomarkdown/markdown (#15112) 2024-10-16 20:03:12 +00:00
Sas Swart dfb6bfa4d2 fix(coderd/notifications): exclude unset fields from notifications (#15110)
This PR will ensure that optional fields are ignored when they are unset
in user account related templates.
2024-10-16 21:53:24 +02:00
Jon Ayers f537193682 chore: refactor keycache implementation to reduce duplication (#15100) 2024-10-16 20:01:45 +01:00
Muhammad Atif Ali 8e254cbb07 chore: integrate step-security/harden-runner in workflows (#15099)
Redoing #15097
Part of #14879
2024-10-16 11:23:00 -07:00
Vincent Vielle ccbb687ca0 feat(cli): extend duration to longer units (#15040)
This PR is a proposal to improve the situation described in #14750 

For some precise commands - we would like to be able to use durations
bigger than hours, minutes..

This PR extends the Duration proposed by Go with : 
- `d` - a day or 24hours.
- `y` - a year or 365 days.

I also removed the default value for lifetime and instead fetch the
maxLifetime value from codersdk - so by default if no value set we use
the value defined in the config.
2024-10-16 17:02:56 +02:00
Steven Masley 774c9ddc64 test: add logging to TestWorkspaceActivityBump/Dial (#15089)
Added logging information to output timing information of this for
loop. If we get another failure, this timing information should be
helpful.

I also made the time drift allowed (was 10s) to match the maximum
waiting time of the for loop. It's not perfect, but now the loop should
take max ~15s, and the time comparison will allow 15s leeway.
2024-10-16 10:01:48 -05:00
Marcin Tojek 416d67ba2c test: use barrier in TestInflightDispatchesMetric (#15107)
Fixes: https://github.com/coder/internal/issues/109
2024-10-16 14:12:19 +02:00
Marcin Tojek 21feb42fc4 test: ignore slog errors in TestUserLatencyInsights (#15105) 2024-10-16 13:20:28 +02:00
Spike Curtis d676ad56fe chore: log provider stack traces on text file busy (#15078)
re: #14726

If we see "text file busy" in the errors while initializing terraform,
attempt to query the pprof endpoint set up by
https://github.com/coder/terraform-provider-coder/pull/295 and log at
CRITICAL.

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2024-10-16 14:29:09 +04:00
Spike Curtis a77c9079af fix: pin shfmt to 3.7.0 in dogfood to match CI (#15103)
Pins our dogfood Dockerfile to match CI version of `shfmt`
2024-10-16 14:17:27 +04:00
Marcin Tojek 2564f9c823 test: scaletest/reconnectingpty: use TerminalReader (#15079)
Fixes: https://github.com/coder/internal/issues/98
2024-10-16 11:10:32 +02:00
Spike Curtis 687b4dd41c fix: match go version in go.mod and CI (#15104)
Causing CI to re-download Go to match the version in go.mod, and failing
on Windows, e.g.
https://github.com/coder/coder/actions/runs/11361195564/job/31600881001
2024-10-16 12:23:48 +04:00
Cian Johnston 29763b1b4c chore(docs): add notes regarding provisioner tags and untagged jobs (#15081)
Relates to https://github.com/coder/coder/issues/15047

---------

Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2024-10-16 09:22:39 +01:00
Sas Swart 75b5d71216 fix(docs): fix a typo in the devcontainer documentation (#15102)
This PR fixes a minor typo in our documentation:
https://coder.com/docs/admin/templates/managing-templates/devcontainers
2024-10-16 10:05:31 +02:00
Sas Swart fac77f956e fix(coderd/notifications): simplify TemplateWorkspaceManualBuildFailed (#15067)
This PR closes #15065.

As advised by @mtojek, a template's display name may be set to "", which
is not useful in an email notification. We'd like to provide a friendly
name for the template, but it also needs to be identifiable.

As such, we fall back to template.Name in the case that the template's
display name is empty.
2024-10-15 21:02:02 +02:00
dependabot[bot] 5317c500c8 ci: bump aquasecurity/trivy-action from 0.25.0 to 0.27.0 in the github-actions group (#15061)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 23:28:04 +05:00
dependabot[bot] cc0b264d36 chore: bump google.golang.org/api from 0.199.0 to 0.200.0 (#15063)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 23:27:22 +05:00
Cian Johnston 06a40185cb chore(examples): add missing devcontainer templates to examples.go (#15080) 2024-10-15 17:26:42 +01:00
Cian Johnston 89ff48744c chore(docs): fix broken or missing links (#15085)
Fixes a number of TODOs and broken links.
2024-10-15 16:50:49 +01:00
Vincent Vielle 42e2a4150c fix(coderd): improve workspace tests (#15069)
With [a recent PR](https://github.com/coder/coder/pull/14923) we
introduced [new
tests](https://github.com/coder/coder/pull/14923/files#diff-81081239b93aaa61eb8d180a5f9870fda8f0ab5cb4c6727d9d1636aa933e597b)
that - while running in parallel to the existing ones - are failing.

This PR is a quick proposal to fix it - tested in local and in the CI to
unblock the situation. We can ignore it to work on a longer term
solution if preferred.
2024-10-15 16:30:38 +02:00
Bruno Quaresma b8420ecaaf test(coderd): fix flake on TestWorkspaceBuildTimings (#15077)
Fix https://github.com/coder/coder/issues/15073
2024-10-15 09:43:39 -03:00
Marcin Tojek 1523d935b5 test: skip scaletest/reconnectingpty Test_Runner (#15076)
Related: https://github.com/coder/internal/issues/98
2024-10-15 12:40:22 +00:00
Marcin Tojek c6396e3125 test: skip scaletest/reconnectingpty Test_Runner (#15075)
Related: https://github.com/coder/internal/issues/98
2024-10-15 14:07:45 +02:00
Spike Curtis 17f2584318 fix: add psmock to gen and make-fresh targets (#15072)
Fixes

```
+ make -j build/coder_linux_amd64 build/coder_linux_arm64 build/coder_linux_armv7 build/coder_2.16.0-devel+7da231bc9_windows_amd64.zip build/coder_2.16.0-devel+7da231bc9_linux_amd64.tar.gz build/coder_2.16.0-devel+7da231bc9_linux_amd64.deb
coderd/database/pubsub/psmock/doc.go:4: running "mockgen": exec: "mockgen": executable file not found in $PATH
make: *** [Makefile:569: coderd/database/pubsub/psmock/psmock.go] Error 1
```

during builds.
2024-10-15 08:49:26 +00:00
Spike Curtis 3565227d02 chore: disable erroneous linting of function names in vpn (#15055)
Disables bogus linting e.g. https://github.com/coder/coder/actions/runs/11305350065/job/31444754200?pr=15011
2024-10-15 11:45:56 +04:00
Jon Ayers 7da231bc92 fix: fix error handling to prevent spam in proc prio management (#15071) 2024-10-15 02:17:10 +00:00
Jon Ayers 384873a114 feat: add wsproxy implementation for key fetching (#14917) 2024-10-14 20:04:10 +01:00
Stephen Kirby 531565645f chore(docs): make version support more explicit (#14785)
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-10-14 18:05:25 +00:00
Edward Angert 88c6a75d48 docs: reorganize and edit docs README (#14706)
Edit the docs readme for consistency and better flow

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-10-14 13:39:54 -04:00
Muhammad Atif Ali 57a65c15bf chore: use commit sha for GitHub actions (#15019)
Use specific commit SHAs for GitHub actions across various workflows to
enhance reliability and reproducibility. This change ensures that
actions run against a known version, reducing the risk of unexpected
issues due to updates in the third-party action repositories.

This contributes to improving the score in #14879
2024-10-14 08:49:55 -07:00
Sas Swart 208ed1efd7 chore(coderd/notifications): expand golden file testing for notifications (#15032)
This PR aims to close https://github.com/coder/coder/issues/14913.

It expands the golden files for the notifier to include the entire
payload serialised as JSON.
2024-10-14 12:34:32 +00:00
Bruno Quaresma 9c8ecb82a3 feat(coderd): return agent script timings (#14923)
Add the agent script timings into the
`/workspacebuilds/:workspacebuild/timings` response.

Close https://github.com/coder/coder/issues/14876
2024-10-14 09:31:03 -03:00
Phorcys 79d24d2101 feat: allow for different docker socket path in docker-based templates (#15035) (#15049)
This PR fixes #15035, I have tested it on my instance and it works as
expected.
2024-10-12 21:35:52 +02:00
dependabot[bot] 3eb2b5573b chore: bump github.com/jedib0t/go-pretty/v6 from 6.5.0 to 6.6.0 (#15007)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 11:47:34 +00:00
dependabot[bot] 914ce1b43a chore: bump protobufjs from 7.2.5 to 7.4.0 in /site (#14951)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 16:41:58 +05:00
dependabot[bot] 0fe4650c7a chore: bump the vite group across 1 directory with 3 updates (#14898)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 16:40:28 +05:00
dependabot[bot] 61287dc60c chore: bump github.com/tidwall/gjson from 1.17.0 to 1.18.0 (#15003)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 16:40:09 +05:00
dependabot[bot] dee694ca46 chore: bump github.com/aws/aws-sdk-go-v2 from 1.31.0 to 1.32.2 (#15046)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 16:39:44 +05:00
dependabot[bot] bb8c7e7e35 chore: bump github.com/aws/smithy-go from 1.21.0 to 1.22.0 (#15004)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 16:39:30 +05:00
dependabot[bot] 23b1515514 chore: bump github.com/open-policy-agent/opa from 0.68.0 to 0.69.0 (#15010)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 04:39:10 -07:00
dependabot[bot] 6cc1b975e5 chore: bump github.com/valyala/fasthttp from 1.55.0 to 1.56.0 (#15008)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 04:38:59 -07:00
dependabot[bot] bac4fcb73b chore: bump github.com/prometheus/common from 0.59.1 to 0.60.0 (#15009)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 11:36:00 +00:00
dependabot[bot] 994e807140 chore: bump the react group across 2 directories with 1 update (#14946)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 16:25:29 +05:00
Muhammad Atif Ali 20b3f8fbf3 chore: use a smaller runner for e2e test (#15034)
We run our e2e-tests on a 16-core machine with `--max-workers=1`
Using a standard runner with 2 cores, the machine runs the tests in the
same amount of time while reducing the cost 8 times.

Update: `test-e2e` fails on the 2core-8GB runner, so using a 4-core-16GB runner for that.
2024-10-12 11:23:13 +00:00
Joobi S B 191449078c feat: implement feature to support template version while creating workspace using cli (#14880) 2024-10-11 18:00:11 +05:00
Vincent Vielle 0ef5340d20 fix: change message when trying to update a workspace already up-to-date (#14975)
Related to #14940  -

We replace the wording from Workspace isn't outdated to Workspace is
up-to-date when the workspace already is up-to-date.
2024-10-10 12:56:53 +02:00
Muhammad Atif Ali ab6cb1a787 docs: fix links for revere-proxy docs (#15026) 2024-10-10 05:31:19 +00:00
Sas Swart 9d02269191 feat(coderd/notifications): improve notification format consistency (#14967)
This Pull request addresses the more trivial items in
https://github.com/coder/coder/issues/14893.
These were simple formatting changes that I was able to fix despite
limited context.

Some more changes are required for which I will have to dig a bit deeper
into how the template contexts are populated. I'm happy to add those to
this PR or create a subsequent PR.
2024-10-09 17:31:12 -05:00
Joobi S B 26df33ac88 docs: explain --rich-parameter-file format (#14941) 2024-10-09 09:34:24 +05:00
dependabot[bot] a0787b71a1 chore: bump gopkg.in/DataDog/dd-trace-go.v1 from 1.67.0 to 1.68.0 (#15005)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-08 09:13:45 +05:00
dependabot[bot] 71d31713c5 ci: bump the github-actions group across 1 directory with 2 updates (#15016)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-10-08 09:04:43 +05:00
dependabot[bot] 93e3c868eb chore: bump google.golang.org/api from 0.197.0 to 0.199.0 (#15006)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-08 08:58:55 +05:00
dependabot[bot] a33c38d46d chore: bump the x group with 6 updates (#15001)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-08 08:33:00 +05:00
Muhammad Atif Ali 5afd022443 chore(README.md): add setup coder GitHub action link (#14991) 2024-10-08 08:10:59 +05:00
Muhammad Atif Ali e8d5fdfb1a chore: add OpenSSF badge (#15012) 2024-10-08 08:05:33 +05:00
Vincent Vielle 6bf73a5964 fix(coderd): move test location to ignore Australia time saving error (#15013)
A test is currently failing because it relies on Sidney Tz.

from the internet : 

```
Daylight Saving Time begins at 2 am (AEST) on the first Sunday in October and ends at 3 am (Australian Eastern Daylight Time) on the first Sunday in April.
```

Due to that - there's one hour missing in the tests - and the test `6
days are acceptable` is failing.

Changing to another timezone to fix the situation, it would require a
longer-term solution or making sure it cannot happen anymore.
2024-10-07 21:10:01 +02:00
dependabot[bot] 3046f5c959 chore: bump @fontsource/ibm-plex-mono from 5.0.5 to 5.1.0 in /site (#14958)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 14:46:43 +05:00
dependabot[bot] 7c7060f6a1 chore: bump @types/react-color from 3.0.6 to 3.0.12 in /site (#14954)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 02:44:54 -07:00
dependabot[bot] e017d22e1b chore: bump eslint-config-next from 14.2.13 to 14.2.14 in /offlinedocs (#14947)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 14:44:23 +05:00
dependabot[bot] 919fe9c632 chore: bump ssh2 and @types/ssh2 in /site (#14953)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 02:44:07 -07:00
dependabot[bot] 7f5db44ef6 chore: bump micromatch from 4.0.7 to 4.0.8 in /site (#14996)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 14:43:46 +05:00
dependabot[bot] 4516f5d79c chore: bump express from 4.20.0 to 4.21.0 in /site (#14959)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 14:09:18 +05:00
Muhammad Atif Ali b815fcc150 chore(docs): fix a wrong link in v2.0.0 changelog (#14994) 2024-10-07 12:38:44 +05:00
Muhammad Atif Ali 61a41027fc chore(README.md): add openssf best practices badge (#14938)
In preparation for #14879
2024-10-05 11:12:15 -07:00
Muhammad Atif Ali 999ae7ba56 chore(docs): fix broken links and update file paths (#14990) 2024-10-05 18:08:50 +00:00
Stephen Kirby 9eefd2a636 chore(docs): correct broken links in restructure (#14989)
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-10-05 17:44:02 +00:00
Muhammad Atif Ali 163f96b71a fix(docs/admin/security): fix broken link of CVE (#14988) 2024-10-05 17:21:27 +00:00
Muhammad Atif Ali 419eba5fb6 docs: restructure docs (#14421)
Closes #13434 
Supersedes #14182

---------

Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com>
Co-authored-by: Ethan Dickson <ethan@coder.com>
Co-authored-by: Ben Potter <ben@coder.com>
Co-authored-by: Stephen Kirby <58410745+stirby@users.noreply.github.com>
Co-authored-by: Stephen Kirby <me@skirby.dev>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2024-10-05 10:52:04 -05:00
Spike Curtis 288df75686 fix: serialize updateEntitlements() (#14974)
fixes #14961

Adding the license and updating entitlements is flaky, especially at the start of our `coderdent` testing because, while the actual modifications to the `entitlements.Set` were threadsafe, we could have multiple goroutines reading from the database and writing to the set, so we could end up writing stale data.

This enforces serialization on updates, so that if you modify the database and kick off an update, you know the state of the `Set` is at least as fresh as your database update.
2024-10-05 06:58:43 +04:00
Jaayden Halko ea3b13c78e chore: storybook additions and cleanup (#14968) 2024-10-04 16:19:24 -04:00
dependabot[bot] 7d281c308f chore: bump storybook from 8.1.11 to 8.3.5 in /site (#14977) 2024-10-04 12:06:59 -03:00
dependabot[bot] 53adbaea70 chore: bump micromatch from 4.0.5 to 4.0.8 in /offlinedocs (#14969)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-04 19:11:11 +05:00
dependabot[bot] 1c60622eba chore: bump rollup from 4.20.0 to 4.24.0 in /site (#14970) 2024-10-04 19:03:25 +05:00
Marcin Tojek 9acf6acd76 test: use static port for Prometheus (#14972)
Fixes: https://github.com/coder/internal/issues/92
2024-10-04 13:17:18 +02:00
Danielle Maywood 4369f2b4b5 feat: implement api for "forgot password?" flow (#14915)
Relates to https://github.com/coder/coder/issues/14232

This implements two endpoints (names subject to change):
- `/api/v2/users/otp/request`
- `/api/v2/users/otp/change-password`
2024-10-04 11:53:25 +01:00
Spike Curtis 8785a51b09 feat: include Coder service prefix on agents (#14944)
fixes #14715

Configures agents to use an address both in the Tailscale service prefix and the new Coder service prefix. Also modifies the Coordinator auth to allow the new prefix.

Updates `coder/tailscale` to include https://github.com/coder/tailscale/pull/62 which fixes a bug around forwarding TCP connections to localhost.  This functionality is tested in the modifications to `TestAgent_Dial`.
2024-10-04 10:16:33 +04:00
Spike Curtis 7d9f5ab81d chore: add Coder service prefix to tailnet (#14943)
re: #14715

This PR introduces the Coder service prefix: `fd60:627a:a42b::/48` and refactors our existing code as calling the Tailscale service prefix explicitly (rather than implicitly).

Removes the unused `Addresses` agent option. All clients today assume they can compute the Agent's IP address based on its UUID, so an agent started with a custom address would break things.
2024-10-04 10:04:10 +04:00
Jon Ayers 68ec532ca7 feat: add jwt pkg (#14928)
- Adds a `jwtutils` package to be shared amongst the various
packages in the codebase that make use of JWTs. It's intended to help us
standardize on one library instead of some implementations using
`go-jose` and others using `golang-jwt`.

The main reason we're converging on `go-jose` is due to its support for
JWEs, `golang-jwt` also has a repo to handle it but it doesn't look
maintained: https://github.com/golang-jwt/jwe
2024-10-03 21:09:52 -05:00
Steven Masley 50d9206950 chore: fix rbac_gen to allow parallel make gen (#14966)
Closes https://github.com/coder/coder/issues/14702
2024-10-03 20:28:04 -05:00
Kayla Washburn-Love 8b6a06dbd5 chore: consolidate ManageSettingsLayout code (#14885)
Clean up a bunch of tangles that only existed to service the
`"multi-organization"` experiment, which has now been removed
2024-10-03 22:00:52 +00:00
dependabot[bot] 04af56d54b chore: bump @testing-library/react from 14.1.0 to 14.3.1 in /site (#14950) 2024-10-03 14:20:58 -06:00
dependabot[bot] cc7899cc7d chore: bump uuid from 9.0.0 to 9.0.1 in /site (#14956)
Bumps [uuid](https://github.com/uuidjs/uuid) from 9.0.0 to 9.0.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md">uuid's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1">9.0.1</a>
(2023-09-12)</h2>
<h3>build</h3>
<ul>
<li>Fix CI to work with Node.js 20.x</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/uuidjs/uuid/commit/b3f142f7efa6d335cd667413b8a5860d2dd04ebf"><code>b3f142f</code></a>
chore(release): 9.0.1</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/fc5d64346a8a93324b7f8f87bdc6b96164f35ba0"><code>fc5d643</code></a>
chore: add node@12 back to CI, update readme (<a
href="https://redirect.github.com/uuidjs/uuid/issues/733">#733</a>)</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/462128b660e477c8878a991073547c01ffaf76e6"><code>462128b</code></a>
ci: update node versions for cI (<a
href="https://redirect.github.com/uuidjs/uuid/issues/732">#732</a>)</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/4de23a6030e65ac72b3b015680f08e7e292681ed"><code>4de23a6</code></a>
test: remove missing getRandomValues test (<a
href="https://redirect.github.com/uuidjs/uuid/issues/709">#709</a>)</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/6eef540aa3407b15e1e7573f45ff17098e9343ea"><code>6eef540</code></a>
chore: adapt bundlewatch config to new main branch name (<a
href="https://redirect.github.com/uuidjs/uuid/issues/705">#705</a>)</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/60ffc406a38128f6dbc8c1d581681843dcf5d0c1"><code>60ffc40</code></a>
chore: run npm audit fix for json5 (<a
href="https://redirect.github.com/uuidjs/uuid/issues/704">#704</a>)</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/862562e7a20834532045ecf45266c391cf12e5c7"><code>862562e</code></a>
ci: run browser tests on pull_request_target (<a
href="https://redirect.github.com/uuidjs/uuid/issues/703">#703</a>)</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/e6b0c909b47f963b63e594bdafa31e958bf2a4d3"><code>e6b0c90</code></a>
chore: minor typos in non-code areas (<a
href="https://redirect.github.com/uuidjs/uuid/issues/702">#702</a>)</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/8f028c4ea42ce41a9a9dc5fa634abe525b2e2066"><code>8f028c4</code></a>
chore: upgrade and fix the stale-issues workflow (<a
href="https://redirect.github.com/uuidjs/uuid/issues/699">#699</a>)</li>
<li><a
href="https://github.com/uuidjs/uuid/commit/1ebda6cbfe9ec731a6f6f80c8b1938267a97afbb"><code>1ebda6c</code></a>
chore: add SECURITY.md, fixes <a
href="https://redirect.github.com/uuidjs/uuid/issues/696">#696</a> (<a
href="https://redirect.github.com/uuidjs/uuid/issues/697">#697</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uuid&package-manager=npm_and_yarn&previous-version=9.0.0&new-version=9.0.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>
2024-10-03 23:50:57 +05:00
dependabot[bot] 496b486a2d chore: bump monaco-editor from 0.50.0 to 0.52.0 in /site (#14957)
Bumps [monaco-editor](https://github.com/microsoft/monaco-editor) from
0.50.0 to 0.52.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/monaco-editor/releases">monaco-editor's
releases</a>.</em></p>
<blockquote>
<h2>v0.52.0</h2>
<h2>Changes:</h2>
<ul>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4691">#4691</a>:
Prepare monaco-editor for release 0.52</li>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4665">#4665</a>:
Updates nvm to align with vscode nvm file.</li>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4652">#4652</a>:
Removing <code>editor.main.nls.js</code></li>
</ul>
<p>This list of changes was <a
href="https://dev.azure.com/monacotools/Monaco/_build/results?buildId=294033&amp;view=logs">auto
generated</a>.</p>
<h2>v0.52.0-rc2</h2>
<h2>Changes:</h2>
<ul>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4665">#4665</a>:
Updates nvm to align with vscode nvm file.</li>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4652">#4652</a>:
Removing <code>editor.main.nls.js</code></li>
</ul>
<p>This list of changes was <a
href="https://dev.azure.com/monacotools/Monaco/_build/results?buildId=293791&amp;view=logs">auto
generated</a>.</p>
<h2>v0.51.0</h2>
<h2>Changes:</h2>
<ul>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4649">#4649</a>:
Add changes for monaco editor release 0.51.0</li>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4630">#4630</a>:
Remove locker and info-needed-closer workflows.</li>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4573">#4573</a>:
Adding some detail in MAINTAINING.md for trigger build step</li>
<li><a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4586">#4586</a>:
Update Q# Keywords</li>
</ul>
<p>This list of changes was <a
href="https://dev.azure.com/monacotools/Monaco/_build/results?buildId=289445&amp;view=logs">auto
generated</a>.</p>
<h2>v0.51.0-rc3</h2>
<p>No release notes provided.</p>
<h2>v0.51.0-rc2</h2>
<p>No release notes provided.</p>
<h2>v0.51.0-rc</h2>
<p>No release notes provided.</p>
<h2>v0.51.0-dev-20240807</h2>
<p>No release notes provided.</p>
<h2>v0.51.0-dev-20240806</h2>
<p>No release notes provided.</p>
<h2>v0.51.0-dev-20240805</h2>
<p>No release notes provided.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md">monaco-editor's
changelog</a>.</em></p>
<blockquote>
<h2>[0.52.0]</h2>
<ul>
<li>Comment added inside of <code>IModelContentChangedEvent</code></li>
</ul>
<h2>[0.51.0]</h2>
<ul>
<li>New fields <code>IEditorOptions.placeholder</code> and
<code>IEditorOptions.compactMode</code></li>
<li>New fields <code>IGotoLocationOptions.multipleTests</code> and
<code>IGotoLocationOptions.alternativeTestsCommand</code></li>
<li>New field <code>IInlineEditOptions.backgroundColoring</code></li>
<li>New experimental field
<code>IEditorOptions.experimental.useTrueInlineView</code></li>
<li>New options <code>CommentThreadRevealOptions</code> for
comments</li>
</ul>
<p>Contributions to <code>monaco-editor</code>:</p>
<ul>
<li><a href="https://github.com/ScottCarda-MS"><code>@​ScottCarda-MS
(Scott Carda)</code></a>: Update Q# Keywords [PR <a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4586">#4586</a>](<a
href="https://redirect.github.com/microsoft/monaco-editor/pull/4586">microsoft/monaco-editor#4586</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/f6dc0eb8fce67e57f6036f4769d92c1666cdf546"><code>f6dc0eb</code></a>
Merge pull request <a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4691">#4691</a>
from microsoft/chubby-cardinal</li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/53e8e1ce30a0b1e5c4ec57ebd67fa17a3ec007ef"><code>53e8e1c</code></a>
adding changelog md change</li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/7959d5c66eff5d904852579c6c4718efebb8363d"><code>7959d5c</code></a>
update pacakge.json</li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/3c7eb57085d23d24c3b5527c45324440ea55c865"><code>3c7eb57</code></a>
undo the package upgrade change</li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/f262e8f93182869139f6789070607c928b91e8bb"><code>f262e8f</code></a>
Defines setInterval/setTimeout on faked globalThis in unit test</li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/b31d22b9ee8e8081751069dc72d397f782cf8eb5"><code>b31d22b</code></a>
Updates nvm to align with vscode nvm file. (<a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4665">#4665</a>)</li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/b8a83d53567c061c234f393899117988fd899c52"><code>b8a83d5</code></a>
Merge pull request <a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4652">#4652</a>
from microsoft/annoyed-dragon</li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/e52ff427290808dff6809b3f77866ae7a62a119b"><code>e52ff42</code></a>
removing <code>editor.main.nls.js</code></li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/67d664a32968e19e2eb08b696a92463804182ae4"><code>67d664a</code></a>
Merge pull request <a
href="https://redirect.github.com/microsoft/monaco-editor/issues/4649">#4649</a>
from microsoft/unique-locust</li>
<li><a
href="https://github.com/microsoft/monaco-editor/commit/88c558b55d10f6c15b79ae4249309df4c21c4a13"><code>88c558b</code></a>
adding changes for monaco editor release</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/monaco-editor/compare/v0.50.0...v0.52.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=monaco-editor&package-manager=npm_and_yarn&previous-version=0.50.0&new-version=0.52.0)](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>
2024-10-03 23:50:24 +05:00
Benjamin Peinhardt 20bfd1f874 fix: fix bug with trailing version info not being properly stripped (#14963)
Fixes a bug where excess version info was not being stripped properly from
documentation links.
2024-10-03 17:30:25 +00:00
Bruno Quaresma 52f03dbdf2 fix(site): fix build logs scrolling on safari (#14884)
Fix https://github.com/coder/coder/issues/9687
2024-10-03 13:27:35 -03:00
dependabot[bot] bcdb8a4c9f chore: bump @swc/jest from 0.2.24 to 0.2.36 in /site (#14955)
Bumps [@swc/jest](https://github.com/swc-project/pkgs) from 0.2.24 to
0.2.36.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/swc-project/pkgs/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@swc/jest&package-manager=npm_and_yarn&previous-version=0.2.24&new-version=0.2.36)](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>
2024-10-03 10:33:37 -03:00
dependabot[bot] 31abfb2c04 chore: bump @chakra-ui/react from 2.8.2 to 2.9.3 in /offlinedocs (#14948)
Bumps
[@chakra-ui/react](https://github.com/chakra-ui/chakra-ui/tree/HEAD/packages/components/react)
from 2.8.2 to 2.9.3.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/chakra-ui/chakra-ui/commits/HEAD/packages/components/react">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@chakra-ui/react&package-manager=npm_and_yarn&previous-version=2.8.2&new-version=2.9.3)](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>
2024-10-03 10:33:25 -03:00
Spike Curtis 3d87f78ce5 docs: add statement about minimum network quality (#14745)
We've had some reports about difficulty connecting to workspaces under very challenging networking conditions. This PR adds some advice about minimum network quality when connecting to workspaces with Coder.
2024-10-03 16:37:05 +04:00
Roger Chao b4f26a8c78 docs: fix to provisioners.md to add a missing character (#14937)
Changed yaml example references from provisioneraemon: to
provisionerDaemon:
2024-10-02 17:50:08 -04:00
Stephen Kirby 3a48ba798d chore: set 2.13.x to "Not Supported" in release calendar (#14936) 2024-10-02 16:43:24 -05:00
Stephen Kirby a7d44150a8 docs: bump stable version to v2.15.1 (#14927)
This PR was automatically created by the [release
script](https://github.com/coder/coder/blob/main/scripts/release.sh).

Please review the changes and merge if they look good and the release is
complete.

You can follow the release progress
[here](https://github.com/coder/coder/actions/workflows/release.yaml)
and view the published release
[here](https://github.com/coder/coder/releases/tag/v2.15.1) (once
complete).
2024-10-02 16:14:40 -05:00
zx d0a8424819 feat: remove dark blue theme (#14890) 2024-10-02 09:30:33 -06:00
dependabot[bot] 0589267301 chore: bump react-router-dom from 6.24.0 to 6.26.2 in /site (#14908)
Bumps
[react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom)
from 6.24.0 to 6.26.2.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:05:16 -04:00
dependabot[bot] 7f66bf56a4 chore: bump @mui/x-tree-view from 7.13.0 to 7.18.0 (#14894)
Bumps the mui group with 1 update in the /site directory:
[@mui/x-tree-view](https://github.com/mui/mui-x/tree/HEAD/packages/x-tree-view).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 10:51:58 -04:00
Michael Smith 680e28bdce fix: display workspace avatars correctly when URLs fail to load (#14814)
## Changes made
- Updated custom avatar components to favor background color by default
- Updated `AvatarData` component to let you manually specify the source
of the text used when images fail to load, and updated the orgs
breadcrumb segment to use it
- Added some logic for handling emoji images better
2024-10-02 14:46:25 +00:00
Marcin Tojek 0aa84b18a1 feat: expose Markdown fields in webhook payload (#14931)
Fixes: https://github.com/coder/coder/issues/14930
2024-10-02 15:38:22 +02:00
dependabot[bot] 2f043d7ab9 chore: bump @emotion/css from 11.13.0 to 11.13.4 in /site in the emotion group across 1 directory (#14896)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 08:28:51 +00:00
dependabot[bot] 4a4d2ecd60 chore: bump github.com/valyala/fasthttp from 1.55.0 to 1.56.0 (#14874)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 13:27:54 +05:00
Ethan b22bd816c9 fix: fix ci build running protoc (#14929) 2024-10-02 16:45:13 +10:00
dependabot[bot] 3c5a5ae2e0 chore: bump typescript from 5.5.4 to 5.6.2 in /offlinedocs (#14900)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 09:13:24 +05:00
Stephen Kirby 5507b58fe7 chore(docs): bump stable version (#14926) 2024-10-01 17:16:13 -05:00
dependabot[bot] f724b03a90 chore: bump typescript from 5.5.4 to 5.6.2 in /site (#14911) 2024-10-01 15:58:12 -06:00
dependabot[bot] e058d6c463 chore: bump @biomejs/biome from 1.8.3 to 1.9.3 in /site (#14914) 2024-10-01 15:25:30 -06:00
dependabot[bot] 414771e40d chore: bump @types/jest from 29.5.12 to 29.5.13 in /site in the jest group across 1 directory (#14897) 2024-10-01 21:02:41 +00:00
dependabot[bot] c4e37228f0 chore: bump storybook-addon-remix-react-router from 3.0.0 to 3.0.1 in /site (#14907)
Bumps
[storybook-addon-remix-react-router](https://github.com/JesusTheHun/storybook-addon-remix-react-router)
from 3.0.0 to 3.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/releases">storybook-addon-remix-react-router's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.1</h2>
<h3>   🐞 Bug Fixes</h3>
<ul>
<li>Move package.json import to client side try <code>with</code> and
<code>assert</code>  -  by <a
href="https://github.com/JesusTheHun"><code>@​JesusTheHun</code></a> <a
href="https://github.com/JesusTheHun/storybook-addon-react-router-v6/commit/9972434"><!--
raw HTML omitted -->(99724)<!-- raw HTML omitted --></a></li>
</ul>
<h5>    <a
href="https://github.com/JesusTheHun/storybook-addon-react-router-v6/compare/v3.0.0...v3.0.1">View
changes on GitHub</a></h5>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/96bfaeb923db9513bccea69dabe13f76655b8521"><code>96bfaeb</code></a>
ci: use npm unambiguous syntax</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/83d0c3b079706c3689d2adda2eaa7d94d241319e"><code>83d0c3b</code></a>
ci: use npm unambiguous syntax</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/99724340000c24198db323ff96cde8df42a4ca16"><code>9972434</code></a>
fix: move package.json import to client side</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/85777c95205cf26734b66340db842d5743a48e11"><code>85777c9</code></a>
chore: remove obsolete argument</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/96b3af6cb06724c1c4f712357daa6785d2413522"><code>96b3af6</code></a>
docs: less alarming rename message</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/e8b13193d2fe560ed76d64c274db8791a70cf7de"><code>e8b1319</code></a>
docs: fix badges [skip ci]</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/fb1dfc9e5856044fcbeb00731300f22178833b77"><code>fb1dfc9</code></a>
docs: use legacy npm badge to avoid user confusion</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/77a194c0737257daee24bc376ca8610506b6a9a3"><code>77a194c</code></a>
ci: remove duplicate issue template [skip ci]</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/829510bdf5feb8699906393d2f319cdb9cebf33f"><code>829510b</code></a>
ci: test on push, release manually</li>
<li><a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/commit/c39e21662e7ba1b3ac48dab656de4a67eef68c2f"><code>c39e216</code></a>
Merge remote-tracking branch 'origin/main'</li>
<li>Additional commits viewable in <a
href="https://github.com/JesusTheHun/storybook-addon-remix-react-router/compare/v3.0.0...v3.0.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=storybook-addon-remix-react-router&package-manager=npm_and_yarn&previous-version=3.0.0&new-version=3.0.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>
2024-10-02 01:37:42 +05:00
dependabot[bot] ef54a0b8f6 chore: bump next from 14.2.10 to 14.2.14 in /offlinedocs (#14924)
Bumps [next](https://github.com/vercel/next.js) from 14.2.10 to 14.2.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.14</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Fix: clone response in first handler to prevent race (<a
href="https://redirect.github.com/vercel/next.js/issues/70082">#70082</a>)
(<a
href="https://redirect.github.com/vercel/next.js/issues/70649">#70649</a>)</li>
<li>Respect reexports from metadata API routes (<a
href="https://redirect.github.com/vercel/next.js/issues/70508">#70508</a>)
(<a
href="https://redirect.github.com/vercel/next.js/issues/70647">#70647</a>)</li>
<li>Externalize node binary modules for app router (<a
href="https://redirect.github.com/vercel/next.js/issues/70646">#70646</a>)</li>
<li>Fix revalidateTag() behaviour when invoked in server components (<a
href="https://redirect.github.com/vercel/next.js/issues/70446">#70446</a>)
(<a
href="https://redirect.github.com/vercel/next.js/issues/70642">#70642</a>)</li>
<li>Fix prefetch bailout detection for nested loading segments (<a
href="https://redirect.github.com/vercel/next.js/issues/70618">#70618</a>)</li>
<li>Add missing node modules to externals (<a
href="https://redirect.github.com/vercel/next.js/issues/70382">#70382</a>)</li>
<li>Feature: next/image: add support for images.remotePatterns.search
(<a
href="https://redirect.github.com/vercel/next.js/issues/70302">#70302</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/styfle"><code>@​styfle</code></a>, <a
href="https://github.com/ztanner"><code>@​ztanner</code></a>, <a
href="https://github.com/ijjk"><code>@​ijjk</code></a>, <a
href="https://github.com/huozhi"><code>@​huozhi</code></a> and <a
href="https://github.com/wyattjoh"><code>@​wyattjoh</code></a> for
helping!</p>
<h2>v14.2.13</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Fix missing cache-control on SSR app route (<a
href="https://redirect.github.com/vercel/next.js/issues/70265">#70265</a>)</li>
<li>feat: add polyfill of URL.canParse for browser compatibility (<a
href="https://redirect.github.com/vercel/next.js/issues/70228">#70228</a>)</li>
<li>Fix vercel og package memory leak (<a
href="https://redirect.github.com/vercel/next.js/issues/70214">#70214</a>)</li>
<li>Fix startTime error on Android 9 with Chrome 74 (<a
href="https://redirect.github.com/vercel/next.js/issues/67391">#67391</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/raeyoung-kim"><code>@​raeyoung-kim</code></a>,
<a href="https://github.com/huozhi"><code>@​huozhi</code></a>, <a
href="https://github.com/devjiwonchoi"><code>@​devjiwonchoi</code></a>,
and <a href="https://github.com/ijjk"><code>@​ijjk</code></a> for
helping!</p>
<h2>v14.2.12</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>update prefetching jsdoc &amp; documentation (<a
href="https://redirect.github.com/vercel/next.js/issues/68047">#68047</a>)</li>
<li>Ensure we chunk revalidate tag requests (<a
href="https://redirect.github.com/vercel/next.js/issues/70189">#70189</a>)</li>
<li>(backport) fix(eslint): allow typescript-eslint v8 (<a
href="https://redirect.github.com/vercel/next.js/issues/70090">#70090</a>)</li>
<li>[ppr] Don't mark RSC requests as /_next/data requests (backport of
<a
href="https://redirect.github.com/vercel/next.js/issues/66249">#66249</a>)
(<a
href="https://redirect.github.com/vercel/next.js/issues/70083">#70083</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/alvarlagerlof"><code>@​alvarlagerlof</code></a>,
<a href="https://github.com/wyattjoh"><code>@​wyattjoh</code></a>, <a
href="https://github.com/delbaoliveira"><code>@​delbaoliveira</code></a>,
and <a href="https://github.com/ijjk"><code>@​ijjk</code></a> for
helping!</p>
<h2>v14.2.11</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>fix: correct metadata url suffix (<a
href="https://redirect.github.com/vercel/next.js/pull/69959">vercel/next.js#69959</a>)</li>
<li>fix: setting assetPrefix to URL format breaks HMR (<a
href="https://redirect.github.com/vercel/next.js/issues/70040">#70040</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/dbbec6ada34399df739f45273b50c38fc5b4a881"><code>dbbec6a</code></a>
v14.2.14</li>
<li><a
href="https://github.com/vercel/next.js/commit/887a419d2f74c791eb3a39efbca29d55fdc10d32"><code>887a419</code></a>
fix: clone response in first handler to prevent race (<a
href="https://redirect.github.com/vercel/next.js/issues/70082">#70082</a>)
(<a
href="https://redirect.github.com/vercel/next.js/issues/70649">#70649</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/73f6b7dc056cf19f795f213c3b133cb991cd877c"><code>73f6b7d</code></a>
Respect reexports from metadata API routes (<a
href="https://redirect.github.com/vercel/next.js/issues/70508">#70508</a>)
(<a
href="https://redirect.github.com/vercel/next.js/issues/70647">#70647</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/e1da07e75a7b8cf96d4d1d6f8c2b6aa3b81f9a4a"><code>e1da07e</code></a>
Externalize node binary modules for app router (<a
href="https://redirect.github.com/vercel/next.js/issues/70646">#70646</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/0ffea650b9a031e4fc5458c0df8100d9bb25f3cc"><code>0ffea65</code></a>
Fix <code>revalidateTag()</code> behaviour when invoked in server
components (<a
href="https://redirect.github.com/vercel/next.js/issues/70446">#70446</a>)
(#...</li>
<li><a
href="https://github.com/vercel/next.js/commit/190faf4d9f4ff907e59947d0dc4740a9224efda4"><code>190faf4</code></a>
Fully skip flakey assertion</li>
<li><a
href="https://github.com/vercel/next.js/commit/3020a118c021e17a57dabb5c379e1a4095f15cbc"><code>3020a11</code></a>
reduce timeout errors</li>
<li><a
href="https://github.com/vercel/next.js/commit/f81e6811e7eb09055e7eea48d8d705874ccdcdcc"><code>f81e681</code></a>
Update flakey tests (<a
href="https://redirect.github.com/vercel/next.js/issues/70643">#70643</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/50e41a251ecf4596eeba42d7013b07c39c541ee7"><code>50e41a2</code></a>
backport: fix prefetch bailout detection for nested loading segments (<a
href="https://redirect.github.com/vercel/next.js/issues/70618">#70618</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/e19d91cf6820acefdf935fe1d06c5276e1cb5e96"><code>e19d91c</code></a>
add missing node modules to externals (<a
href="https://redirect.github.com/vercel/next.js/issues/70382">#70382</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vercel/next.js/compare/v14.2.10...v14.2.14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=next&package-manager=npm_and_yarn&previous-version=14.2.10&new-version=14.2.14)](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>
2024-10-02 01:37:19 +05:00
dependabot[bot] 70f428b2f6 chore: bump @types/node from 20.14.8 to 20.16.10 in /offlinedocs (#14903)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 20.14.8 to 20.16.10.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=20.14.8&new-version=20.16.10)](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>
2024-10-01 16:18:57 -04:00
dependabot[bot] 06aa139d26 chore: bump @types/node from 20.14.8 to 20.16.10 in /site (#14910)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 20.14.8 to 20.16.10.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=20.14.8&new-version=20.16.10)](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>
2024-10-01 16:18:35 -04:00
dependabot[bot] 1d3eda5c1f chore: bump @chromatic-com/storybook from 1.6.0 to 1.9.0 in /site (#14906)
Bumps
[@chromatic-com/storybook](https://github.com/chromaui/addon-visual-tests)
from 1.6.0 to 1.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/addon-visual-tests/releases"><code>@​chromatic-com/storybook</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v1.9.0</h2>
<h4>🚀 Enhancement</h4>
<ul>
<li>Relay client-side fetch requests to the server using the Storybook
channel API <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/331">#331</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Gert Hengeveld (<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<h2>v1.8.0</h2>
<h4>🚀 Enhancement</h4>
<ul>
<li>Add <code>paramKey: &quot;chromatic&quot;</code> to allow disabling
the VTA panel through story parameters <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/334">#334</a>
(<a href="https://github.com/mellm0"><code>@​mellm0</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Mell (<a
href="https://github.com/mellm0"><code>@​mellm0</code></a>)</li>
</ul>
<h2>v1.7.0</h2>
<h4>🚀 Enhancement</h4>
<ul>
<li>Update story status reporting for Storybook 8.3 and use new
<code>SET_FILTER</code> event <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/332">#332</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Gert Hengeveld (<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<h2>v1.6.1</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Fix closing multiple notifications of the same type <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/329">#329</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
<li>Add backport releases to changelog <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/327">#327</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Gert Hengeveld (<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/addon-visual-tests/blob/main/CHANGELOG.md"><code>@​chromatic-com/storybook</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>v1.9.0 (Fri Sep 06 2024)</h1>
<h4>🚀 Enhancement</h4>
<ul>
<li>Relay client-side fetch requests to the server using the Storybook
channel API <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/331">#331</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Gert Hengeveld (<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<hr />
<h1>v1.8.0 (Thu Aug 29 2024)</h1>
<h4>🚀 Enhancement</h4>
<ul>
<li>Add <code>paramKey: &quot;chromatic&quot;</code> to allow disabling
the VTA panel through story parameters <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/334">#334</a>
(<a href="https://github.com/mellm0"><code>@​mellm0</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Mell (<a
href="https://github.com/mellm0"><code>@​mellm0</code></a>)</li>
</ul>
<hr />
<h1>v1.7.0 (Tue Aug 20 2024)</h1>
<h4>🚀 Enhancement</h4>
<ul>
<li>Update story status reporting for Storybook 8.3 and use new
<code>SET_FILTER</code> event <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/332">#332</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Gert Hengeveld (<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<hr />
<h1>v1.6.1 (Thu Jul 04 2024)</h1>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Fix closing multiple notifications of the same type <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/329">#329</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
<li>Add backport releases to changelog <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/327">#327</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Gert Hengeveld (<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/6b99afbc494861590c20fe4d066a290c9038eb9e"><code>6b99afb</code></a>
Bump version to: 1.9.0 [skip ci]</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/51be970546e6d6f50b47365674dd19dfe8b6ff1c"><code>51be970</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/f0c702ffc69a1b4b9606f37220f6ec1c2bd68ff3"><code>f0c702f</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/addon-visual-tests/issues/331">#331</a>
from chromaui/312-api-channel-proxy</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/67b13f2aa668a470a2830b60b779c92ef16a6e84"><code>67b13f2</code></a>
Merge branch 'main' into 312-api-channel-proxy</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/b781bdfcc70cc7a19991525aa1931eeed08ea169"><code>b781bdf</code></a>
Bump version to: 1.8.0 [skip ci]</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/cd6d96984b30c436f3f3cae056632b052df333a3"><code>cd6d969</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/97ad16438ce4e47f267f472369756a22f0bd6142"><code>97ad164</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/addon-visual-tests/issues/334">#334</a>
from mellm0/add-param-key</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/ca3d66e836ace90636372b15ec58a32dadcc5a75"><code>ca3d66e</code></a>
chore: change param key to chromatic</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/c58f4390aaff68de50546263ee08e7764263895c"><code>c58f439</code></a>
Merge branch 'main' into add-param-key</li>
<li><a
href="https://github.com/chromaui/addon-visual-tests/commit/9277872cd84f3f858659374f3a44fc43f7f0e510"><code>9277872</code></a>
Merge branch 'main' into 312-api-channel-proxy</li>
<li>Additional commits viewable in <a
href="https://github.com/chromaui/addon-visual-tests/compare/v1.6.0...v1.9.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@chromatic-com/storybook&package-manager=npm_and_yarn&previous-version=1.6.0&new-version=1.9.0)](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>
2024-10-01 14:09:17 -05:00
Benjamin Peinhardt 302b7fa048 revert: "chore: bump @types/lodash from 4.14.196 to 4.17.9 in /offlinedocs" (#14922)
Reverts coder/coder#14899
Some tests actually failed I just didn't see it.
2024-10-01 13:52:29 -05:00
Muhammad Atif Ali baf8e30458 chore(dogfood): dogfood latest version of modules (#14918)
This will help us catch bugs before our users.
2024-10-01 23:35:36 +05:00
dependabot[bot] f9ec468c6d chore: bump @types/lodash from 4.14.196 to 4.17.9 in /offlinedocs (#14899)
Bumps
[@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash)
from 4.14.196 to 4.17.9.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/lodash&package-manager=npm_and_yarn&previous-version=4.14.196&new-version=4.17.9)](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>
2024-10-01 13:34:51 -05:00
Ben Potter 5a20121fe7 chore: fix label for orgs docs (#14920) 2024-10-01 18:00:38 +00:00
Ben Potter d04eaf8392 docs: add organizations, provisioners, and premium license docs (#14778)
- [x] Mention Orgs is beta and add a link to get feedback
- [x] Add docs on new provisioner authentication architecture and
deprecate the old one
- [x] Add/update docs for IdP sync
  - [x] Organization Sync
  - [x] Group Sync
  - [x] Role Sync
- [x] Modify `coder.com` codebase to add `Premium` and `Beta` pill, and
allow multiple pills: https://github.com/coder/coder.com/pull/638
- [x] Replace all mentions of "Enterprise" with "Premium" in docs
  - [x] edit: change it to "Licensing"
- [x] Remove the enterprise page and change all links to
coder.com/pricing
- [x] Merge #14786
- [x] Add redirects for coder.com to redirect the `using-organizations`
guide to the new orgs one and /enterprise to /premium
https://github.com/coder/coder.com/pull/645
- [x] Custom roles
- [x] https://github.com/coder/coder/pull/14786
- [x] Remove all mentions of orgs experiment
- [x] Update in-product copy & links to link to the new docs pages

Anything I am missing?

---

[Preview
this](https://coder.com/docs/@orgs-licenses/admin/organizations)

---------

Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
2024-10-01 12:34:16 -05:00
dependabot[bot] b786166ddf chore: bump github.com/unrolled/secure from 1.14.0 to 1.16.0 (#14871)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:33:43 +05:00
dependabot[bot] 0623531ab8 ci: bump contributor-assistant/github-action from 2.6.0 to 2.6.1 in the github-actions group (#14870)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 17:33:10 +00:00
dependabot[bot] 3ca78dde86 chore: bump gopkg.in/DataDog/dd-trace-go.v1 from 1.67.0 to 1.68.0 (#14767)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:32:36 +05:00
dependabot[bot] eacdba24bc chore: bump google.golang.org/api from 0.197.0 to 0.199.0 (#14873)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:32:20 +05:00
Garrett Delfosse 533d655ac0 feat: show user-auth provisioners (#14883)
Closes https://github.com/coder/coder/issues/14867

What this changes:
- Displays `user-auth` grouped provisioners
- Added tags to provisioners in cases where it matters

<img width="1378" alt="image"
src="https://github.com/user-attachments/assets/ecc8da0a-24b4-469d-99e7-aa1f183046b7">

---------

Co-authored-by: Ben Potter <ben@coder.com>
Co-authored-by: McKayla Washburn <mckayla@hey.com>
2024-10-01 13:12:30 -04:00
Jon Ayers 21b92ef893 feat: add cache abstraction for fetching signing keys (#14777)
- Adds the database implementation for fetching and caching keys
used for JWT signing. It's been merged into the `keyrotate` pkg and
renamed to `cryptokeys` since they're coupled concepts.
2024-10-01 11:04:51 -05:00
Spike Curtis f7ddbb744f feat: add CoderVPN protocol definition & implementation (#14855)
closes #14731

Defines and implements the CoderVPN control protocol, which will be used to communicate with desktop client applications.
2024-10-01 19:40:42 +04:00
dependabot[bot] 38d8e3ad6a chore: bump eslint from 8.57.0 to 8.57.1 in /offlinedocs (#14904)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 19:10:33 +05:00
Mathias Fredriksson ca80dd657b chore(site): update @playwright/test to version 1.47.2 (#14912)
Playwright version detection in `scripts/remote_playwright.sh` was also fixed.
2024-10-01 13:59:49 +00:00
Danny Kopping 11f7b1b3f5 chore: remove notifications experiment (#14869)
Notifications have proved stable in the [mainline release of
v2.15](https://github.com/coder/coder/releases/tag/v2.15.0), and in
preparation for v2.16 we're moving this to stable.
2024-10-01 13:43:47 +00:00
dependabot[bot] edb4485afd chore: bump the react group across 2 directories with 2 updates (#14895)
Bumps the react group with 1 update in the /offlinedocs directory:
[@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react).
Bumps the react group with 2 updates in the /site directory:
[@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)
and
[@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom).

Updates `@types/react` from 18.3.3 to 18.3.10
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react">compare
view</a></li>
</ul>
</details>
<br />

Updates `@types/react` from 18.2.6 to 18.3.10
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react">compare
view</a></li>
</ul>
</details>
<br />

Updates `@types/react-dom` from 18.2.4 to 18.3.0
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom">compare
view</a></li>
</ul>
</details>
<br />


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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com>
2024-10-01 10:40:54 -03:00
dependabot[bot] 1de12b0310 chore: bump eslint-config-next from 14.2.7 to 14.2.13 in /offlinedocs (#14902)
Bumps
[eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next)
from 14.2.7 to 14.2.13.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">eslint-config-next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.13</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Fix missing cache-control on SSR app route (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70265">#70265</a>)</li>
<li>feat: add polyfill of URL.canParse for browser compatibility (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70228">#70228</a>)</li>
<li>Fix vercel og package memory leak (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70214">#70214</a>)</li>
<li>Fix startTime error on Android 9 with Chrome 74 (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/67391">#67391</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/raeyoung-kim"><code>@​raeyoung-kim</code></a>,
<a href="https://github.com/huozhi"><code>@​huozhi</code></a>, <a
href="https://github.com/devjiwonchoi"><code>@​devjiwonchoi</code></a>,
and <a href="https://github.com/ijjk"><code>@​ijjk</code></a> for
helping!</p>
<h2>v14.2.12</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>update prefetching jsdoc &amp; documentation (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/68047">#68047</a>)</li>
<li>Ensure we chunk revalidate tag requests (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70189">#70189</a>)</li>
<li>(backport) fix(eslint): allow typescript-eslint v8 (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70090">#70090</a>)</li>
<li>[ppr] Don't mark RSC requests as /_next/data requests (backport of
<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/66249">#66249</a>)
(<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70083">#70083</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/alvarlagerlof"><code>@​alvarlagerlof</code></a>,
<a href="https://github.com/wyattjoh"><code>@​wyattjoh</code></a>, <a
href="https://github.com/delbaoliveira"><code>@​delbaoliveira</code></a>,
and <a href="https://github.com/ijjk"><code>@​ijjk</code></a> for
helping!</p>
<h2>v14.2.11</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>fix: correct metadata url suffix (<a
href="https://redirect.github.com/vercel/next.js/pull/69959">vercel/next.js#69959</a>)</li>
<li>fix: setting assetPrefix to URL format breaks HMR (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70040">#70040</a>)</li>
<li>Update revalidateTag to batch tags in one request (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/65296">#65296</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/huozhi"><code>@​huozhi</code></a>, <a
href="https://github.com/devjiwonchoi"><code>@​devjiwonchoi</code></a>,
and <a href="https://github.com/ijjk"><code>@​ijjk</code></a> for
helping!</p>
<h2>v14.2.10</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Remove invalid fallback revalidate value (<a
href="https://redirect.github.com/vercel/next.js/pull/69990">vercel/next.js#69990</a>)</li>
<li>Revert server action optimization (<a
href="https://redirect.github.com/vercel/next.js/pull/69925">vercel/next.js#69925</a>)</li>
<li>Add ability to customize Cache-Control (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/69802">#69802</a>)</li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/huozhi"><code>@​huozhi</code></a> and <a
href="https://github.com/ijjk"><code>@​ijjk</code></a> for helping!</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/f550237aa564bd59bfef7462350ac6c502f0206d"><code>f550237</code></a>
v14.2.13</li>
<li><a
href="https://github.com/vercel/next.js/commit/6d7ced47babace09f5ab1cf5a43ba26d88d984ac"><code>6d7ced4</code></a>
v14.2.12</li>
<li><a
href="https://github.com/vercel/next.js/commit/77910c84be4dfb867fe127089c077c05e8a4225c"><code>77910c8</code></a>
(backport) fix(eslint): allow typescript-eslint v8 (<a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/70090">#70090</a>)</li>
<li><a
href="https://github.com/vercel/next.js/commit/bfbc92aab5c727444ed21e0b84bd55cda2e22067"><code>bfbc92a</code></a>
v14.2.11</li>
<li><a
href="https://github.com/vercel/next.js/commit/937651fede26a1cdd8a83aa4636719e466fa7f20"><code>937651f</code></a>
v14.2.10</li>
<li><a
href="https://github.com/vercel/next.js/commit/6fa8982f8eb766663fd1e11e43621e53fd8e016c"><code>6fa8982</code></a>
v14.2.9</li>
<li><a
href="https://github.com/vercel/next.js/commit/63b999c3ba9fda5ed577d56438200b60b07085e1"><code>63b999c</code></a>
v14.2.8</li>
<li><a
href="https://github.com/vercel/next.js/commit/c021c2f7f72485482d4fac870f0dbd5be369dedb"><code>c021c2f</code></a>
feat: enable <code>@​typescript-eslint/recommended</code> in
create-next-app --typescript (...</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/commits/v14.2.13/packages/eslint-config-next">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-config-next&package-manager=npm_and_yarn&previous-version=14.2.7&new-version=14.2.13)](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>
2024-10-01 10:07:58 -03:00
dependabot[bot] dc40231b74 chore: bump @types/lodash from 4.17.6 to 4.17.9 in /site (#14909)
Bumps
[@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash)
from 4.17.6 to 4.17.9.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/lodash&package-manager=npm_and_yarn&previous-version=4.17.6&new-version=4.17.9)](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>
2024-10-01 10:07:34 -03:00
Marcin Tojek 3f79022848 test: ignore log errors (#14892)
Fixes: https://github.com/coder/coder/issues/14891
2024-10-01 12:38:50 +02:00
Ethan 35a5475166 chore: add site flag to buildinfo (#14868) 2024-10-01 10:01:17 +00:00
Ethan 2a3a00cf82 fix: remove redundant flaking test (#14888) 2024-10-01 09:01:24 +00:00
Spike Curtis d6766f706d fix: sort provisioner key tags in cli output (#14875)
I'm seeing flakes like

```
    provisionerkeys_test.go:68: 2024-09-30 05:58:44.686: cmd: matched newline = "CREATED AT            NAME          TAGS            "
    provisionerkeys_test.go:72: 2024-09-30 05:58:44.686: cmd: matched newline = "2024-09-30T05:58:44Z  dont-test-me  my=way foo=bar  "
    provisionerkeys_test.go:74: 
        	Error Trace:	/Users/runner/work/coder/coder/enterprise/cli/provisionerkeys_test.go:74
        	Error:      	"2024-09-30T05:58:44Z  dont-test-me  my=way foo=bar  " does not contain "foo=bar my=way"
        	Test:       	TestProvisionerKeys/CRUD
```

e.g.
https://github.com/coder/coder/actions/runs/11100237276/job/30835714478?pr=14855

Since the tags are a map, we weren't outputting them in a consistent
order on the CLI, leading to flakes.

This sorts the tags by key when converting to a string, for a
consistent, canonical output.
2024-10-01 09:11:19 +04:00
Joobi S B ba90bb0ab3 feat: implement feature to create a token on behalf of another user in the cli (#14813)
This PR addresses https://github.com/coder/coder/issues/13160
2024-09-30 20:15:28 +00:00
Kayla Washburn-Love e70ad2b4b3 fix: always show upload and scratch in create template gallery (#14327) 2024-09-30 12:38:08 -06:00
6145 changed files with 126850 additions and 62869 deletions
-6
View File
@@ -1,6 +0,0 @@
# Ignore all files and folders
**
# Include flake.nix and flake.lock
!flake.nix
!flake.lock
+24
View File
@@ -0,0 +1,24 @@
dirs:
- docs
excludedDirs:
# Downstream bug in linkspector means large markdown files fail to parse
# but these are autogenerated and shouldn't need checking
- docs/reference
# Older changelogs may contain broken links
- docs/changelogs
ignorePatterns:
- pattern: "localhost"
- pattern: "example.com"
- pattern: "mailto:"
- pattern: "127.0.0.1"
- pattern: "0.0.0.0"
- pattern: "JFROG_URL"
- pattern: "coder.company.org"
# These real sites were blocking the linkspector action / GitHub runner IPs(?)
- pattern: "i.imgur.com"
- pattern: "code.visualstudio.com"
- pattern: "www.emacswiki.org"
- pattern: "linux.die.net/man"
- pattern: "www.gnu.org"
aliveStatusCodes:
- 200
+2 -2
View File
@@ -4,12 +4,12 @@ description: |
inputs:
version:
description: "The Go version to use."
default: "1.22.5"
default: "1.22.8"
runs:
using: "composite"
steps:
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ inputs.version }}
+27
View File
@@ -0,0 +1,27 @@
name: "Setup ImDisk"
if: runner.os == 'Windows'
description: |
Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
runs:
using: "composite"
steps:
- name: Download ImDisk
if: runner.os == 'Windows'
shell: bash
run: |
mkdir imdisk
cd imdisk
curl -L -o files.cab https://github.com/coder/imdisk-artifacts/raw/92a17839ebc0ee3e69be019f66b3e9b5d2de4482/files.cab
curl -L -o install.bat https://github.com/coder/imdisk-artifacts/raw/92a17839ebc0ee3e69be019f66b3e9b5d2de4482/install.bat
cd ..
- name: Install ImDisk
shell: cmd
run: |
cd imdisk
install.bat /silent
- name: Create RAM Disk
shell: cmd
run: |
imdisk -a -s 4096M -m R: -p "/fs:ntfs /q /y"
+4 -4
View File
@@ -11,16 +11,16 @@ runs:
using: "composite"
steps:
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9.6
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Setup Node
uses: actions/setup-node@v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20.16.0
# See https://github.com/actions/setup-node#caching-global-packages-data
cache: "pnpm"
cache-dependency-path: ${{ inputs.directory }}/pnpm-lock.yaml
- name: Install root node_modules
shell: bash
run: ./scripts/pnpm_install.sh
+2 -2
View File
@@ -5,6 +5,6 @@ runs:
using: "composite"
steps:
- name: Setup sqlc
uses: sqlc-dev/setup-sqlc@v4
uses: sqlc-dev/setup-sqlc@c0209b9199cd1cce6a14fc27cabcec491b651761 # v4.0.0
with:
sqlc-version: "1.25.0"
sqlc-version: "1.27.0"
+2 -2
View File
@@ -5,7 +5,7 @@ runs:
using: "composite"
steps:
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: 1.9.2
terraform_version: 1.10.5
terraform_wrapper: false
+2 -1
View File
@@ -1,5 +1,6 @@
name: Upload tests to datadog
if: always()
description: |
Uploads the test results to datadog.
inputs:
api-key:
description: "Datadog API key"
+2
View File
@@ -0,0 +1,2 @@
enabled: true
preservePullRequestTitle: true
+10 -1
View File
@@ -51,7 +51,13 @@ updates:
# Update our Dockerfile.
- package-ecosystem: "docker"
directory: "/scripts/"
directories:
- "/dogfood/contents"
- "/scripts"
- "/examples/templates/docker/build"
- "/examples/parameters/build"
- "/scaletest/templates/scaletest-runner"
- "/scripts/ironbank"
schedule:
interval: "weekly"
time: "06:00"
@@ -68,6 +74,9 @@ updates:
directories:
- "/site"
- "/offlinedocs"
- "/scripts"
- "/scripts/apidocgen"
schedule:
interval: "monthly"
time: "06:00"
+447 -90
View File
@@ -9,16 +9,7 @@ on:
workflow_dispatch:
permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
packages: write
pull-requests: none
repository-projects: none
security-events: none
statuses: none
# Cancel in-progress runs for pull requests when developers push
# additional changes
@@ -42,13 +33,18 @@ jobs:
offlinedocs: ${{ steps.filter.outputs.offlinedocs }}
tailnet-integration: ${{ steps.filter.outputs.tailnet-integration }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
# For pull requests it's not necessary to checkout the code
- name: check changed files
uses: dorny/paths-filter@v3
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
@@ -84,7 +80,8 @@ jobs:
- "cmd/**"
- "coderd/**"
- "enterprise/**"
- "examples/*"
- "examples/**"
- "helm/**"
- "provisioner/**"
- "provisionerd/**"
- "provisionersdk/**"
@@ -125,7 +122,7 @@ jobs:
# runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
# with:
# fetch-depth: 1
# # See: https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
@@ -138,7 +135,7 @@ jobs:
# run: ./scripts/update-flake.sh
# # auto update flake for dependabot
# - uses: stefanzweifel/git-auto-commit-action@v5
# - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
# if: github.actor == 'dependabot[bot]'
# with:
# # Allows dependabot to still rebase!
@@ -157,8 +154,13 @@ jobs:
if: needs.changes.outputs.offlinedocs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -176,7 +178,7 @@ jobs:
echo "LINT_CACHE_DIR=$dir" >> $GITHUB_ENV
- name: golangci-lint cache
uses: actions/cache@v4
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
path: |
${{ env.LINT_CACHE_DIR }}
@@ -186,7 +188,7 @@ jobs:
# Check for any typos
- name: Check for typos
uses: crate-ci/typos@v1.24.6
uses: crate-ci/typos@685eb3d55be2f85191e8c84acb9f44d7756f84ab # v1.29.4
with:
config: .github/workflows/typos.toml
@@ -199,7 +201,7 @@ jobs:
# Needed for helm chart linting
- name: Install helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: v3.9.2
@@ -209,18 +211,28 @@ jobs:
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.22
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.4
./actionlint -color -shellcheck= -ignore "set-output"
shell: bash
- name: Check for unstaged files
run: |
rm -f ./actionlint ./typos
./scripts/check_unstaged.sh
shell: bash
gen:
timeout-minutes: 8
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
needs: changes
if: needs.changes.outputs.docs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
if: always()
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -239,16 +251,16 @@ jobs:
- name: go install tools
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/mikefarah/yq/v4@v4.30.6
go install go.uber.org/mock/mockgen@v0.4.0
go install github.com/mikefarah/yq/v4@v4.44.3
go install go.uber.org/mock/mockgen@v0.5.0
- name: Install Protoc
run: |
mkdir -p /tmp/proto
pushd /tmp/proto
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
unzip protoc.zip
cp -r ./bin/* /usr/local/bin
cp -r ./include /usr/local/bin/include
@@ -259,6 +271,15 @@ jobs:
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
run: "make --output-sync -B gen"
- name: make update-golden-files
run: |
make clean/golden-files
# Notifications require DB, we could start a DB instance here but
# let's just restore for now.
git checkout -- coderd/notifications/testdata/rendered-templates
# As above, skip `-j` flag.
make --output-sync -B update-golden-files
- name: Check for unstaged files
run: ./scripts/check_unstaged.sh
@@ -268,8 +289,13 @@ jobs:
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
timeout-minutes: 7
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -292,7 +318,7 @@ jobs:
run: ./scripts/check_unstaged.sh
test-go:
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'macos-latest-xlarge' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
needs: changes
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
timeout-minutes: 20
@@ -304,8 +330,13 @@ jobs:
- macos-latest
- windows-2022
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -347,19 +378,25 @@ jobs:
with:
api-key: ${{ secrets.DATADOG_API_KEY }}
test-go-pg:
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
needs:
- changes
# We don't run the full test-suite for Windows & MacOS, so we just run the CLI tests on every PR.
# We run the test suite in test-go-pg, including CLI.
test-cli:
runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
needs: changes
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
# This timeout must be greater than the timeout set by `go test` in
# `make test-postgres` to ensure we receive a trace of running
# goroutines. Setting this to the timeout +5m should work quite well
# even if some of the preceding steps are slow.
timeout-minutes: 25
strategy:
matrix:
os:
- macos-latest
- windows-2022
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -369,11 +406,79 @@ jobs:
- name: Setup Terraform
uses: ./.github/actions/setup-tf
# Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
- name: Setup ImDisk
if: runner.os == 'Windows'
uses: ./.github/actions/setup-imdisk
- name: Test CLI
env:
TS_DEBUG_DISCO: "true"
LC_CTYPE: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
shell: bash
run: |
# By default Go will use the number of logical CPUs, which
# is a fine default.
PARALLEL_FLAG=""
make test-cli
- name: Upload test stats to Datadog
timeout-minutes: 1
continue-on-error: true
uses: ./.github/actions/upload-datadog
if: success() || failure()
with:
api-key: ${{ secrets.DATADOG_API_KEY }}
test-go-pg:
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os }}
needs: changes
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
# This timeout must be greater than the timeout set by `go test` in
# `make test-postgres` to ensure we receive a trace of running
# goroutines. Setting this to the timeout +5m should work quite well
# even if some of the preceding steps are slow.
timeout-minutes: 25
strategy:
matrix:
os:
- ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
- name: Setup Go
uses: ./.github/actions/setup-go
- name: Setup Terraform
uses: ./.github/actions/setup-tf
# Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
- name: Setup ImDisk
if: runner.os == 'Windows'
uses: ./.github/actions/setup-imdisk
- name: Test with PostgreSQL Database
env:
POSTGRES_VERSION: "13"
TS_DEBUG_DISCO: "true"
LC_CTYPE: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
shell: bash
run: |
# By default Go will use the number of logical CPUs, which
# is a fine default.
PARALLEL_FLAG=""
make test-postgres
- name: Upload test stats to Datadog
@@ -398,8 +503,13 @@ jobs:
# even if some of the preceding steps are slow.
timeout-minutes: 25
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -425,13 +535,18 @@ jobs:
api-key: ${{ secrets.DATADOG_API_KEY }}
test-go-race:
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
needs: changes
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
timeout-minutes: 25
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -441,9 +556,54 @@ jobs:
- name: Setup Terraform
uses: ./.github/actions/setup-tf
# We run race tests with reduced parallelism because they use more CPU and we were finding
# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
# short timeouts are used.
# c.f. discussion on https://github.com/coder/coder/pull/15106
- name: Run Tests
run: |
gotestsum --junitfile="gotests.xml" -- -race ./...
gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
- name: Upload test stats to Datadog
timeout-minutes: 1
continue-on-error: true
uses: ./.github/actions/upload-datadog
if: always()
with:
api-key: ${{ secrets.DATADOG_API_KEY }}
test-go-race-pg:
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
needs: changes
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
timeout-minutes: 25
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
- name: Setup Go
uses: ./.github/actions/setup-go
- name: Setup Terraform
uses: ./.github/actions/setup-tf
# We run race tests with reduced parallelism because they use more CPU and we were finding
# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
# short timeouts are used.
# c.f. discussion on https://github.com/coder/coder/pull/15106
- name: Run Tests
env:
POSTGRES_VERSION: "16"
run: |
make test-postgres-docker
DB=ci gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
- name: Upload test stats to Datadog
timeout-minutes: 1
@@ -466,8 +626,13 @@ jobs:
if: needs.changes.outputs.tailnet-integration == 'true' || needs.changes.outputs.ci == 'true'
timeout-minutes: 20
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -487,8 +652,13 @@ jobs:
if: needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
timeout-minutes: 20
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -499,22 +669,28 @@ jobs:
working-directory: site
test-e2e:
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || 'ubuntu-latest' }}
needs: changes
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
variant:
- enterprise: false
- premium: false
name: test-e2e
- enterprise: true
name: test-e2e-enterprise
- premium: true
name: test-e2e-premium
# Skip test-e2e on forks as they don't have access to CI secrets
if: (needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main') && !(github.event.pull_request.head.repo.fork)
timeout-minutes: 20
name: ${{ matrix.variant.name }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
@@ -528,44 +704,46 @@ jobs:
- run: make gen/mark-fresh
name: make gen
- run: make site/e2e/bin/coder
name: make coder
- run: pnpm build
env:
NODE_OPTIONS: ${{ github.repository_owner == 'coder' && '--max_old_space_size=8192' || '' }}
working-directory: site
- run: pnpm playwright:install
working-directory: site
# Run tests that don't require an enterprise license without an enterprise license
# Run tests that don't require a premium license without a premium license
- run: pnpm playwright:test --forbid-only --workers 1
if: ${{ !matrix.variant.enterprise }}
if: ${{ !matrix.variant.premium }}
env:
DEBUG: pw:api
working-directory: site
# Run all of the tests with an enterprise license
# Run all of the tests with a premium license
- run: pnpm playwright:test --forbid-only --workers 1
if: ${{ matrix.variant.enterprise }}
if: ${{ matrix.variant.premium }}
env:
DEBUG: pw:api
CODER_E2E_ENTERPRISE_LICENSE: ${{ secrets.CODER_E2E_ENTERPRISE_LICENSE }}
CODER_E2E_REQUIRE_ENTERPRISE_TESTS: "1"
CODER_E2E_LICENSE: ${{ secrets.CODER_E2E_LICENSE }}
CODER_E2E_REQUIRE_PREMIUM_TESTS: "1"
working-directory: site
# Temporarily allow these to fail so that I can gather data about which
# tests are failing.
continue-on-error: true
- name: Upload Playwright Failed Tests
if: always() && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && !github.event.pull_request.head.repo.fork
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
with:
name: failed-test-videos${{ matrix.variant.enterprise && '-enterprise' || '-agpl' }}
name: failed-test-videos${{ matrix.variant.premium && '-premium' || '' }}
path: ./site/test-results/**/*.webm
retention-days: 7
- name: Upload pprof dumps
if: always() && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && !github.event.pull_request.head.repo.fork
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
with:
name: debug-pprof-dumps${{ matrix.variant.enterprise && '-enterprise' || '-agpl' }}
name: debug-pprof-dumps${{ matrix.variant.premium && '-premium' || '' }}
path: ./site/test-results/**/debug-pprof-*.txt
retention-days: 7
@@ -575,8 +753,13 @@ jobs:
needs: changes
if: needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true'
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
# Required by Chromatic for build-over-build history, otherwise we
# only get 1 commit on shallow checkout.
@@ -590,7 +773,7 @@ jobs:
# the check to pass. This is desired in PRs, but not in mainline.
- name: Publish to Chromatic (non-mainline)
if: github.ref != 'refs/heads/main' && github.repository_owner == 'coder'
uses: chromaui/action@v10
uses: chromaui/action@30b6228aa809059d46219e0f556752e8672a7e26 # v11.11.0
env:
NODE_OPTIONS: "--max_old_space_size=4096"
STORYBOOK: true
@@ -608,7 +791,7 @@ jobs:
# Prevent excessive build runs on minor version changes
skip: "@(renovate/**|dependabot/**)"
# Run TurboSnap to trace file dependencies to related stories
# and tell chromatic to only take snapshots of relevent stories
# and tell chromatic to only take snapshots of relevant stories
onlyChanged: true
# Avoid uploading single files, because that's very slow
zip: true
@@ -621,7 +804,7 @@ jobs:
# infinitely "in progress" in mainline unless we re-review each build.
- name: Publish to Chromatic (mainline)
if: github.ref == 'refs/heads/main' && github.repository_owner == 'coder'
uses: chromaui/action@v10
uses: chromaui/action@30b6228aa809059d46219e0f556752e8672a7e26 # v11.11.0
env:
NODE_OPTIONS: "--max_old_space_size=4096"
STORYBOOK: true
@@ -635,7 +818,7 @@ jobs:
workingDir: "./site"
storybookBaseDir: "./site"
# Run TurboSnap to trace file dependencies to related stories
# and tell chromatic to only take snapshots of relevent stories
# and tell chromatic to only take snapshots of relevant stories
onlyChanged: true
# Avoid uploading single files, because that's very slow
zip: true
@@ -647,8 +830,13 @@ jobs:
if: needs.changes.outputs.offlinedocs == 'true' || needs.changes.outputs.ci == 'true' || needs.changes.outputs.docs == 'true'
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
# 0 is required here for version.sh to work.
fetch-depth: 0
@@ -662,7 +850,7 @@ jobs:
run: |
mkdir -p /tmp/proto
pushd /tmp/proto
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
unzip protoc.zip
cp -r ./bin/* /usr/local/bin
cp -r ./include /usr/local/bin/include
@@ -674,10 +862,10 @@ jobs:
- name: Install go tools
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/mikefarah/yq/v4@v4.30.6
go install go.uber.org/mock/mockgen@v0.4.0
go install github.com/mikefarah/yq/v4@v4.44.3
go install go.uber.org/mock/mockgen@v0.5.0
- name: Setup sqlc
uses: ./.github/actions/setup-sqlc
@@ -707,6 +895,7 @@ jobs:
- test-go
- test-go-pg
- test-go-race
- test-go-race-pg
- test-js
- test-e2e
- offlinedocs
@@ -715,6 +904,11 @@ jobs:
# cancelled.
if: always()
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Ensure required checks
run: |
echo "Checking required checks"
@@ -724,6 +918,7 @@ jobs:
echo "- test-go: ${{ needs.test-go.result }}"
echo "- test-go-pg: ${{ needs.test-go-pg.result }}"
echo "- test-go-race: ${{ needs.test-go-race.result }}"
echo "- test-go-race-pg: ${{ needs.test-go-race-pg.result }}"
echo "- test-js: ${{ needs.test-js.result }}"
echo "- test-e2e: ${{ needs.test-e2e.result }}"
echo "- offlinedocs: ${{ needs.offlinedocs.result }}"
@@ -737,24 +932,112 @@ jobs:
echo "Required checks have passed"
# Builds the dylibs and upload it as an artifact so it can be embedded in the main build
build-dylib:
needs: changes
# We always build the dylibs on Go changes to verify we're not merging unbuildable code,
# but they need only be signed and uploaded on coder/coder main.
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Setup build tools
run: |
brew install bash gnu-getopt make
echo "$(brew --prefix bash)/bin" >> $GITHUB_PATH
echo "$(brew --prefix gnu-getopt)/bin" >> $GITHUB_PATH
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
- name: Setup Go
uses: ./.github/actions/setup-go
- name: Install rcodesign
if: ${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
run: |
set -euo pipefail
wget -O /tmp/rcodesign.tar.gz https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
sudo tar -xzf /tmp/rcodesign.tar.gz \
-C /usr/local/bin \
--strip-components=1 \
apple-codesign-0.22.0-macos-universal/rcodesign
rm /tmp/rcodesign.tar.gz
- name: Setup Apple Developer certificate and API key
if: ${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
run: |
set -euo pipefail
touch /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
chmod 600 /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
echo "$AC_CERTIFICATE_P12_BASE64" | base64 -d > /tmp/apple_cert.p12
echo "$AC_CERTIFICATE_PASSWORD" > /tmp/apple_cert_password.txt
echo "$AC_APIKEY_P8_BASE64" | base64 -d > /tmp/apple_apikey.p8
env:
AC_CERTIFICATE_P12_BASE64: ${{ secrets.AC_CERTIFICATE_P12_BASE64 }}
AC_CERTIFICATE_PASSWORD: ${{ secrets.AC_CERTIFICATE_PASSWORD }}
AC_APIKEY_P8_BASE64: ${{ secrets.AC_APIKEY_P8_BASE64 }}
- name: Build dylibs
run: |
set -euxo pipefail
go mod download
make gen/mark-fresh
make build/coder-dylib
env:
CODER_SIGN_DARWIN: ${{ github.ref == 'refs/heads/main' && '1' || '0' }}
AC_CERTIFICATE_FILE: /tmp/apple_cert.p12
AC_CERTIFICATE_PASSWORD_FILE: /tmp/apple_cert_password.txt
- name: Upload build artifacts
if: ${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: dylibs
path: |
./build/*.h
./build/*.dylib
retention-days: 7
- name: Delete Apple Developer certificate and API key
if: ${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
run: rm -f /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
build:
# This builds and publishes ghcr.io/coder/coder-preview:main for each commit
# to main branch.
needs: changes
needs:
- changes
- build-dylib
if: github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-22.04' }}
permissions:
packages: write # Needed to push images to ghcr.io
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
outputs:
IMAGE: ghcr.io/coder/coder-preview:${{ steps.build-docker.outputs.tag }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: GHCR Login
uses: docker/login-action@v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -772,6 +1055,18 @@ jobs:
- name: Install zstd
run: sudo apt-get install -y zstd
- name: Download dylibs
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: dylibs
path: ./build
- name: Insert dylibs
run: |
mv ./build/*amd64.dylib ./site/out/bin/coder-vpn-darwin-amd64.dylib
mv ./build/*arm64.dylib ./site/out/bin/coder-vpn-darwin-arm64.dylib
mv ./build/*arm64.h ./site/out/bin/coder-vpn-darwin-dylib.h
- name: Build
run: |
set -euxo pipefail
@@ -829,7 +1124,7 @@ jobs:
- name: Prune old images
if: github.ref == 'refs/heads/main'
uses: vlaurin/action-ghcr-prune@v0.6.0
uses: vlaurin/action-ghcr-prune@0cf7d39f88546edd31965acba78cdcb0be14d641 # v0.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
organization: coder
@@ -844,7 +1139,7 @@ jobs:
- name: Upload build artifacts
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
with:
name: coder
path: |
@@ -867,28 +1162,33 @@ jobs:
contents: read
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
with:
workload_identity_provider: projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
service_account: coder-ci@coder-dogfood.iam.gserviceaccount.com
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
uses: google-github-actions/setup-gcloud@6189d56e4096ee891640bb02ac264be376592d6a # v2.1.2
- name: Set up Flux CLI
uses: fluxcd/flux2/action@main
uses: fluxcd/flux2/action@5350425cdcd5fa015337e09fa502153c0275bd4b # v2.4.0
with:
# Keep this up to date with the version of flux installed in dogfood cluster
# Keep this and the github action up to date with the version of flux installed in dogfood cluster
version: "2.2.1"
- name: Get Cluster Credentials
uses: "google-github-actions/get-gke-credentials@v2"
uses: google-github-actions/get-gke-credentials@9025e8f90f2d8e0c3dafc3128cc705a26d992a6a # v2.3.0
with:
cluster_name: dogfood-v2
location: us-central1-a
@@ -924,13 +1224,18 @@ jobs:
needs: build
if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
uses: superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be # v1.5
- name: Deploy workspace proxies
run: |
@@ -954,8 +1259,13 @@ jobs:
needs: changes
if: needs.changes.outputs.db == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
# We need golang to run the migration main.go
@@ -968,3 +1278,50 @@ jobs:
- name: Setup and run sqlc vet
run: |
make sqlc-vet
notify-slack-on-failure:
needs:
- required
runs-on: ubuntu-latest
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Send Slack notification
run: |
curl -X POST -H 'Content-type: application/json' \
--data '{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "❌ CI Failure in main",
"emoji": true
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Workflow:*\n${{ github.workflow }}"
},
{
"type": "mrkdwn",
"text": "*Committer:*\n${{ github.actor }}"
},
{
"type": "mrkdwn",
"text": "*Commit:*\n${{ github.sha }}"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*View failure:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here>"
}
}
]
}' ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }}
+80 -11
View File
@@ -3,7 +3,7 @@ name: contrib
on:
issue_comment:
types: [created]
pull_request_target:
pull_request:
types:
- opened
- closed
@@ -16,31 +16,100 @@ on:
# For jobs that don't run on draft PRs.
- ready_for_review
permissions:
contents: read
# Only run one instance per PR to ensure in-order execution.
concurrency: pr-${{ github.ref }}
jobs:
# Dependabot is annoying, but this makes it a bit less so.
auto-approve-dependabot:
dependabot-automerge:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'coder/coder'
permissions:
pull-requests: write
contents: write
steps:
- name: auto-approve dependabot
uses: hmarr/auto-approve-action@v4
if: github.actor == 'dependabot[bot]'
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve the PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
dependabot-automerge-notify:
# Send a slack notification when a dependabot PR is merged.
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'coder/coder' && github.event.pull_request.merged
steps:
- name: Send Slack notification
env:
PR_URL: ${{github.event.pull_request.html_url}}
PR_TITLE: ${{github.event.pull_request.title}}
PR_NUMBER: ${{github.event.pull_request.number}}
run: |
curl -X POST -H 'Content-type: application/json' \
--data '{
"username": "dependabot",
"icon_url": "https://avatars.githubusercontent.com/u/27347476",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":pr-merged: Auto merged Dependabot PR #${{ env.PR_NUMBER }}",
"emoji": true
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "${{ env.PR_TITLE }}"
}
]
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View PR"
},
"url": "${{ env.PR_URL }}"
}
]
}
]
}' ${{ secrets.DEPENDABOT_PRS_SLACK_WEBHOOK }}
cla:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: cla
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: contributor-assistant/github-action@v2.6.0
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request'
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN: ${{ secrets.CDRCOMMUNITY_GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.CDRCI2_GITHUB_TOKEN }}
with:
remote-organization-name: "coder"
remote-repository-name: "cla"
@@ -54,10 +123,10 @@ jobs:
release-labels:
runs-on: ubuntu-latest
# Skip tagging for draft PRs.
if: ${{ github.event_name == 'pull_request_target' && !github.event.pull_request.draft }}
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft }}
steps:
- name: release-labels
uses: actions/github-script@v7
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
# This script ensures PR title and labels are in sync:
#
+15 -8
View File
@@ -22,10 +22,6 @@ on:
permissions:
contents: read
# Necessary to push docker images to ghcr.io.
packages: write
# Necessary for depot.dev authentication.
id-token: write
# Avoid running multiple jobs for the same commit.
concurrency:
@@ -33,14 +29,24 @@ concurrency:
jobs:
build:
permissions:
# Necessary for depot.dev authentication.
id-token: write
# Necessary to push docker images to ghcr.io.
packages: write
runs-on: ubuntu-latest
if: github.repository_owner == 'coder'
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Docker login
uses: docker/login-action@v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -50,16 +56,17 @@ jobs:
run: mkdir base-build-context
- name: Install depot.dev CLI
uses: depot/setup-action@v1
uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1.6.0
# This uses OIDC authentication, so no auth variables are required.
- name: Build base Docker image via depot.dev
uses: depot/build-push-action@v1
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1.14.0
with:
project: wl5hnrrkns
context: base-build-context
file: scripts/Dockerfile.base
platforms: linux/amd64,linux/arm64,linux/arm/v7
provenance: true
pull: true
no-cache: true
push: ${{ github.event_name != 'pull_request' }}
+45
View File
@@ -0,0 +1,45 @@
name: Docs CI
on:
push:
branches:
- main
paths:
- "docs/**"
- "**.md"
- ".github/workflows/docs-ci.yaml"
pull_request:
paths:
- "docs/**"
- "**.md"
- ".github/workflows/docs-ci.yaml"
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Node
uses: ./.github/actions/setup-node
- uses: tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
id: changed-files
with:
files: |
docs/**
**.md
separator: ","
- name: lint
if: steps.changed-files.outputs.any_changed == 'true'
run: |
pnpm exec markdownlint-cli2 ${{ steps.changed-files.outputs.all_changed_files }}
- name: fmt
if: steps.changed-files.outputs.any_changed == 'true'
run: |
# markdown-table-formatter requires a space separated list of files
echo ${{ steps.changed-files.outputs.all_changed_files }} | tr ',' '\n' | pnpm exec markdown-table-formatter --check
+40 -21
View File
@@ -24,14 +24,25 @@ permissions:
jobs:
build_image:
if: github.actor != 'dependabot[bot]' # Skip Dependabot PRs
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || 'ubuntu-latest' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
- name: Setup GHA Nix cache
uses: DeterminateSystems/magic-nix-cache-action@6221693898146dc97e38ad0e013488a16477a4c4 # v9
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v8
uses: tj-actions/branch-names@6871f53176ad61624f978536bbf089c574dc19a2 # v8.0.1
- name: "Branch name to Docker tag name"
id: docker-tag-name
@@ -42,20 +53,20 @@ jobs:
echo "tag=${tag}" >> $GITHUB_OUTPUT
- name: Set up Depot CLI
uses: depot/setup-action@v1
uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1.6.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Login to DockerHub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push Non-Nix image
uses: depot/build-push-action@v1
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1.14.0
with:
project: b4q6ltmpzh
token: ${{ secrets.DEPOT_TOKEN }}
@@ -66,31 +77,39 @@ jobs:
push: ${{ github.ref == 'refs/heads/main' }}
tags: "codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest"
- name: Build and push Nix image
uses: depot/build-push-action@v1
with:
project: b4q6ltmpzh
token: ${{ secrets.DEPOT_TOKEN }}
buildx-fallback: true
context: "."
file: "dogfood/contents/Dockerfile.nix"
pull: true
save: true
push: ${{ github.ref == 'refs/heads/main' }}
tags: "codercom/oss-dogfood-nix:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood-nix:latest"
- name: Build Nix image
run: nix build .#dev_image
- name: Push Nix image
if: github.ref == 'refs/heads/main'
run: |
docker load -i result
CURRENT_SYSTEM=$(nix eval --impure --raw --expr 'builtins.currentSystem')
docker image tag codercom/oss-dogfood-nix:latest-$CURRENT_SYSTEM codercom/oss-dogfood-nix:${{ steps.docker-tag-name.outputs.tag }}
docker image push codercom/oss-dogfood-nix:${{ steps.docker-tag-name.outputs.tag }}
docker image tag codercom/oss-dogfood-nix:latest-$CURRENT_SYSTEM codercom/oss-dogfood-nix:latest
docker image push codercom/oss-dogfood-nix:latest
deploy_template:
needs: build_image
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Terraform
uses: ./.github/actions/setup-tf
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
with:
workload_identity_provider: projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
service_account: coder-ci@coder-dogfood.iam.gserviceaccount.com
-26
View File
@@ -1,26 +0,0 @@
{
"ignorePatterns": [
{
"pattern": "://localhost"
},
{
"pattern": "://.*.?example\\.com"
},
{
"pattern": "developer.github.com"
},
{
"pattern": "docs.github.com"
},
{
"pattern": "support.google.com"
},
{
"pattern": "tailscale.com"
},
{
"pattern": "wireguard.com"
}
],
"aliveStatusCodes": [200, 0]
}
+118 -37
View File
@@ -3,21 +3,37 @@
name: nightly-gauntlet
on:
schedule:
# Every day at midnight
- cron: "0 0 * * *"
# Every day at 4AM
- cron: "0 4 * * 1-5"
workflow_dispatch:
permissions:
contents: read
jobs:
go-race:
# While GitHub's toaster runners are likelier to flake, we want consistency
# between this environment and the regular test environment for DataDog
# statistics and to only show real workflow threats.
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
# This runner costs 0.016 USD per minute,
# so 0.016 * 240 = 3.84 USD per run.
timeout-minutes: 240
test-go-pg:
runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
if: github.ref == 'refs/heads/main'
# This timeout must be greater than the timeout set by `go test` in
# `make test-postgres` to ensure we receive a trace of running
# goroutines. Setting this to the timeout +5m should work quite well
# even if some of the preceding steps are slow.
timeout-minutes: 25
strategy:
matrix:
os:
- macos-latest
- windows-2022
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
- name: Setup Go
uses: ./.github/actions/setup-go
@@ -25,36 +41,101 @@ jobs:
- name: Setup Terraform
uses: ./.github/actions/setup-tf
- name: Run Tests
run: |
# -race is likeliest to catch flaky tests
# due to correctness detection and its performance
# impact.
gotestsum --junitfile="gotests.xml" -- -timeout=240m -count=10 -race ./...
# Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
- name: Setup ImDisk
if: runner.os == 'Windows'
uses: ./.github/actions/setup-imdisk
- name: Upload test results to DataDog
- name: Test with PostgreSQL Database
env:
POSTGRES_VERSION: "13"
TS_DEBUG_DISCO: "true"
LC_CTYPE: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
shell: bash
run: |
# if macOS, install google-chrome for scaletests
# As another concern, should we really have this kind of external dependency
# requirement on standard CI?
if [ "${{ matrix.os }}" == "macos-latest" ]; then
brew install google-chrome
fi
# By default Go will use the number of logical CPUs, which
# is a fine default.
PARALLEL_FLAG=""
# macOS will output "The default interactive shell is now zsh"
# intermittently in CI...
if [ "${{ matrix.os }}" == "macos-latest" ]; then
touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile
fi
if [ "${{ runner.os }}" == "Windows" ]; then
# Create a temp dir on the R: ramdisk drive for Windows. The default
# C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755
mkdir -p "R:/temp/embedded-pg"
go run scripts/embedded-pg/main.go -path "R:/temp/embedded-pg"
else
go run scripts/embedded-pg/main.go
fi
# Reduce test parallelism, mirroring what we do for race tests.
# We'd been encountering issues with timing related flakes, and
# this seems to help.
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./...
- name: Upload test stats to Datadog
timeout-minutes: 1
continue-on-error: true
uses: ./.github/actions/upload-datadog
if: always()
if: success() || failure()
with:
api-key: ${{ secrets.DATADOG_API_KEY }}
go-timing:
# We run these tests with p=1 so we don't need a lot of compute.
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04' || 'ubuntu-latest' }}
timeout-minutes: 10
notify-slack-on-failure:
needs:
- test-go-pg
runs-on: ubuntu-latest
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/setup-go
- name: Run Tests
- name: Send Slack notification
run: |
gotestsum --junitfile="gotests.xml" -- --tags="timing" -p=1 -run='_Timing/' ./...
- name: Upload test results to DataDog
uses: ./.github/actions/upload-datadog
if: always()
with:
api-key: ${{ secrets.DATADOG_API_KEY }}
curl -X POST -H 'Content-type: application/json' \
--data '{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "❌ Nightly gauntlet failed",
"emoji": true
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Workflow:*\n${{ github.workflow }}"
},
{
"type": "mrkdwn",
"text": "*Committer:*\n${{ github.actor }}"
},
{
"type": "mrkdwn",
"text": "*Commit:*\n${{ github.sha }}"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*View failure:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here>"
}
}
]
}' ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }}
+6 -1
View File
@@ -13,5 +13,10 @@ jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Assign author
uses: toshimaru/auto-author-assign@v2.1.1
uses: toshimaru/auto-author-assign@16f0022cf3d7970c106d8d1105f75a1165edb516 # v2.1.1
+10 -2
View File
@@ -9,12 +9,20 @@ on:
required: true
permissions:
packages: write
contents: read
jobs:
cleanup:
runs-on: "ubuntu-latest"
permissions:
# Necessary to delete docker images from ghcr.io.
packages: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Get PR number
id: pr_number
run: |
@@ -26,7 +34,7 @@ jobs:
- name: Delete image
continue-on-error: true
uses: bots-house/ghcr-delete-image-action@v1.1.0
uses: bots-house/ghcr-delete-image-action@3827559c68cb4dcdf54d813ea9853be6d468d3a4 # v1.1.0
with:
owner: coder
name: coder-preview
+72 -28
View File
@@ -7,6 +7,7 @@ on:
push:
branches-ignore:
- main
- "temp-cherry-pick-*"
workflow_dispatch:
inputs:
experiments:
@@ -30,8 +31,6 @@ env:
permissions:
contents: read
packages: write
pull-requests: write # needed for commenting on PRs
jobs:
check_pr:
@@ -39,8 +38,13 @@ jobs:
outputs:
PR_OPEN: ${{ steps.check_pr.outputs.pr_open }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Check if PR is open
id: check_pr
@@ -69,8 +73,13 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
@@ -102,7 +111,7 @@ jobs:
set -euo pipefail
mkdir -p ~/.kube
echo "${{ secrets.PR_DEPLOYMENTS_KUBECONFIG_BASE64 }}" | base64 --decode > ~/.kube/config
chmod 644 ~/.kube/config
chmod 600 ~/.kube/config
export KUBECONFIG=~/.kube/config
- name: Check if the helm deployment already exists
@@ -119,7 +128,7 @@ jobs:
echo "NEW=$NEW" >> $GITHUB_OUTPUT
- name: Check changed files
uses: dorny/paths-filter@v3
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
base: ${{ github.ref }}
@@ -154,16 +163,23 @@ jobs:
set -euo pipefail
# build if the workflow is manually triggered and the deployment doesn't exist (first build or force rebuild)
echo "first_or_force_build=${{ (github.event_name == 'workflow_dispatch' && steps.check_deployment.outputs.NEW == 'true') || github.event.inputs.build == 'true' }}" >> $GITHUB_OUTPUT
# build if the deployment alreday exist and there are changes in the files that we care about (automatic updates)
# build if the deployment already exist and there are changes in the files that we care about (automatic updates)
echo "automatic_rebuild=${{ steps.check_deployment.outputs.NEW == 'false' && steps.filter.outputs.all_count > steps.filter.outputs.ignored_count }}" >> $GITHUB_OUTPUT
comment-pr:
needs: get_info
if: needs.get_info.outputs.BUILD == 'true' || github.event.inputs.deploy == 'true'
runs-on: "ubuntu-latest"
permissions:
pull-requests: write # needed for commenting on PRs
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Find Comment
uses: peter-evans/find-comment@v3
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: fc
with:
issue-number: ${{ needs.get_info.outputs.PR_NUMBER }}
@@ -173,7 +189,7 @@ jobs:
- name: Comment on PR
id: comment_id
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ needs.get_info.outputs.PR_NUMBER }}
@@ -190,7 +206,10 @@ jobs:
# Run build job only if there are changes in the files that we care about or if the workflow is manually triggered with --build flag
if: needs.get_info.outputs.BUILD == 'true'
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
# This concurrency only cancels build jobs if a new build is triggred. It will avoid cancelling the current deployemtn in case of docs chnages.
permissions:
# Necessary to push docker images to ghcr.io.
packages: write
# This concurrency only cancels build jobs if a new build is triggred. It will avoid cancelling the current deployemtn in case of docs changes.
concurrency:
group: build-${{ github.workflow }}-${{ github.ref }}-${{ needs.get_info.outputs.BUILD }}
cancel-in-progress: true
@@ -198,8 +217,13 @@ jobs:
DOCKER_CLI_EXPERIMENTAL: "enabled"
CODER_IMAGE_TAG: ${{ needs.get_info.outputs.CODER_IMAGE_TAG }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
@@ -213,7 +237,7 @@ jobs:
uses: ./.github/actions/setup-sqlc
- name: GHCR Login
uses: docker/login-action@v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -242,6 +266,8 @@ jobs:
always() && (needs.build.result == 'success' || needs.build.result == 'skipped') &&
(needs.get_info.outputs.BUILD == 'true' || github.event.inputs.deploy == 'true')
runs-on: "ubuntu-latest"
permissions:
pull-requests: write # needed for commenting on PRs
env:
CODER_IMAGE_TAG: ${{ needs.get_info.outputs.CODER_IMAGE_TAG }}
PR_NUMBER: ${{ needs.get_info.outputs.PR_NUMBER }}
@@ -249,12 +275,17 @@ jobs:
PR_URL: ${{ needs.get_info.outputs.PR_URL }}
PR_HOSTNAME: "pr${{ needs.get_info.outputs.PR_NUMBER }}.${{ secrets.PR_DEPLOYMENTS_DOMAIN }}"
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Set up kubeconfig
run: |
set -euo pipefail
mkdir -p ~/.kube
echo "${{ secrets.PR_DEPLOYMENTS_KUBECONFIG_BASE64 }}" | base64 --decode > ~/.kube/config
chmod 644 ~/.kube/config
chmod 600 ~/.kube/config
export KUBECONFIG=~/.kube/config
- name: Check if image exists
@@ -294,7 +325,7 @@ jobs:
kubectl create namespace "pr${{ env.PR_NUMBER }}"
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Check and Create Certificate
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
@@ -391,14 +422,14 @@ jobs:
"${DEST}" version
mv "${DEST}" /usr/local/bin/coder
- name: Create first user, template and workspace
- name: Create first user
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
id: setup_deployment
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
# Create first user
# create a masked random password 12 characters long
password=$(openssl rand -base64 16 | tr -d "=+/" | cut -c1-12)
@@ -407,20 +438,22 @@ jobs:
echo "password=$password" >> $GITHUB_OUTPUT
coder login \
--first-user-username coder \
--first-user-username pr${{ env.PR_NUMBER }}-admin \
--first-user-email pr${{ env.PR_NUMBER }}@coder.com \
--first-user-password $password \
--first-user-trial \
--first-user-trial=false \
--use-token-as-session \
https://${{ env.PR_HOSTNAME }}
# Create template
cd ./.github/pr-deployments/template
coder templates push -y --variable namespace=pr${{ env.PR_NUMBER }} kubernetes
# Create a user for the github.actor
# TODO: update once https://github.com/coder/coder/issues/15466 is resolved
# coder users create \
# --username ${{ github.actor }} \
# --login-type github
# Create workspace
coder create --template="kubernetes" kube --parameter cpu=2 --parameter memory=4 --parameter home_disk_size=2 -y
coder stop kube -y
# promote the user to admin role
# coder org members edit-role ${{ github.actor }} organization-admin
# TODO: update once https://github.com/coder/internal/issues/207 is resolved
- name: Send Slack notification
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
@@ -432,7 +465,7 @@ jobs:
"pr_url": "'"${{ env.PR_URL }}"'",
"pr_title": "'"${{ env.PR_TITLE }}"'",
"pr_access_url": "'"https://${{ env.PR_HOSTNAME }}"'",
"pr_username": "'"test"'",
"pr_username": "'"pr${{ env.PR_NUMBER }}-admin"'",
"pr_email": "'"pr${{ env.PR_NUMBER }}@coder.com"'",
"pr_password": "'"${{ steps.setup_deployment.outputs.password }}"'",
"pr_actor": "'"${{ github.actor }}"'"
@@ -441,7 +474,7 @@ jobs:
echo "Slack notification sent"
- name: Find Comment
uses: peter-evans/find-comment@v3
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: fc
with:
issue-number: ${{ env.PR_NUMBER }}
@@ -450,7 +483,7 @@ jobs:
direction: last
- name: Comment on PR
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
env:
STATUS: ${{ needs.get_info.outputs.NEW == 'true' && 'Created' || 'Updated' }}
with:
@@ -465,3 +498,14 @@ jobs:
cc: @${{ github.actor }}
reactions: rocket
reactions-edit-mode: replace
- name: Create template and workspace
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
run: |
set -euo pipefail
cd .github/pr-deployments/template
coder templates push -y --variable namespace=pr${{ env.PR_NUMBER }} kubernetes
# Create workspace
coder create --template="kubernetes" kube --parameter cpu=2 --parameter memory=4 --parameter home_disk_size=2 -y
coder stop kube -y
+9 -1
View File
@@ -5,13 +5,21 @@ on:
tags:
- "v*"
permissions:
contents: read
jobs:
network-performance:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Run Schmoder CI
uses: benc-uk/workflow-dispatch@v1.2.4
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4
with:
workflow: ci.yaml
repo: coder/schmoder
+139 -23
View File
@@ -18,12 +18,7 @@ on:
default: false
permissions:
# Required to publish a release
contents: write
# Necessary to push docker images to ghcr.io.
packages: write
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
id-token: write
contents: read
concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -37,17 +32,109 @@ env:
CODER_RELEASE_NOTES: ${{ inputs.release_notes }}
jobs:
# build-dylib is a separate job to build the dylib on macOS.
build-dylib:
runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
# If the event that triggered the build was an annotated tag (which our
# tags are supposed to be), actions/checkout has a bug where the tag in
# question is only a lightweight tag and not a full annotated tag. This
# command seems to fix it.
# https://github.com/actions/checkout/issues/290
- name: Fetch git tags
run: git fetch --tags --force
- name: Setup build tools
run: |
brew install bash gnu-getopt make
echo "$(brew --prefix bash)/bin" >> $GITHUB_PATH
echo "$(brew --prefix gnu-getopt)/bin" >> $GITHUB_PATH
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
- name: Setup Go
uses: ./.github/actions/setup-go
- name: Install rcodesign
run: |
set -euo pipefail
wget -O /tmp/rcodesign.tar.gz https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
sudo tar -xzf /tmp/rcodesign.tar.gz \
-C /usr/local/bin \
--strip-components=1 \
apple-codesign-0.22.0-macos-universal/rcodesign
rm /tmp/rcodesign.tar.gz
- name: Setup Apple Developer certificate and API key
run: |
set -euo pipefail
touch /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
chmod 600 /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
echo "$AC_CERTIFICATE_P12_BASE64" | base64 -d > /tmp/apple_cert.p12
echo "$AC_CERTIFICATE_PASSWORD" > /tmp/apple_cert_password.txt
echo "$AC_APIKEY_P8_BASE64" | base64 -d > /tmp/apple_apikey.p8
env:
AC_CERTIFICATE_P12_BASE64: ${{ secrets.AC_CERTIFICATE_P12_BASE64 }}
AC_CERTIFICATE_PASSWORD: ${{ secrets.AC_CERTIFICATE_PASSWORD }}
AC_APIKEY_P8_BASE64: ${{ secrets.AC_APIKEY_P8_BASE64 }}
- name: Build dylibs
run: |
set -euxo pipefail
go mod download
make gen/mark-fresh
make build/coder-dylib
env:
CODER_SIGN_DARWIN: 1
AC_CERTIFICATE_FILE: /tmp/apple_cert.p12
AC_CERTIFICATE_PASSWORD_FILE: /tmp/apple_cert_password.txt
- name: Upload build artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: dylibs
path: |
./build/*.h
./build/*.dylib
retention-days: 7
- name: Delete Apple Developer certificate and API key
run: rm -f /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
release:
name: Build and publish
needs: build-dylib
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
permissions:
# Required to publish a release
contents: write
# Necessary to push docker images to ghcr.io.
packages: write
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
id-token: write
env:
# Necessary for Docker manifest
DOCKER_CLI_EXPERIMENTAL: "enabled"
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
@@ -116,7 +203,7 @@ jobs:
cat "$CODER_RELEASE_NOTES_FILE"
- name: Docker Login
uses: docker/login-action@v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -130,7 +217,7 @@ jobs:
# Necessary for signing Windows binaries.
- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: "zulu"
java-version: "11.0"
@@ -138,6 +225,18 @@ jobs:
- name: Install nsis and zstd
run: sudo apt-get install -y nsis zstd
- name: Download dylibs
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: dylibs
path: ./build
- name: Insert dylibs
run: |
mv ./build/*amd64.dylib ./site/out/bin/coder-vpn-darwin-amd64.dylib
mv ./build/*arm64.dylib ./site/out/bin/coder-vpn-darwin-arm64.dylib
mv ./build/*arm64.h ./site/out/bin/coder-vpn-darwin-dylib.h
- name: Install nfpm
run: |
set -euo pipefail
@@ -185,14 +284,14 @@ jobs:
# Setup GCloud for signing Windows binaries.
- name: Authenticate to Google Cloud
id: gcloud_auth
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
with:
workload_identity_provider: ${{ secrets.GCP_CODE_SIGNING_WORKLOAD_ID_PROVIDER }}
service_account: ${{ secrets.GCP_CODE_SIGNING_SERVICE_ACCOUNT }}
token_format: "access_token"
- name: Setup GCloud SDK
uses: "google-github-actions/setup-gcloud@v2"
uses: google-github-actions/setup-gcloud@6189d56e4096ee891640bb02ac264be376592d6a # v2.1.2
- name: Build binaries
run: |
@@ -245,17 +344,18 @@ jobs:
- name: Install depot.dev CLI
if: steps.image-base-tag.outputs.tag != ''
uses: depot/setup-action@v1
uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1.6.0
# This uses OIDC authentication, so no auth variables are required.
- name: Build base Docker image via depot.dev
if: steps.image-base-tag.outputs.tag != ''
uses: depot/build-push-action@v1
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1.14.0
with:
project: wl5hnrrkns
context: base-build-context
file: scripts/Dockerfile.base
platforms: linux/amd64,linux/arm64,linux/arm/v7
provenance: true
pull: true
no-cache: true
push: true
@@ -263,6 +363,7 @@ jobs:
${{ steps.image-base-tag.outputs.tag }}
- name: Verify that images are pushed properly
if: steps.image-base-tag.outputs.tag != ''
run: |
# retry 10 times with a 5 second delay as the images may not be
# available immediately
@@ -295,10 +396,6 @@ jobs:
run: |
set -euxo pipefail
# build Docker images for each architecture
version="$(./scripts/version.sh)"
make build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
# we can't build multi-arch if the images aren't pushed, so quit now
# if dry-running
if [[ "$CODER_RELEASE" != *t* ]]; then
@@ -306,6 +403,10 @@ jobs:
exit 0
fi
# build Docker images for each architecture
version="$(./scripts/version.sh)"
make build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
# build and push multi-arch manifest, this depends on the other images
# being pushed so will automatically push them.
make push/build/coder_"$version"_linux.tag
@@ -358,13 +459,13 @@ jobs:
CODER_GPG_RELEASE_KEY_BASE64: ${{ secrets.GPG_RELEASE_KEY_BASE64 }}
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_ID_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Setup GCloud SDK
uses: "google-github-actions/setup-gcloud@v2"
uses: google-github-actions/setup-gcloud@6189d56e4096ee891640bb02ac264be376592d6a # 2.1.2
- name: Publish Helm Chart
if: ${{ !inputs.dry_run }}
@@ -383,7 +484,7 @@ jobs:
- name: Upload artifacts to actions (if dry-run)
if: ${{ inputs.dry_run }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
with:
name: release-artifacts
path: |
@@ -398,7 +499,7 @@ jobs:
- name: Send repository-dispatch event
if: ${{ !inputs.dry_run }}
uses: peter-evans/repository-dispatch@v3
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
with:
token: ${{ secrets.CDRCI_GITHUB_TOKEN }}
repository: coder/packages
@@ -414,6 +515,11 @@ jobs:
steps:
# TODO: skip this if it's not a new release (i.e. a backport). This is
# fine right now because it just makes a PR that we can close.
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Update homebrew
env:
# Variables used by the `gh` command
@@ -485,13 +591,18 @@ jobs:
if: ${{ !inputs.dry_run }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Sync fork
run: gh repo sync cdrci/winget-pkgs -b master
env:
GH_TOKEN: ${{ secrets.CDRCI_GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
@@ -570,8 +681,13 @@ jobs:
needs: release
if: ${{ !inputs.dry_run }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
+52
View File
@@ -0,0 +1,52 @@
name: OpenSSF Scorecard
on:
branch_protection_rule:
schedule:
- cron: "27 7 * * 3" # A random time to run weekly
push:
branches: ["main"]
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: "Checkout code"
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
repo_token: ${{ secrets.GITHUB_TOKEN }}
publish_results: true
# Upload the results as artifacts.
- name: "Upload artifact"
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
with:
sarif_file: results.sarif
+36 -24
View File
@@ -3,7 +3,6 @@ name: "security"
permissions:
actions: read
contents: read
security-events: write
on:
workflow_dispatch:
@@ -23,16 +22,23 @@ concurrency:
jobs:
codeql:
permissions:
security-events: write
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Go
uses: ./.github/actions/setup-go
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
with:
languages: go, javascript
@@ -42,7 +48,7 @@ jobs:
rm Makefile
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
- name: Send Slack notification on failure
if: ${{ failure() }}
@@ -56,10 +62,17 @@ jobs:
"${{ secrets.SLACK_SECURITY_FAILURE_WEBHOOK_URL }}"
trivy:
permissions:
security-events: write
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
@@ -73,25 +86,32 @@ jobs:
uses: ./.github/actions/setup-sqlc
- name: Install yq
run: go run github.com/mikefarah/yq/v4@v4.30.6
run: go run github.com/mikefarah/yq/v4@v4.44.3
- name: Install mockgen
run: go install go.uber.org/mock/mockgen@v0.4.0
run: go install go.uber.org/mock/mockgen@v0.5.0
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
- name: Install protoc-gen-go-drpc
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34
- name: Install Protoc
run: |
# protoc must be in lockstep with our dogfood Dockerfile or the
# version in the comments will differ. This is also defined in
# ci.yaml.
set -x
cd dogfood
set -euxo pipefail
cd dogfood/contents
mkdir -p /usr/local/bin
mkdir -p /usr/local/include
DOCKER_BUILDKIT=1 docker build . --target proto -t protoc
protoc_path=/usr/local/bin/protoc
docker run --rm --entrypoint cat protoc /tmp/bin/protoc > $protoc_path
chmod +x $protoc_path
protoc --version
# Copy the generated files to the include directory.
docker run --rm -v /usr/local/include:/target protoc cp -r /tmp/include/google /target/
ls -la /usr/local/include/google/protobuf/
stat /usr/local/include/google/protobuf/timestamp.proto
- name: Build Coder linux amd64 Docker image
id: build
@@ -110,11 +130,13 @@ jobs:
# the registry.
export CODER_IMAGE_BUILD_BASE_TAG="$(CODER_IMAGE_BASE=coder-base ./scripts/image_tag.sh --version "$version")"
make -j "$image_job"
# We would like to use make -j here, but it doesn't work with the some recent additions
# to our code generation.
make "$image_job"
echo "image=$(cat "$image_job")" >> $GITHUB_OUTPUT
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0
with:
image-ref: ${{ steps.build.outputs.image }}
format: sarif
@@ -122,28 +144,18 @@ jobs:
severity: "CRITICAL,HIGH"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
with:
sarif_file: trivy-results.sarif
category: "Trivy"
- name: Upload Trivy scan results as an artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
with:
name: trivy
path: trivy-results.sarif
retention-days: 7
# Prisma cloud scan runs last because it fails the entire job if it
# detects vulnerabilities. :|
- name: Run Prisma Cloud image scan
uses: PaloAltoNetworks/prisma-cloud-scan@v1
with:
pcc_console_url: ${{ secrets.PRISMA_CLOUD_URL }}
pcc_user: ${{ secrets.PRISMA_CLOUD_ACCESS_KEY }}
pcc_pass: ${{ secrets.PRISMA_CLOUD_SECRET_KEY }}
image_name: ${{ steps.build.outputs.image }}
- name: Send Slack notification on failure
if: ${{ failure() }}
run: |
+35 -9
View File
@@ -1,19 +1,29 @@
name: Stale Issue, Banch and Old Workflows Cleanup
name: Stale Issue, Branch and Old Workflows Cleanup
on:
schedule:
# Every day at midnight
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
issues:
runs-on: ubuntu-latest
permissions:
# Needed to close issues.
issues: write
# Needed to close PRs.
pull-requests: write
actions: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: stale
uses: actions/stale@v9.0.0
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
stale-issue-label: "stale"
stale-pr-label: "stale"
@@ -34,7 +44,7 @@ jobs:
# Start with the oldest issues, always.
ascending: true
- name: "Close old issues labeled likely-no"
uses: actions/github-script@v7
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
@@ -60,7 +70,7 @@ jobs:
});
const labelEvent = timeline.data.find(event => event.event === 'labeled' && event.label.name === 'likely-no');
if (labelEvent) {
console.log(`Issue #${issue.number} was labeled with 'likely-no' at ${labelEvent.created_at}`);
@@ -81,11 +91,19 @@ jobs:
branches:
runs-on: ubuntu-latest
permissions:
# Needed to delete branches.
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Run delete-old-branches-action
uses: beatlabs/delete-old-branches-action@v0.0.10
uses: beatlabs/delete-old-branches-action@6e94df089372a619c01ae2c2f666bf474f890911 # v0.0.10
with:
repo_token: ${{ github.token }}
date: "6 months ago"
@@ -95,9 +113,17 @@ jobs:
exclude_open_pr_branches: true
del_runs:
runs-on: ubuntu-latest
permissions:
# Needed to delete workflow runs.
actions: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Delete PR Cleanup workflow runs
uses: Mattraks/delete-workflow-runs@v2
uses: Mattraks/delete-workflow-runs@39f0bbed25d76b34de5594dceab824811479e5de # v2.0.6
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
@@ -106,7 +132,7 @@ jobs:
delete_workflow_pattern: pr-cleanup.yaml
- name: Delete PR Deploy workflow skipped runs
uses: Mattraks/delete-workflow-runs@v2
uses: Mattraks/delete-workflow-runs@39f0bbed25d76b34de5594dceab824811479e5de # v2.0.6
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
+4 -1
View File
@@ -22,6 +22,8 @@ pn = "pn"
EDE = "EDE"
# HELO is an SMTP command
HELO = "HELO"
LKE = "LKE"
byt = "byt"
[files]
extend-exclude = [
@@ -33,11 +35,12 @@ extend-exclude = [
# These files contain base64 strings that confuse the detector
"**XService**.ts",
"**identity.go",
"scripts/ci-report/testdata/**",
"**/*_test.go",
"**/*.test.tsx",
"**/pnpm-lock.yaml",
"tailnet/testdata/**",
"site/src/pages/SetupPage/countries.tsx",
"provisioner/terraform/testdata/**",
# notifications' golden files confuse the detector because of quoted-printable encoding
"coderd/notifications/testdata/**"
]
+18 -8
View File
@@ -10,23 +10,33 @@ on:
paths:
- "docs/**"
permissions:
contents: read
jobs:
check-docs:
runs-on: ubuntu-latest
# later versions of Ubuntu have disabled unprivileged user namespaces, which are required by the action
runs-on: ubuntu-22.04
permissions:
pull-requests: write # required to post PR review comments by the action
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Check Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
uses: umbrelladocs/action-linkspector@de84085e0f51452a470558693d7d308fbb2fa261 # v1.2.5
id: markdown-link-check
# checks all markdown files from /docs including all subfolders
with:
use-quiet-mode: "yes"
use-verbose-mode: "yes"
config-file: ".github/workflows/mlc_config.json"
folder-path: "docs/"
file-path: "./README.md"
reporter: github-pr-review
config_file: ".github/.linkspector.yml"
fail_on_error: "true"
filter_mode: "nofilter"
- name: Send Slack notification
if: failure() && github.event_name == 'schedule'
+10
View File
@@ -17,6 +17,8 @@ yarn-error.log
# Allow VSCode recommendations and default settings in project root.
!/.vscode/extensions.json
!/.vscode/settings.json
# Allow code snippets
!/.vscode/*.code-snippets
# Front-end ignore patterns.
.next/
@@ -34,6 +36,7 @@ site/.swc
.gen-golden
# Build
bin/
build/
dist/
out/
@@ -52,6 +55,7 @@ site/stats/
# direnv
.envrc
.direnv
*.test
# Loadtesting
@@ -71,3 +75,9 @@ result
# pnpm
.pnpm-store/
# Zed
.zed_server
# dlv debug binaries for go tests
__debug_bin*
+4 -3
View File
@@ -175,8 +175,6 @@ linters-settings:
- name: modifies-value-receiver
- name: package-comments
- name: range
- name: range-val-address
- name: range-val-in-closure
- name: receiver-naming
- name: redefines-builtin-id
- name: string-of-int
@@ -199,6 +197,10 @@ linters-settings:
govet:
disable:
- loopclosure
gosec:
excludes:
# Implicit memory aliasing of items from a range statement (irrelevant as of Go v1.22)
- G601
issues:
# Rules listed here: https://github.com/securego/gosec#available-rules
@@ -238,7 +240,6 @@ linters:
- errname
- errorlint
- exhaustruct
- exportloopref
- forcetypeassert
- gocritic
# gocyclo is may be useful in the future when we start caring
+31
View File
@@ -0,0 +1,31 @@
// Example markdownlint configuration with all properties set to their default value
{
"MD010": { "spaces_per_tab": 4}, // No hard tabs: we use 4 spaces per tab
"MD013": false, // Line length: we are not following a strict line lnegth in markdown files
"MD024": { "siblings_only": true }, // Multiple headings with the same content:
"MD033": false, // Inline HTML: we use it in some places
"MD034": false, // Bare URL: we use it in some places in generated docs e.g.
// codersdk/deployment.go L597, L1177, L2287, L2495, L2533
// codersdk/workspaceproxy.go L196, L200-L201
// coderd/tracing/exporter.go L26
// cli/exp_scaletest.go L-9
"MD041": false, // First line in file should be a top level heading: All of our changelogs do not start with a top level heading
// TODO: We need to update /home/coder/repos/coder/coder/scripts/release/generate_release_notes.sh to generate changelogs that follow this rule
"MD052": false, // Image reference: Not a valid reference in generated docs
// docs/reference/cli/server.md L628
"MD055": false, // Table pipe style: Some of the generated tables do not have ending pipes
// docs/reference/api/schema.md
// docs/reference/api/templates.md
// docs/reference/cli/server.md
"MD056": false // Table column count: Some of the auto-generated tables have issues. TODO: This is probably because of splitting cell content to multiple lines.
// docs/reference/api/schema.md
// docs/reference/api/templates.md
}
-91
View File
@@ -1,91 +0,0 @@
# Code generated by Makefile (.gitignore .prettierignore.include). DO NOT EDIT.
# .gitignore:
# Common ignore patterns, these rules applies in both root and subdirectories.
.DS_Store
.eslintcache
.gitpod.yml
.idea
**/*.swp
gotests.coverage
gotests.xml
gotests_stats.json
gotests.json
node_modules/
vendor/
yarn-error.log
# VSCode settings.
**/.vscode/*
# Allow VSCode recommendations and default settings in project root.
!/.vscode/extensions.json
!/.vscode/settings.json
# Front-end ignore patterns.
.next/
site/build-storybook.log
site/coverage/
site/storybook-static/
site/test-results/*
site/e2e/test-results/*
site/e2e/states/*.json
site/e2e/.auth.json
site/playwright-report/*
site/.swc
# Make target for updating golden files (any dir).
.gen-golden
# Build
build/
dist/
out/
# Bundle analysis
site/stats/
*.tfstate
*.tfstate.backup
*.tfplan
*.lock.hcl
.terraform/
**/.coderv2/*
**/__debug_bin
# direnv
.envrc
*.test
# Loadtesting
./scaletest/terraform/.terraform
./scaletest/terraform/.terraform.lock.hcl
scaletest/terraform/secrets.tfvars
.terraform.tfstate.*
# Nix
result
# Data dumps from unit tests
**/*.test.sql
# Filebrowser.db
**/filebrowser.db
# pnpm
.pnpm-store/
# .prettierignore.include:
# Helm templates contain variables that are invalid YAML and can't be formatted
# by Prettier.
helm/**/templates/*.yaml
# Testdata shouldn't be formatted.
testdata/
# Ignore generated files
**/pnpm-lock.yaml
**/*.gen.json
# Everything in site/ is formatted by Biome. For the rest of the repo though, we
# need broader language support.
site/
-14
View File
@@ -1,14 +0,0 @@
# Helm templates contain variables that are invalid YAML and can't be formatted
# by Prettier.
helm/**/templates/*.yaml
# Testdata shouldn't be formatted.
testdata/
# Ignore generated files
**/pnpm-lock.yaml
**/*.gen.json
# Everything in site/ is formatted by Biome. For the rest of the repo though, we
# need broader language support.
site/
+8 -7
View File
@@ -1,15 +1,16 @@
{
"recommendations": [
"biomejs.biome",
"bradlc.vscode-tailwindcss",
"DavidAnson.vscode-markdownlint",
"EditorConfig.EditorConfig",
"emeraldwalk.runonsave",
"foxundermoon.shell-format",
"github.vscode-codeql",
"golang.go",
"hashicorp.terraform",
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"emeraldwalk.runonsave",
"zxh404.vscode-proto3",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"EditorConfig.EditorConfig",
"biomejs.biome"
"tekumara.typos-vscode",
"zxh404.vscode-proto3"
]
}
+46
View File
@@ -0,0 +1,46 @@
{
// For info about snippets, visit https://code.visualstudio.com/docs/editor/userdefinedsnippets
"admonition": {
"prefix": "#callout",
"body": [
"<blockquote class=\"admonition ${1|caution,important,note,tip,warning|}\">\n",
"${TM_SELECTED_TEXT:${2:add info here}}\n",
"</blockquote>\n"
],
"description": "callout admonition caution info note tip warning"
},
"fenced code block": {
"prefix": "#codeblock",
"body": ["```${1|apache,bash,console,diff,Dockerfile,env,go,hcl,ini,json,lisp,md,powershell,shell,sql,text,tf,tsx,yaml|}", "${TM_SELECTED_TEXT}$0", "```"],
"description": "fenced code block"
},
"image": {
"prefix": "#image",
"body": "![${TM_SELECTED_TEXT:${1:alt}}](${2:url})$0",
"description": "image"
},
"premium-feature": {
"prefix": "#premium-feature",
"body": [
"<blockquote class=\"info\">\n",
"${1:feature} ${2|is,are|} an Enterprise and Premium feature. [Learn more](https://coder.com/pricing#compare-plans).\n",
"</blockquote>"
]
},
"tabs": {
"prefix": "#tabs",
"body": [
"<div class=\"tabs\">\n",
"${1:optional description}\n",
"## ${2:tab title}\n",
"${TM_SELECTED_TEXT:${3:first tab content}}\n",
"## ${4:tab title}\n",
"${5:second tab content}\n",
"## ${6:tab title}\n",
"${7:third tab content}\n",
"</div>\n"
],
"description": "tabs"
}
}
+7 -185
View File
@@ -1,184 +1,4 @@
{
"cSpell.words": [
"afero",
"agentsdk",
"apps",
"ASKPASS",
"authcheck",
"autostop",
"awsidentity",
"bodyclose",
"buildinfo",
"buildname",
"circbuf",
"cliflag",
"cliui",
"codecov",
"coderd",
"coderdenttest",
"coderdtest",
"codersdk",
"contravariance",
"cronstrue",
"databasefake",
"dbgen",
"dbmem",
"dbtype",
"DERP",
"derphttp",
"derpmap",
"devel",
"devtunnel",
"dflags",
"drpc",
"drpcconn",
"drpcmux",
"drpcserver",
"Dsts",
"embeddedpostgres",
"enablements",
"enterprisemeta",
"errgroup",
"eventsourcemock",
"externalauth",
"Failf",
"fatih",
"Formik",
"gitauth",
"gitsshkey",
"goarch",
"gographviz",
"goleak",
"gonet",
"gossh",
"gsyslog",
"GTTY",
"hashicorp",
"hclsyntax",
"httpapi",
"httpmw",
"idtoken",
"Iflag",
"incpatch",
"initialisms",
"ipnstate",
"isatty",
"Jobf",
"Keygen",
"kirsle",
"Kubernetes",
"ldflags",
"magicsock",
"manifoldco",
"mapstructure",
"mattn",
"mitchellh",
"moby",
"namesgenerator",
"namespacing",
"netaddr",
"netip",
"netmap",
"netns",
"netstack",
"nettype",
"nfpms",
"nhooyr",
"nmcfg",
"nolint",
"nosec",
"ntqry",
"OIDC",
"oneof",
"opty",
"paralleltest",
"parameterscopeid",
"pqtype",
"prometheusmetrics",
"promhttp",
"protobuf",
"provisionerd",
"provisionerdserver",
"provisionersdk",
"ptty",
"ptys",
"ptytest",
"quickstart",
"reconfig",
"replicasync",
"retrier",
"rpty",
"SCIM",
"sdkproto",
"sdktrace",
"Signup",
"slogtest",
"sourcemapped",
"spinbutton",
"Srcs",
"stdbuf",
"stretchr",
"STTY",
"stuntest",
"subpage",
"tailbroker",
"tailcfg",
"tailexchange",
"tailnet",
"tailnettest",
"Tailscale",
"tanstack",
"tbody",
"TCGETS",
"tcpip",
"TCSETS",
"templateversions",
"testdata",
"testid",
"testutil",
"tfexec",
"tfjson",
"tfplan",
"tfstate",
"thead",
"tios",
"tmpdir",
"tokenconfig",
"Topbar",
"tparallel",
"trialer",
"trimprefix",
"tsdial",
"tslogger",
"tstun",
"turnconn",
"typegen",
"typesafe",
"unconvert",
"Untar",
"Userspace",
"VMID",
"walkthrough",
"weblinks",
"webrtc",
"wgcfg",
"wgconfig",
"wgengine",
"wgmonitor",
"wgnet",
"workspaceagent",
"workspaceagents",
"workspaceapp",
"workspaceapps",
"workspacebuilds",
"workspacename",
"wsjson",
"xerrors",
"xlarge",
"xsmall",
"yamux"
],
"cSpell.ignorePaths": ["site/package.json", ".vscode/settings.json"],
"emeraldwalk.runonsave": {
"commands": [
{
@@ -227,13 +47,15 @@
"playwright.reuseBrowser": true,
"[javascript][javascriptreact][json][jsonc][typescript][typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
// "editor.codeActionsOnSave": {
// "source.organizeImports.biome": "explicit"
// }
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
// "source.organizeImports.biome": "explicit"
}
},
"[css][html][markdown][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"typos.config": ".github/workflows/typos.toml"
}
+6
View File
@@ -0,0 +1,6 @@
# These APIs are versioned, so any changes need to be carefully reviewed for whether
# to bump API major or minor versions.
agent/proto/ @spikecurtis @johnstcn
tailnet/proto/ @spikecurtis @johnstcn
vpn/vpn.proto @spikecurtis @johnstcn
vpn/version.go @spikecurtis @johnstcn
+2
View File
@@ -0,0 +1,2 @@
<!-- markdownlint-disable MD041 -->
[https://coder.com/docs/contributing/CODE_OF_CONDUCT](https://coder.com/docs/contributing/CODE_OF_CONDUCT)
+2
View File
@@ -0,0 +1,2 @@
<!-- markdownlint-disable MD041 -->
[https://coder.com/docs/CONTRIBUTING](https://coder.com/docs/CONTRIBUTING)
+233 -93
View File
@@ -79,8 +79,12 @@ PACKAGE_OS_ARCHES := linux_amd64 linux_armv7 linux_arm64
# All architectures we build Docker images for (Linux only).
DOCKER_ARCHES := amd64 arm64 armv7
# All ${OS}_${ARCH} combos we build the desktop dylib for.
DYLIB_ARCHES := darwin_amd64 darwin_arm64
# Computed variables based on the above.
CODER_SLIM_BINARIES := $(addprefix build/coder-slim_$(VERSION)_,$(OS_ARCHES))
CODER_DYLIBS := $(foreach os_arch, $(DYLIB_ARCHES), build/coder-vpn_$(VERSION)_$(os_arch).dylib)
CODER_FAT_BINARIES := $(addprefix build/coder_$(VERSION)_,$(OS_ARCHES))
CODER_ALL_BINARIES := $(CODER_SLIM_BINARIES) $(CODER_FAT_BINARIES)
CODER_TAR_GZ_ARCHIVES := $(foreach os_arch, $(ARCHIVE_TAR_GZ), build/coder_$(VERSION)_$(os_arch).tar.gz)
@@ -238,6 +242,26 @@ $(CODER_ALL_BINARIES): go.mod go.sum \
cp "$@" "./site/out/bin/coder-$$os-$$arch$$dot_ext"
fi
# This task builds Coder Desktop dylibs
$(CODER_DYLIBS): go.mod go.sum $(GO_SRC_FILES)
@if [ "$(shell uname)" = "Darwin" ]; then
$(get-mode-os-arch-ext)
./scripts/build_go.sh \
--os "$$os" \
--arch "$$arch" \
--version "$(VERSION)" \
--output "$@" \
--dylib
else
echo "ERROR: Can't build dylib on non-Darwin OS" 1>&2
exit 1
fi
# This task builds both dylibs
build/coder-dylib: $(CODER_DYLIBS)
.PHONY: build/coder-dylib
# This task builds all archives. It parses the target name to get the metadata
# for the build, so it must be specified in this format:
# build/coder_${version}_${os}_${arch}.${format}
@@ -364,15 +388,35 @@ $(foreach chart,$(charts),build/$(chart)_helm_$(VERSION).tgz): build/%_helm_$(VE
--chart $* \
--output "$@"
site/out/index.html: site/package.json $(shell find ./site $(FIND_EXCLUSIONS) -type f \( -name '*.ts' -o -name '*.tsx' \))
cd site
node_modules/.installed: package.json
./scripts/pnpm_install.sh
offlinedocs/node_modules/.installed: offlinedocs/package.json
cd offlinedocs/
../scripts/pnpm_install.sh
site/node_modules/.installed: site/package.json
cd site/
../scripts/pnpm_install.sh
SITE_GEN_FILES := \
site/src/api/typesGenerated.ts \
site/src/api/rbacresourcesGenerated.ts \
site/src/api/countriesGenerated.ts \
site/src/theme/icons.json
site/out/index.html: \
site/node_modules/.installed \
site/static/install.sh \
$(SITE_GEN_FILES) \
$(shell find ./site $(FIND_EXCLUSIONS) -type f \( -name '*.ts' -o -name '*.tsx' \))
cd site/
# prevents this directory from getting to big, and causing "too much data" errors
rm -rf out/assets/
../scripts/pnpm_install.sh
pnpm build
offlinedocs/out/index.html: $(shell find ./offlinedocs $(FIND_EXCLUSIONS) -type f) $(shell find ./docs $(FIND_EXCLUSIONS) -type f | sed 's: :\\ :g')
cd offlinedocs
offlinedocs/out/index.html: offlinedocs/node_modules/.installed $(shell find ./offlinedocs $(FIND_EXCLUSIONS) -type f) $(shell find ./docs $(FIND_EXCLUSIONS) -type f | sed 's: :\\ :g')
cd offlinedocs/
../scripts/pnpm_install.sh
pnpm export
@@ -391,7 +435,7 @@ BOLD := $(shell tput bold 2>/dev/null)
GREEN := $(shell tput setaf 2 2>/dev/null)
RESET := $(shell tput sgr0 2>/dev/null)
fmt: fmt/ts fmt/go fmt/terraform fmt/shfmt fmt/prettier
fmt: fmt/ts fmt/go fmt/terraform fmt/shfmt fmt/biome fmt/markdown
.PHONY: fmt
fmt/go:
@@ -399,10 +443,12 @@ fmt/go:
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/go$(RESET)"
# VS Code users should check out
# https://github.com/mvdan/gofumpt#visual-studio-code
go run mvdan.cc/gofumpt@v0.4.0 -w -l .
find . $(FIND_EXCLUSIONS) -type f -name '*.go' -print0 | \
xargs -0 grep --null -L "DO NOT EDIT" | \
xargs -0 go run mvdan.cc/gofumpt@v0.4.0 -w -l
.PHONY: fmt/go
fmt/ts:
fmt/ts: site/node_modules/.installed
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/ts$(RESET)"
cd site
# Avoid writing files in CI to reduce file write activity
@@ -413,15 +459,16 @@ else
endif
.PHONY: fmt/ts
fmt/prettier: .prettierignore
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/prettier$(RESET)"
fmt/biome: site/node_modules/.installed
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/biome$(RESET)"
cd site/
# Avoid writing files in CI to reduce file write activity
ifdef CI
pnpm run format:check
else
pnpm run format
endif
.PHONY: fmt/prettier
.PHONY: fmt/biome
fmt/terraform: $(wildcard *.tf)
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/terraform$(RESET)"
@@ -438,15 +485,20 @@ else
endif
.PHONY: fmt/shfmt
lint: lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons
fmt/markdown: node_modules/.installed
echo "$(GREEN)==>$(RESET) $(BOLD)fmt/markdown$(RESET)"
pnpm format-docs
.PHONY: fmt/markdown
lint: lint/shellcheck lint/go lint/ts lint/examples lint/helm lint/site-icons lint/markdown
.PHONY: lint
lint/site-icons:
./scripts/check_site_icons.sh
.PHONY: lint/site-icons
lint/ts:
cd site
lint/ts: site/node_modules/.installed
cd site/
pnpm lint
.PHONY: lint/ts
@@ -468,13 +520,18 @@ lint/shellcheck: $(SHELL_SRC_FILES)
.PHONY: lint/shellcheck
lint/helm:
cd helm
cd helm/
make lint
.PHONY: lint/helm
lint/markdown: node_modules/.installed
pnpm lint-docs
.PHONY: lint/markdown
# All files generated by the database should be added here, and this can be used
# as a target for jobs that need to run after the database is generated.
DB_GEN_FILES := \
coderd/database/dump.sql \
coderd/database/querier.go \
coderd/database/unique_constraint.go \
coderd/database/dbmem/dbmem.go \
@@ -482,33 +539,40 @@ DB_GEN_FILES := \
coderd/database/dbauthz/dbauthz.go \
coderd/database/dbmock/dbmock.go
# all gen targets should be added here and to gen/mark-fresh
gen: \
TAILNETTEST_MOCKS := \
tailnet/tailnettest/coordinatormock.go \
tailnet/tailnettest/coordinateemock.go \
tailnet/tailnettest/workspaceupdatesprovidermock.go \
tailnet/tailnettest/subscriptionmock.go
GEN_FILES := \
tailnet/proto/tailnet.pb.go \
agent/proto/agent.pb.go \
provisionersdk/proto/provisioner.pb.go \
provisionerd/proto/provisionerd.pb.go \
coderd/database/dump.sql \
vpn/vpn.pb.go \
$(DB_GEN_FILES) \
site/src/api/typesGenerated.ts \
$(SITE_GEN_FILES) \
coderd/rbac/object_gen.go \
codersdk/rbacresources_gen.go \
site/src/api/rbacresourcesGenerated.ts \
docs/admin/prometheus.md \
docs/reference/cli/README.md \
docs/admin/audit-logs.md \
docs/admin/integrations/prometheus.md \
docs/reference/cli/index.md \
docs/admin/security/audit-logs.md \
coderd/apidoc/swagger.json \
.prettierignore.include \
.prettierignore \
provisioner/terraform/testdata/version \
site/e2e/provisionerGenerated.ts \
site/src/theme/icons.json \
examples/examples.gen.json \
tailnet/tailnettest/coordinatormock.go \
tailnet/tailnettest/coordinateemock.go \
tailnet/tailnettest/multiagentmock.go
$(TAILNETTEST_MOCKS) \
coderd/database/pubsub/psmock/psmock.go \
coderd/httpmw/loggermw/loggermock/loggermock.go
# all gen targets should be added here and to gen/mark-fresh
gen: gen/db $(GEN_FILES)
.PHONY: gen
gen/db: $(DB_GEN_FILES)
.PHONY: gen/db
# Mark all generated files as fresh so make thinks they're up-to-date. This is
# used during releases so we don't run generation scripts.
gen/mark-fresh:
@@ -517,25 +581,26 @@ gen/mark-fresh:
agent/proto/agent.pb.go \
provisionersdk/proto/provisioner.pb.go \
provisionerd/proto/provisionerd.pb.go \
vpn/vpn.pb.go \
coderd/database/dump.sql \
$(DB_GEN_FILES) \
site/src/api/typesGenerated.ts \
coderd/rbac/object_gen.go \
codersdk/rbacresources_gen.go \
site/src/api/rbacresourcesGenerated.ts \
docs/admin/prometheus.md \
docs/reference/cli/README.md \
docs/admin/audit-logs.md \
site/src/api/countriesGenerated.ts \
docs/admin/integrations/prometheus.md \
docs/reference/cli/index.md \
docs/admin/security/audit-logs.md \
coderd/apidoc/swagger.json \
.prettierignore.include \
.prettierignore \
site/e2e/provisionerGenerated.ts \
site/src/theme/icons.json \
examples/examples.gen.json \
tailnet/tailnettest/coordinatormock.go \
tailnet/tailnettest/coordinateemock.go \
tailnet/tailnettest/multiagentmock.go \
"
$(TAILNETTEST_MOCKS) \
coderd/database/pubsub/psmock/psmock.go \
coderd/httpmw/loggermw/loggermock/loggermock.go \
"
for file in $$files; do
echo "$$file"
if [ ! -f "$$file" ]; then
@@ -544,7 +609,7 @@ gen/mark-fresh:
fi
# touch sets the mtime of the file to the current time
touch $$file
touch "$$file"
done
.PHONY: gen/mark-fresh
@@ -565,7 +630,10 @@ coderd/database/dbmock/dbmock.go: coderd/database/db.go coderd/database/querier.
coderd/database/pubsub/psmock/psmock.go: coderd/database/pubsub/pubsub.go
go generate ./coderd/database/pubsub/psmock
tailnet/tailnettest/coordinatormock.go tailnet/tailnettest/multiagentmock.go tailnet/tailnettest/coordinateemock.go: tailnet/coordinator.go tailnet/multiagent.go
coderd/httpmw/loggermw/loggermock/loggermock.go: coderd/httpmw/loggermw/logger.go
go generate ./coderd/httpmw/loggermw/loggermock/
$(TAILNETTEST_MOCKS): tailnet/coordinator.go tailnet/service.go
go generate ./tailnet/tailnettest/
tailnet/proto/tailnet.pb.go: tailnet/proto/tailnet.proto
@@ -600,67 +668,105 @@ provisionerd/proto/provisionerd.pb.go: provisionerd/proto/provisionerd.proto
--go-drpc_opt=paths=source_relative \
./provisionerd/proto/provisionerd.proto
site/src/api/typesGenerated.ts: $(wildcard scripts/apitypings/*) $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go')
go run ./scripts/apitypings/ > $@
./scripts/pnpm_install.sh
vpn/vpn.pb.go: vpn/vpn.proto
protoc \
--go_out=. \
--go_opt=paths=source_relative \
./vpn/vpn.proto
site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go
cd site
../scripts/pnpm_install.sh
site/src/api/typesGenerated.ts: site/node_modules/.installed $(wildcard scripts/apitypings/*) $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go')
# -C sets the directory for the go run command
go run -C ./scripts/apitypings main.go > $@
cd site/
pnpm exec biome format --write src/api/typesGenerated.ts
site/e2e/provisionerGenerated.ts: site/node_modules/.installed provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go
cd site/
pnpm run gen:provisioner
site/src/theme/icons.json: $(wildcard scripts/gensite/*) $(wildcard site/static/icon/*)
site/src/theme/icons.json: site/node_modules/.installed $(wildcard scripts/gensite/*) $(wildcard site/static/icon/*)
go run ./scripts/gensite/ -icons "$@"
./scripts/pnpm_install.sh
pnpm -C site/ exec biome format --write src/theme/icons.json
cd site/
pnpm exec biome format --write src/theme/icons.json
examples/examples.gen.json: scripts/examplegen/main.go examples/examples.go $(shell find ./examples/templates)
go run ./scripts/examplegen/main.go > examples/examples.gen.json
coderd/rbac/object_gen.go: scripts/rbacgen/rbacobject.gotmpl scripts/rbacgen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
go run scripts/rbacgen/main.go rbac > coderd/rbac/object_gen.go
coderd/rbac/object_gen.go: scripts/typegen/rbacobject.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
tempdir=$(shell mktemp -d /tmp/typegen_rbac_object.XXXXXX)
go run ./scripts/typegen/main.go rbac object > "$$tempdir/object_gen.go"
mv -v "$$tempdir/object_gen.go" coderd/rbac/object_gen.go
rmdir -v "$$tempdir"
codersdk/rbacresources_gen.go: scripts/rbacgen/codersdk.gotmpl scripts/rbacgen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
go run scripts/rbacgen/main.go codersdk > codersdk/rbacresources_gen.go
codersdk/rbacresources_gen.go: scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
# Do no overwrite codersdk/rbacresources_gen.go directly, as it would make the file empty, breaking
# the `codersdk` package and any parallel build targets.
go run scripts/typegen/main.go rbac codersdk > /tmp/rbacresources_gen.go
mv /tmp/rbacresources_gen.go codersdk/rbacresources_gen.go
site/src/api/rbacresourcesGenerated.ts: scripts/rbacgen/codersdk.gotmpl scripts/rbacgen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
go run scripts/rbacgen/main.go typescript > "$@"
site/src/api/rbacresourcesGenerated.ts: site/node_modules/.installed scripts/typegen/codersdk.gotmpl scripts/typegen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
go run scripts/typegen/main.go rbac typescript > "$@"
cd site/
pnpm exec biome format --write src/api/rbacresourcesGenerated.ts
site/src/api/countriesGenerated.ts: site/node_modules/.installed scripts/typegen/countries.tstmpl scripts/typegen/main.go codersdk/countries.go
go run scripts/typegen/main.go countries > "$@"
cd site/
pnpm exec biome format --write src/api/countriesGenerated.ts
docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
docs/admin/integrations/prometheus.md: node_modules/.installed scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
go run scripts/metricsdocgen/main.go
./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/admin/prometheus.md
pnpm exec markdownlint-cli2 --fix ./docs/admin/integrations/prometheus.md
pnpm exec markdown-table-formatter ./docs/admin/integrations/prometheus.md
docs/reference/cli/README.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
docs/reference/cli/index.md: node_modules/.installed site/node_modules/.installed scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
CI=true BASE_PATH="." go run ./scripts/clidocgen
./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/reference/cli/README.md ./docs/reference/cli/*.md ./docs/manifest.json
pnpm exec markdownlint-cli2 --fix ./docs/reference/cli/*.md
pnpm exec markdown-table-formatter ./docs/reference/cli/*.md
cd site/
pnpm exec biome format --write ../docs/manifest.json
docs/admin/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
docs/admin/security/audit-logs.md: node_modules/.installed coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
go run scripts/auditdocgen/main.go
./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/admin/audit-logs.md
pnpm exec markdownlint-cli2 --fix ./docs/admin/security/audit-logs.md
pnpm exec markdown-table-formatter ./docs/admin/security/audit-logs.md
coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) $(wildcard enterprise/wsproxy/wsproxysdk/*.go) $(DB_GEN_FILES) .swaggo docs/manifest.json coderd/rbac/object_gen.go
coderd/apidoc/swagger.json: node_modules/.installed site/node_modules/.installed $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) $(wildcard enterprise/wsproxy/wsproxysdk/*.go) $(DB_GEN_FILES) .swaggo docs/manifest.json coderd/rbac/object_gen.go
./scripts/apidocgen/generate.sh
./scripts/pnpm_install.sh
pnpm exec prettier --write ./docs/reference/api ./docs/manifest.json ./coderd/apidoc/swagger.json
pnpm exec markdownlint-cli2 --fix ./docs/reference/api/*.md
pnpm exec markdown-table-formatter ./docs/reference/api/*.md
cd site/
pnpm exec biome format --write ../docs/manifest.json ../coderd/apidoc/swagger.json
update-golden-files: \
cli/testdata/.gen-golden \
helm/coder/tests/testdata/.gen-golden \
helm/provisioner/tests/testdata/.gen-golden \
scripts/ci-report/testdata/.gen-golden \
coderd/.gen-golden \
coderd/notifications/.gen-golden \
enterprise/cli/testdata/.gen-golden \
enterprise/tailnet/testdata/.gen-golden \
tailnet/testdata/.gen-golden \
coderd/.gen-golden \
provisioner/terraform/testdata/.gen-golden
helm/coder/tests/testdata/.gen-golden \
helm/provisioner/tests/testdata/.gen-golden \
provisioner/terraform/testdata/.gen-golden \
tailnet/testdata/.gen-golden
.PHONY: update-golden-files
clean/golden-files:
find . -type f -name '.gen-golden' -delete
find \
cli/testdata \
coderd/notifications/testdata \
coderd/testdata \
enterprise/cli/testdata \
enterprise/tailnet/testdata \
helm/coder/tests/testdata \
helm/provisioner/tests/testdata \
provisioner/terraform/testdata \
tailnet/testdata \
-type f -name '*.golden' -delete
.PHONY: clean/golden-files
cli/testdata/.gen-golden: $(wildcard cli/testdata/*.golden) $(wildcard cli/*.tpl) $(GO_SRC_FILES) $(wildcard cli/*_test.go)
go test ./cli -run="Test(CommandHelp|ServerYAML|ErrorExamples)" -update
go test ./cli -run="Test(CommandHelp|ServerYAML|ErrorExamples|.*Golden)" -update
touch "$@"
enterprise/cli/testdata/.gen-golden: $(wildcard enterprise/cli/testdata/*.golden) $(wildcard cli/*.tpl) $(GO_SRC_FILES) $(wildcard enterprise/cli/*_test.go)
@@ -687,6 +793,10 @@ coderd/.gen-golden: $(wildcard coderd/testdata/*/*.golden) $(GO_SRC_FILES) $(wil
go test ./coderd -run="Test.*Golden$$" -update
touch "$@"
coderd/notifications/.gen-golden: $(wildcard coderd/notifications/testdata/*/*.golden) $(GO_SRC_FILES) $(wildcard coderd/notifications/*_test.go)
go test ./coderd/notifications -run="Test.*Golden$$" -update
touch "$@"
provisioner/terraform/testdata/.gen-golden: $(wildcard provisioner/terraform/testdata/*/*.golden) $(GO_SRC_FILES) $(wildcard provisioner/terraform/*_test.go)
go test ./provisioner/terraform -run="Test.*Golden$$" -update
touch "$@"
@@ -697,23 +807,14 @@ provisioner/terraform/testdata/version:
fi
.PHONY: provisioner/terraform/testdata/version
scripts/ci-report/testdata/.gen-golden: $(wildcard scripts/ci-report/testdata/*) $(wildcard scripts/ci-report/*.go)
go test ./scripts/ci-report -run=TestOutputMatchesGoldenFile -update
touch "$@"
# Combine .gitignore with .prettierignore.include to generate .prettierignore.
.prettierignore: .gitignore .prettierignore.include
echo "# Code generated by Makefile ($^). DO NOT EDIT." > "$@"
echo "" >> "$@"
for f in $^; do
echo "# $${f}:" >> "$@"
cat "$$f" >> "$@"
done
test:
$(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./...
.PHONY: test
test-cli:
$(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./cli/...
.PHONY: test-cli
# sqlc-cloud-is-setup will fail if no SQLc auth token is set. Use this as a
# dependency for any sqlc-cloud related targets.
sqlc-cloud-is-setup:
@@ -747,7 +848,7 @@ sqlc-vet: test-postgres-docker
test-postgres: test-postgres-docker
# The postgres test is prone to failure, so we limit parallelism for
# more consistent execution.
$(GIT_FLAGS) DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum \
$(GIT_FLAGS) DB=ci gotestsum \
--junitfile="gotests.xml" \
--jsonfile="gotests.json" \
--packages="./..." -- \
@@ -766,10 +867,35 @@ test-migrations: test-postgres-docker
if [[ "$${COMMIT_FROM}" == "$${COMMIT_TO}" ]]; then echo "Nothing to do!"; exit 0; fi
echo "DROP DATABASE IF EXISTS migrate_test_$${COMMIT_FROM}; CREATE DATABASE migrate_test_$${COMMIT_FROM};" | psql 'postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable'
go run ./scripts/migrate-test/main.go --from="$$COMMIT_FROM" --to="$$COMMIT_TO" --postgres-url="postgresql://postgres:postgres@localhost:5432/migrate_test_$${COMMIT_FROM}?sslmode=disable"
.PHONY: test-migrations
# NOTE: we set --memory to the same size as a GitHub runner.
test-postgres-docker:
docker rm -f test-postgres-docker-${POSTGRES_VERSION} || true
# Try pulling up to three times to avoid CI flakes.
docker pull gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION} || {
retries=2
for try in $(seq 1 ${retries}); do
echo "Failed to pull image, retrying (${try}/${retries})..."
sleep 1
if docker pull gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION}; then
break
fi
done
}
# Make sure to not overallocate work_mem and max_connections as each
# connection will be allowed to use this much memory. Try adjusting
# shared_buffers instead, if needed.
#
# - work_mem=8MB * max_connections=1000 = 8GB
# - shared_buffers=2GB + effective_cache_size=1GB = 3GB
#
# This leaves 5GB for the rest of the system _and_ storing the
# database in memory (--tmpfs).
#
# https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-WORK-MEM
docker run \
--env POSTGRES_PASSWORD=postgres \
--env POSTGRES_USER=postgres \
@@ -782,9 +908,9 @@ test-postgres-docker:
--detach \
--memory 16GB \
gcr.io/coder-dev-1/postgres:${POSTGRES_VERSION} \
-c shared_buffers=1GB \
-c work_mem=1GB \
-c shared_buffers=2GB \
-c effective_cache_size=1GB \
-c work_mem=8MB \
-c max_connections=1000 \
-c fsync=off \
-c synchronous_commit=off \
@@ -799,7 +925,7 @@ test-postgres-docker:
# Make sure to keep this in sync with test-go-race from .github/workflows/ci.yaml.
test-race:
$(GIT_FLAGS) gotestsum --junitfile="gotests.xml" -- -race -count=1 ./...
$(GIT_FLAGS) gotestsum --junitfile="gotests.xml" -- -race -count=1 -parallel 4 -p 4 ./...
.PHONY: test-race
test-tailnet-integration:
@@ -813,6 +939,7 @@ test-tailnet-integration:
-timeout=5m \
-count=1 \
./tailnet/test/integration
.PHONY: test-tailnet-integration
# Note: we used to add this to the test target, but it's not necessary and we can
# achieve the desired result by specifying -count=1 in the go test invocation
@@ -821,6 +948,19 @@ test-clean:
go clean -testcache
.PHONY: test-clean
site/e2e/bin/coder: go.mod go.sum $(GO_SRC_FILES)
go build -o $@ \
-tags ts_omit_aws,ts_omit_bird,ts_omit_tap,ts_omit_kube \
./enterprise/cmd/coder
test-e2e: site/e2e/bin/coder site/node_modules/.installed site/out/index.html
cd site/
ifdef CI
DEBUG=pw:api pnpm playwright:test --forbid-only --workers 1
else
pnpm playwright:test
endif
.PHONY: test-e2e
test-e2e:
cd ./site && DEBUG=pw:api pnpm playwright:test --forbid-only --workers 1
dogfood/contents/nix.hash: flake.nix flake.lock
sha256sum flake.nix flake.lock >./dogfood/contents/nix.hash
+13 -9
View File
@@ -1,9 +1,10 @@
<!-- markdownlint-disable MD041 -->
<div align="center">
<a href="https://coder.com#gh-light-mode-only">
<img src="./docs/images/logo-black.png" style="width: 128px">
<img src="./docs/images/logo-black.png" alt="Coder Logo Light" style="width: 128px">
</a>
<a href="https://coder.com#gh-dark-mode-only">
<img src="./docs/images/logo-white.png" style="width: 128px">
<img src="./docs/images/logo-white.png" alt="Coder Logo Dark" style="width: 128px">
</a>
<h1>
@@ -11,21 +12,23 @@
</h1>
<a href="https://coder.com#gh-light-mode-only">
<img src="./docs/images/banner-black.png" style="width: 650px">
<img src="./docs/images/banner-black.png" alt="Coder Banner Light" style="width: 650px">
</a>
<a href="https://coder.com#gh-dark-mode-only">
<img src="./docs/images/banner-white.png" style="width: 650px">
<img src="./docs/images/banner-white.png" alt="Coder Banner Dark" style="width: 650px">
</a>
<br>
<br>
[Quickstart](#quickstart) | [Docs](https://coder.com/docs) | [Why Coder](https://coder.com/why) | [Enterprise](https://coder.com/docs/enterprise)
[Quickstart](#quickstart) | [Docs](https://coder.com/docs) | [Why Coder](https://coder.com/why) | [Premium](https://coder.com/pricing#compare-plans)
[![discord](https://img.shields.io/discord/747933592273027093?label=discord)](https://discord.gg/coder)
[![release](https://img.shields.io/github/v/release/coder/coder)](https://github.com/coder/coder/releases/latest)
[![godoc](https://pkg.go.dev/badge/github.com/coder/coder.svg)](https://pkg.go.dev/github.com/coder/coder)
[![Go Report Card](https://goreportcard.com/badge/github.com/coder/coder/v2)](https://goreportcard.com/report/github.com/coder/coder/v2)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9511/badge)](https://www.bestpractices.dev/projects/9511)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/coder/coder/badge)](https://scorecard.dev/viewer/?uri=github.com%2Fcoder%2Fcoder)
[![license](https://img.shields.io/github/license/coder/coder)](./LICENSE)
</div>
@@ -38,14 +41,14 @@
- Onboard developers in seconds instead of days
<p align="center">
<img src="./docs/images/hero-image.png">
<img src="./docs/images/hero-image.png" alt="Coder Hero Image">
</p>
## Quickstart
The most convenient way to try Coder is to install it on your local machine and experiment with provisioning cloud development environments using Docker (works on Linux, macOS, and Windows).
```
```shell
# First, install Coder
curl -L https://coder.com/install.sh | sh
@@ -63,7 +66,7 @@ The easiest way to install Coder is to use our
and macOS. For Windows, use the latest `..._installer.exe` file from GitHub
Releases.
```bash
```shell
curl -L https://coder.com/install.sh | sh
```
@@ -91,7 +94,7 @@ Browse our docs [here](https://coder.com/docs) or visit a specific section below
- [**Workspaces**](https://coder.com/docs/workspaces): Workspaces contain the IDEs, dependencies, and configuration information needed for software development
- [**IDEs**](https://coder.com/docs/ides): Connect your existing editor to a workspace
- [**Administration**](https://coder.com/docs/admin): Learn how to operate Coder
- [**Enterprise**](https://coder.com/docs/enterprise): Learn about our paid features built for large teams
- [**Premium**](https://coder.com/pricing#compare-plans): Learn about our paid features built for large teams
## Support
@@ -111,6 +114,7 @@ We are always working on new integrations. Please feel free to open an issue and
- [**Module Registry**](https://registry.coder.com): Extend development environments with common use-cases
- [**Kubernetes Log Stream**](https://github.com/coder/coder-logstream-kube): Stream Kubernetes Pod events to the Coder startup logs
- [**Self-Hosted VS Code Extension Marketplace**](https://github.com/coder/code-marketplace): A private extension marketplace that works in restricted or airgapped networks integrating with [code-server](https://github.com/coder/code-server).
- [**Setup Coder**](https://github.com/marketplace/actions/setup-coder): An action to setup coder CLI in GitHub workflows.
### Community
+6 -6
View File
@@ -8,7 +8,7 @@ to us, what we expect, what you can expect from us.
You can see the pretty version [here](https://coder.com/security/policy)
# Why Coder's security matters
## Why Coder's security matters
If an attacker could fully compromise a Coder installation, they could spin up
expensive workstations, steal valuable credentials, or steal proprietary source
@@ -16,13 +16,13 @@ code. We take this risk very seriously and employ routine pen testing,
vulnerability scanning, and code reviews. We also welcome the contributions from
the community that helped make this product possible.
# Where should I report security issues?
## Where should I report security issues?
Please report security issues to security@coder.com, providing all relevant
Please report security issues to <security@coder.com>, providing all relevant
information. The more details you provide, the easier it will be for us to
triage and fix the issue.
# Out of Scope
## Out of Scope
Our primary concern is around an abuse of the Coder application that allows an
attacker to gain access to another users workspace, or spin up unwanted
@@ -40,7 +40,7 @@ workspaces.
out-of-scope systems should be reported to the appropriate vendor or
applicable authority.
# Our Commitments
## Our Commitments
When working with us, according to this policy, you can expect us to:
@@ -53,7 +53,7 @@ When working with us, according to this policy, you can expect us to:
- Extend Safe Harbor for your vulnerability research that is related to this
policy.
# Our Expectations
## Our Expectations
In participating in our vulnerability disclosure program in good faith, we ask
that you:
+135 -466
View File
@@ -3,19 +3,15 @@ package agent
import (
"bytes"
"context"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"io"
"net"
"net/http"
"net/netip"
"os"
"os/user"
"path/filepath"
"runtime"
"runtime/debug"
"sort"
"strconv"
"strings"
@@ -31,14 +27,13 @@ import (
"golang.org/x/exp/slices"
"golang.org/x/sync/errgroup"
"golang.org/x/xerrors"
"storj.io/drpc"
"tailscale.com/net/speedtest"
"tailscale.com/tailcfg"
"tailscale.com/types/netlogtype"
"tailscale.com/util/clientmetric"
"cdr.dev/slog"
"github.com/coder/coder/v2/agent/agentproc"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/agent/agentscripts"
"github.com/coder/coder/v2/agent/agentssh"
"github.com/coder/coder/v2/agent/proto"
@@ -82,20 +77,17 @@ type Options struct {
SSHMaxTimeout time.Duration
TailnetListenPort uint16
Subsystems []codersdk.AgentSubsystem
Addresses []netip.Prefix
PrometheusRegistry *prometheus.Registry
ReportMetadataInterval time.Duration
ServiceBannerRefreshInterval time.Duration
Syscaller agentproc.Syscaller
// ModifiedProcesses is used for testing process priority management.
ModifiedProcesses chan []*agentproc.Process
// ProcessManagementTick is used for testing process priority management.
ProcessManagementTick <-chan time.Time
BlockFileTransfer bool
BlockFileTransfer bool
Execer agentexec.Execer
}
type Client interface {
ConnectRPC(ctx context.Context) (drpc.Conn, error)
ConnectRPC23(ctx context.Context) (
proto.DRPCAgentClient23, tailnetproto.DRPCTailnetClient23, error,
)
RewriteDERPMap(derpMap *tailcfg.DERPMap)
}
@@ -149,8 +141,8 @@ func New(options Options) Agent {
prometheusRegistry = prometheus.NewRegistry()
}
if options.Syscaller == nil {
options.Syscaller = agentproc.NewSyscaller()
if options.Execer == nil {
options.Execer = agentexec.DefaultExecer
}
hardCtx, hardCancel := context.WithCancel(context.Background())
@@ -180,15 +172,12 @@ func New(options Options) Agent {
announcementBannersRefreshInterval: options.ServiceBannerRefreshInterval,
sshMaxTimeout: options.SSHMaxTimeout,
subsystems: options.Subsystems,
addresses: options.Addresses,
syscaller: options.Syscaller,
modifiedProcs: options.ModifiedProcesses,
processManagementTick: options.ProcessManagementTick,
logSender: agentsdk.NewLogSender(options.Logger),
blockFileTransfer: options.BlockFileTransfer,
prometheusRegistry: prometheusRegistry,
metrics: newAgentMetrics(prometheusRegistry),
execer: options.Execer,
}
// Initially, we have a closed channel, reflecting the fact that we are not initially connected.
// Each time we connect we replace the channel (while holding the closeMutex) with a new one
@@ -217,8 +206,8 @@ type agent struct {
portCacheDuration time.Duration
subsystems []codersdk.AgentSubsystem
reconnectingPTYs sync.Map
reconnectingPTYTimeout time.Duration
reconnectingPTYServer *reconnectingpty.Server
// we track 2 contexts and associated cancel functions: "graceful" which is Done when it is time
// to start gracefully shutting down and "hard" which is Done when it is time to close
@@ -250,22 +239,14 @@ type agent struct {
lifecycleLastReportedIndex int // Keeps track of the last lifecycle state we successfully reported.
network *tailnet.Conn
addresses []netip.Prefix
statsReporter *statsReporter
logSender *agentsdk.LogSender
connCountReconnectingPTY atomic.Int64
prometheusRegistry *prometheus.Registry
// metrics are prometheus registered metrics that will be collected and
// labeled in Coder with the agent + workspace.
metrics *agentMetrics
syscaller agentproc.Syscaller
// modifiedProcs is used for testing process priority management.
modifiedProcs chan []*agentproc.Process
// processManagementTick is used for testing process priority management.
processManagementTick <-chan time.Time
metrics *agentMetrics
execer agentexec.Execer
}
func (a *agent) TailnetConn() *tailnet.Conn {
@@ -274,7 +255,7 @@ func (a *agent) TailnetConn() *tailnet.Conn {
func (a *agent) init() {
// pass the "hard" context because we explicitly close the SSH server as part of graceful shutdown.
sshSrv, err := agentssh.NewServer(a.hardCtx, a.logger.Named("ssh-server"), a.prometheusRegistry, a.filesystem, &agentssh.Config{
sshSrv, err := agentssh.NewServer(a.hardCtx, a.logger.Named("ssh-server"), a.prometheusRegistry, a.filesystem, a.execer, &agentssh.Config{
MaxTimeout: a.sshMaxTimeout,
MOTDFile: func() string { return a.manifest.Load().MOTDFile },
AnnouncementBanners: func() *[]codersdk.BannerConfig { return a.announcementBanners.Load() },
@@ -299,6 +280,13 @@ func (a *agent) init() {
// Register runner metrics. If the prom registry is nil, the metrics
// will not report anywhere.
a.scriptRunner.RegisterMetrics(a.prometheusRegistry)
a.reconnectingPTYServer = reconnectingpty.NewServer(
a.logger.Named("reconnecting-pty"),
a.sshServer,
a.metrics.connectionsTotal, a.metrics.reconnectingPTYErrors,
a.reconnectingPTYTimeout,
)
go a.runLoop()
}
@@ -307,8 +295,6 @@ func (a *agent) init() {
// may be happening, but regardless after the intermittent
// failure, you'll want the agent to reconnect.
func (a *agent) runLoop() {
go a.manageProcessPriorityUntilGracefulShutdown()
// need to keep retrying up to the hardCtx so that we can send graceful shutdown-related
// messages.
ctx := a.hardCtx
@@ -413,7 +399,7 @@ func (t *trySingleflight) Do(key string, fn func()) {
fn()
}
func (a *agent) reportMetadata(ctx context.Context, conn drpc.Conn) error {
func (a *agent) reportMetadata(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
tickerDone := make(chan struct{})
collectDone := make(chan struct{})
ctx, cancel := context.WithCancel(ctx)
@@ -575,7 +561,6 @@ func (a *agent) reportMetadata(ctx context.Context, conn drpc.Conn) error {
reportTimeout = 30 * time.Second
reportError = make(chan error, 1)
reportInFlight = false
aAPI = proto.NewDRPCAgentClient(conn)
)
for {
@@ -630,8 +615,7 @@ func (a *agent) reportMetadata(ctx context.Context, conn drpc.Conn) error {
// reportLifecycle reports the current lifecycle state once. All state
// changes are reported in order.
func (a *agent) reportLifecycle(ctx context.Context, conn drpc.Conn) error {
aAPI := proto.NewDRPCAgentClient(conn)
func (a *agent) reportLifecycle(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
for {
select {
case <-a.lifecycleUpdate:
@@ -713,8 +697,7 @@ func (a *agent) setLifecycle(state codersdk.WorkspaceAgentLifecycle) {
// fetchServiceBannerLoop fetches the service banner on an interval. It will
// not be fetched immediately; the expectation is that it is primed elsewhere
// (and must be done before the session actually starts).
func (a *agent) fetchServiceBannerLoop(ctx context.Context, conn drpc.Conn) error {
aAPI := proto.NewDRPCAgentClient(conn)
func (a *agent) fetchServiceBannerLoop(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
ticker := time.NewTicker(a.announcementBannersRefreshInterval)
defer ticker.Stop()
for {
@@ -740,7 +723,7 @@ func (a *agent) fetchServiceBannerLoop(ctx context.Context, conn drpc.Conn) erro
}
func (a *agent) run() (retErr error) {
// This allows the agent to refresh it's token if necessary.
// This allows the agent to refresh its token if necessary.
// For instance identity this is required, since the instance
// may not have re-provisioned, but a new agent ID was created.
sessionToken, err := a.exchangeToken(a.hardCtx)
@@ -750,12 +733,12 @@ func (a *agent) run() (retErr error) {
a.sessionToken.Store(&sessionToken)
// ConnectRPC returns the dRPC connection we use for the Agent and Tailnet v2+ APIs
conn, err := a.client.ConnectRPC(a.hardCtx)
aAPI, tAPI, err := a.client.ConnectRPC23(a.hardCtx)
if err != nil {
return err
}
defer func() {
cErr := conn.Close()
cErr := aAPI.DRPCConn().Close()
if cErr != nil {
a.logger.Debug(a.hardCtx, "error closing drpc connection", slog.Error(err))
}
@@ -764,11 +747,10 @@ func (a *agent) run() (retErr error) {
// A lot of routines need the agent API / tailnet API connection. We run them in their own
// goroutines in parallel, but errors in any routine will cause them all to exit so we can
// redial the coder server and retry.
connMan := newAPIConnRoutineManager(a.gracefulCtx, a.hardCtx, a.logger, conn)
connMan := newAPIConnRoutineManager(a.gracefulCtx, a.hardCtx, a.logger, aAPI, tAPI)
connMan.start("init notification banners", gracefulShutdownBehaviorStop,
func(ctx context.Context, conn drpc.Conn) error {
aAPI := proto.NewDRPCAgentClient(conn)
connMan.startAgentAPI("init notification banners", gracefulShutdownBehaviorStop,
func(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
bannersProto, err := aAPI.GetAnnouncementBanners(ctx, &proto.GetAnnouncementBannersRequest{})
if err != nil {
return xerrors.Errorf("fetch service banner: %w", err)
@@ -784,9 +766,9 @@ func (a *agent) run() (retErr error) {
// sending logs gets gracefulShutdownBehaviorRemain because we want to send logs generated by
// shutdown scripts.
connMan.start("send logs", gracefulShutdownBehaviorRemain,
func(ctx context.Context, conn drpc.Conn) error {
err := a.logSender.SendLoop(ctx, proto.NewDRPCAgentClient(conn))
connMan.startAgentAPI("send logs", gracefulShutdownBehaviorRemain,
func(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
err := a.logSender.SendLoop(ctx, aAPI)
if xerrors.Is(err, agentsdk.LogLimitExceededError) {
// we don't want this error to tear down the API connection and propagate to the
// other routines that use the API. The LogSender has already dropped a warning
@@ -798,10 +780,10 @@ func (a *agent) run() (retErr error) {
// part of graceful shut down is reporting the final lifecycle states, e.g "ShuttingDown" so the
// lifecycle reporting has to be via gracefulShutdownBehaviorRemain
connMan.start("report lifecycle", gracefulShutdownBehaviorRemain, a.reportLifecycle)
connMan.startAgentAPI("report lifecycle", gracefulShutdownBehaviorRemain, a.reportLifecycle)
// metadata reporting can cease as soon as we start gracefully shutting down
connMan.start("report metadata", gracefulShutdownBehaviorStop, a.reportMetadata)
connMan.startAgentAPI("report metadata", gracefulShutdownBehaviorStop, a.reportMetadata)
// channels to sync goroutines below
// handle manifest
@@ -822,55 +804,55 @@ func (a *agent) run() (retErr error) {
networkOK := newCheckpoint(a.logger)
manifestOK := newCheckpoint(a.logger)
connMan.start("handle manifest", gracefulShutdownBehaviorStop, a.handleManifest(manifestOK))
connMan.startAgentAPI("handle manifest", gracefulShutdownBehaviorStop, a.handleManifest(manifestOK))
connMan.start("app health reporter", gracefulShutdownBehaviorStop,
func(ctx context.Context, conn drpc.Conn) error {
connMan.startAgentAPI("app health reporter", gracefulShutdownBehaviorStop,
func(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
if err := manifestOK.wait(ctx); err != nil {
return xerrors.Errorf("no manifest: %w", err)
}
manifest := a.manifest.Load()
NewWorkspaceAppHealthReporter(
a.logger, manifest.Apps, agentsdk.AppHealthPoster(proto.NewDRPCAgentClient(conn)),
a.logger, manifest.Apps, agentsdk.AppHealthPoster(aAPI),
)(ctx)
return nil
})
connMan.start("create or update network", gracefulShutdownBehaviorStop,
connMan.startAgentAPI("create or update network", gracefulShutdownBehaviorStop,
a.createOrUpdateNetwork(manifestOK, networkOK))
connMan.start("coordination", gracefulShutdownBehaviorStop,
func(ctx context.Context, conn drpc.Conn) error {
connMan.startTailnetAPI("coordination", gracefulShutdownBehaviorStop,
func(ctx context.Context, tAPI tailnetproto.DRPCTailnetClient23) error {
if err := networkOK.wait(ctx); err != nil {
return xerrors.Errorf("no network: %w", err)
}
return a.runCoordinator(ctx, conn, a.network)
return a.runCoordinator(ctx, tAPI, a.network)
},
)
connMan.start("derp map subscriber", gracefulShutdownBehaviorStop,
func(ctx context.Context, conn drpc.Conn) error {
connMan.startTailnetAPI("derp map subscriber", gracefulShutdownBehaviorStop,
func(ctx context.Context, tAPI tailnetproto.DRPCTailnetClient23) error {
if err := networkOK.wait(ctx); err != nil {
return xerrors.Errorf("no network: %w", err)
}
return a.runDERPMapSubscriber(ctx, conn, a.network)
return a.runDERPMapSubscriber(ctx, tAPI, a.network)
})
connMan.start("fetch service banner loop", gracefulShutdownBehaviorStop, a.fetchServiceBannerLoop)
connMan.startAgentAPI("fetch service banner loop", gracefulShutdownBehaviorStop, a.fetchServiceBannerLoop)
connMan.start("stats report loop", gracefulShutdownBehaviorStop, func(ctx context.Context, conn drpc.Conn) error {
connMan.startAgentAPI("stats report loop", gracefulShutdownBehaviorStop, func(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
if err := networkOK.wait(ctx); err != nil {
return xerrors.Errorf("no network: %w", err)
}
return a.statsReporter.reportLoop(ctx, proto.NewDRPCAgentClient(conn))
return a.statsReporter.reportLoop(ctx, aAPI)
})
return connMan.wait()
}
// handleManifest returns a function that fetches and processes the manifest
func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context, conn drpc.Conn) error {
return func(ctx context.Context, conn drpc.Conn) error {
func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
return func(ctx context.Context, aAPI proto.DRPCAgentClient23) error {
var (
sentResult = false
err error
@@ -880,7 +862,6 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
manifestOK.complete(err)
}
}()
aAPI := proto.NewDRPCAgentClient(conn)
mp, err := aAPI.GetManifest(ctx, &proto.GetManifestRequest{})
if err != nil {
return xerrors.Errorf("fetch metadata: %w", err)
@@ -980,8 +961,8 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
// createOrUpdateNetwork waits for the manifest to be set using manifestOK, then creates or updates
// the tailnet using the information in the manifest
func (a *agent) createOrUpdateNetwork(manifestOK, networkOK *checkpoint) func(context.Context, drpc.Conn) error {
return func(ctx context.Context, _ drpc.Conn) (retErr error) {
func (a *agent) createOrUpdateNetwork(manifestOK, networkOK *checkpoint) func(context.Context, proto.DRPCAgentClient23) error {
return func(ctx context.Context, _ proto.DRPCAgentClient23) (retErr error) {
if err := manifestOK.wait(ctx); err != nil {
return xerrors.Errorf("no manifest: %w", err)
}
@@ -1112,15 +1093,14 @@ func (a *agent) updateCommandEnv(current []string) (updated []string, err error)
return updated, nil
}
func (a *agent) wireguardAddresses(agentID uuid.UUID) []netip.Prefix {
if len(a.addresses) == 0 {
return []netip.Prefix{
// This is the IP that should be used primarily.
netip.PrefixFrom(tailnet.IPFromUUID(agentID), 128),
}
func (*agent) wireguardAddresses(agentID uuid.UUID) []netip.Prefix {
return []netip.Prefix{
// This is the IP that should be used primarily.
tailnet.TailscaleServicePrefix.PrefixFromUUID(agentID),
// We'll need this address for CoderVPN, but aren't using it from clients until that feature
// is ready
tailnet.CoderServicePrefix.PrefixFromUUID(agentID),
}
return a.addresses
}
func (a *agent) trackGoroutine(fn func()) error {
@@ -1138,11 +1118,19 @@ func (a *agent) trackGoroutine(fn func()) error {
}
func (a *agent) createTailnet(ctx context.Context, agentID uuid.UUID, derpMap *tailcfg.DERPMap, derpForceWebSockets, disableDirectConnections bool) (_ *tailnet.Conn, err error) {
// Inject `CODER_AGENT_HEADER` into the DERP header.
var header http.Header
if client, ok := a.client.(*agentsdk.Client); ok {
if headerTransport, ok := client.SDK.HTTPClient.Transport.(*codersdk.HeaderTransport); ok {
header = headerTransport.Header
}
}
network, err := tailnet.NewConn(&tailnet.Options{
ID: agentID,
Addresses: a.wireguardAddresses(agentID),
DERPMap: derpMap,
DERPForceWebSockets: derpForceWebSockets,
DERPHeader: &header,
Logger: a.logger.Named("net.tailnet"),
ListenPort: a.tailnetListenPort,
BlockEndpoints: disableDirectConnections,
@@ -1181,55 +1169,12 @@ func (a *agent) createTailnet(ctx context.Context, agentID uuid.UUID, derpMap *t
}
}()
if err = a.trackGoroutine(func() {
logger := a.logger.Named("reconnecting-pty")
var wg sync.WaitGroup
for {
conn, err := reconnectingPTYListener.Accept()
if err != nil {
if !a.isClosed() {
logger.Debug(ctx, "accept pty failed", slog.Error(err))
}
break
}
clog := logger.With(
slog.F("remote", conn.RemoteAddr().String()),
slog.F("local", conn.LocalAddr().String()))
clog.Info(ctx, "accepted conn")
wg.Add(1)
closed := make(chan struct{})
go func() {
select {
case <-closed:
case <-a.hardCtx.Done():
_ = conn.Close()
}
wg.Done()
}()
go func() {
defer close(closed)
// This cannot use a JSON decoder, since that can
// buffer additional data that is required for the PTY.
rawLen := make([]byte, 2)
_, err = conn.Read(rawLen)
if err != nil {
return
}
length := binary.LittleEndian.Uint16(rawLen)
data := make([]byte, length)
_, err = conn.Read(data)
if err != nil {
return
}
var msg workspacesdk.AgentReconnectingPTYInit
err = json.Unmarshal(data, &msg)
if err != nil {
logger.Warn(ctx, "failed to unmarshal init", slog.F("raw", data))
return
}
_ = a.handleReconnectingPTY(ctx, clog, msg, conn)
}()
rPTYServeErr := a.reconnectingPTYServer.Serve(a.gracefulCtx, a.hardCtx, reconnectingPTYListener)
if rPTYServeErr != nil &&
a.gracefulCtx.Err() == nil &&
!strings.Contains(rPTYServeErr.Error(), "use of closed network connection") {
a.logger.Error(ctx, "error serving reconnecting PTY", slog.Error(err))
}
wg.Wait()
}); err != nil {
return nil, err
}
@@ -1308,9 +1253,9 @@ func (a *agent) createTailnet(ctx context.Context, agentID uuid.UUID, derpMap *t
_ = server.Close()
}()
err := server.Serve(apiListener)
if err != nil && !xerrors.Is(err, http.ErrServerClosed) && !strings.Contains(err.Error(), "use of closed network connection") {
a.logger.Critical(ctx, "serve HTTP API server", slog.Error(err))
apiServErr := server.Serve(apiListener)
if apiServErr != nil && !xerrors.Is(apiServErr, http.ErrServerClosed) && !strings.Contains(apiServErr.Error(), "use of closed network connection") {
a.logger.Critical(ctx, "serve HTTP API server", slog.Error(apiServErr))
}
}); err != nil {
return nil, err
@@ -1321,9 +1266,8 @@ func (a *agent) createTailnet(ctx context.Context, agentID uuid.UUID, derpMap *t
// runCoordinator runs a coordinator and returns whether a reconnect
// should occur.
func (a *agent) runCoordinator(ctx context.Context, conn drpc.Conn, network *tailnet.Conn) error {
func (a *agent) runCoordinator(ctx context.Context, tClient tailnetproto.DRPCTailnetClient23, network *tailnet.Conn) error {
defer a.logger.Debug(ctx, "disconnected from coordination RPC")
tClient := tailnetproto.NewDRPCTailnetClient(conn)
// we run the RPC on the hardCtx so that we have a chance to send the disconnect message if we
// gracefully shut down.
coordinate, err := tClient.Coordinate(a.hardCtx)
@@ -1348,7 +1292,8 @@ func (a *agent) runCoordinator(ctx context.Context, conn drpc.Conn, network *tai
defer close(disconnected)
a.closeMutex.Unlock()
coordination := tailnet.NewRemoteCoordination(a.logger, coordinate, network, uuid.Nil)
ctrl := tailnet.NewAgentCoordinationController(a.logger, network)
coordination := ctrl.New(coordinate)
errCh := make(chan error, 1)
go func() {
@@ -1360,7 +1305,7 @@ func (a *agent) runCoordinator(ctx context.Context, conn drpc.Conn, network *tai
a.logger.Warn(ctx, "failed to close remote coordination", slog.Error(err))
}
return
case err := <-coordination.Error():
case err := <-coordination.Wait():
errCh <- err
}
}()
@@ -1368,11 +1313,10 @@ func (a *agent) runCoordinator(ctx context.Context, conn drpc.Conn, network *tai
}
// runDERPMapSubscriber runs a coordinator and returns if a reconnect should occur.
func (a *agent) runDERPMapSubscriber(ctx context.Context, conn drpc.Conn, network *tailnet.Conn) error {
func (a *agent) runDERPMapSubscriber(ctx context.Context, tClient tailnetproto.DRPCTailnetClient23, network *tailnet.Conn) error {
defer a.logger.Debug(ctx, "disconnected from derp map RPC")
ctx, cancel := context.WithCancel(ctx)
defer cancel()
tClient := tailnetproto.NewDRPCTailnetClient(conn)
stream, err := tClient.StreamDERPMaps(ctx, &tailnetproto.StreamDERPMapsRequest{})
if err != nil {
return xerrors.Errorf("stream DERP Maps: %w", err)
@@ -1395,87 +1339,6 @@ func (a *agent) runDERPMapSubscriber(ctx context.Context, conn drpc.Conn, networ
}
}
func (a *agent) handleReconnectingPTY(ctx context.Context, logger slog.Logger, msg workspacesdk.AgentReconnectingPTYInit, conn net.Conn) (retErr error) {
defer conn.Close()
a.metrics.connectionsTotal.Add(1)
a.connCountReconnectingPTY.Add(1)
defer a.connCountReconnectingPTY.Add(-1)
connectionID := uuid.NewString()
connLogger := logger.With(slog.F("message_id", msg.ID), slog.F("connection_id", connectionID))
connLogger.Debug(ctx, "starting handler")
defer func() {
if err := retErr; err != nil {
a.closeMutex.Lock()
closed := a.isClosed()
a.closeMutex.Unlock()
// If the agent is closed, we don't want to
// log this as an error since it's expected.
if closed {
connLogger.Info(ctx, "reconnecting pty failed with attach error (agent closed)", slog.Error(err))
} else {
connLogger.Error(ctx, "reconnecting pty failed with attach error", slog.Error(err))
}
}
connLogger.Info(ctx, "reconnecting pty connection closed")
}()
var rpty reconnectingpty.ReconnectingPTY
sendConnected := make(chan reconnectingpty.ReconnectingPTY, 1)
// On store, reserve this ID to prevent multiple concurrent new connections.
waitReady, ok := a.reconnectingPTYs.LoadOrStore(msg.ID, sendConnected)
if ok {
close(sendConnected) // Unused.
connLogger.Debug(ctx, "connecting to existing reconnecting pty")
c, ok := waitReady.(chan reconnectingpty.ReconnectingPTY)
if !ok {
return xerrors.Errorf("found invalid type in reconnecting pty map: %T", waitReady)
}
rpty, ok = <-c
if !ok || rpty == nil {
return xerrors.Errorf("reconnecting pty closed before connection")
}
c <- rpty // Put it back for the next reconnect.
} else {
connLogger.Debug(ctx, "creating new reconnecting pty")
connected := false
defer func() {
if !connected && retErr != nil {
a.reconnectingPTYs.Delete(msg.ID)
close(sendConnected)
}
}()
// Empty command will default to the users shell!
cmd, err := a.sshServer.CreateCommand(ctx, msg.Command, nil)
if err != nil {
a.metrics.reconnectingPTYErrors.WithLabelValues("create_command").Add(1)
return xerrors.Errorf("create command: %w", err)
}
rpty = reconnectingpty.New(ctx, cmd, &reconnectingpty.Options{
Timeout: a.reconnectingPTYTimeout,
Metrics: a.metrics.reconnectingPTYErrors,
}, logger.With(slog.F("message_id", msg.ID)))
if err = a.trackGoroutine(func() {
rpty.Wait()
a.reconnectingPTYs.Delete(msg.ID)
}); err != nil {
rpty.Close(err)
return xerrors.Errorf("start routine: %w", err)
}
connected = true
sendConnected <- rpty
}
return rpty.Attach(ctx, connectionID, conn, msg.Height, msg.Width, connLogger)
}
// Collect collects additional stats from the agent
func (a *agent) Collect(ctx context.Context, networkStats map[netlogtype.Connection]netlogtype.Counts) *proto.Stats {
a.logger.Debug(context.Background(), "computing stats report")
@@ -1497,7 +1360,7 @@ func (a *agent) Collect(ctx context.Context, networkStats map[netlogtype.Connect
stats.SessionCountVscode = sshStats.VSCode
stats.SessionCountJetbrains = sshStats.JetBrains
stats.SessionCountReconnectingPty = a.connCountReconnectingPTY.Load()
stats.SessionCountReconnectingPty = a.reconnectingPTYServer.ConnCount()
// Compute the median connection latency!
a.logger.Debug(ctx, "starting peer latency measurement for stats")
@@ -1565,162 +1428,6 @@ func (a *agent) Collect(ctx context.Context, networkStats map[netlogtype.Connect
return stats
}
var prioritizedProcs = []string{"coder agent"}
func (a *agent) manageProcessPriorityUntilGracefulShutdown() {
// process priority can stop as soon as we are gracefully shutting down
ctx := a.gracefulCtx
defer func() {
if r := recover(); r != nil {
a.logger.Critical(ctx, "recovered from panic",
slog.F("panic", r),
slog.F("stack", string(debug.Stack())),
)
}
}()
if val := a.environmentVariables[EnvProcPrioMgmt]; val == "" || runtime.GOOS != "linux" {
a.logger.Debug(ctx, "process priority not enabled, agent will not manage process niceness/oom_score_adj ",
slog.F("env_var", EnvProcPrioMgmt),
slog.F("value", val),
slog.F("goos", runtime.GOOS),
)
return
}
if a.processManagementTick == nil {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
a.processManagementTick = ticker.C
}
oomScore := unsetOOMScore
if scoreStr, ok := a.environmentVariables[EnvProcOOMScore]; ok {
score, err := strconv.Atoi(strings.TrimSpace(scoreStr))
if err == nil && score >= -1000 && score <= 1000 {
oomScore = score
} else {
a.logger.Error(ctx, "invalid oom score",
slog.F("min_value", -1000),
slog.F("max_value", 1000),
slog.F("value", scoreStr),
)
}
}
debouncer := &logDebouncer{
logger: a.logger,
messages: map[string]time.Time{},
interval: time.Minute,
}
for {
procs, err := a.manageProcessPriority(ctx, debouncer, oomScore)
// Avoid spamming the logs too often.
if err != nil {
debouncer.Error(ctx, "manage process priority",
slog.Error(err),
)
}
if a.modifiedProcs != nil {
a.modifiedProcs <- procs
}
select {
case <-a.processManagementTick:
case <-ctx.Done():
return
}
}
}
// unsetOOMScore is set to an invalid OOM score to imply an unset value.
const unsetOOMScore = 1001
func (a *agent) manageProcessPriority(ctx context.Context, debouncer *logDebouncer, oomScore int) ([]*agentproc.Process, error) {
const (
niceness = 10
)
// We fetch the agent score each time because it's possible someone updates the
// value after it is started.
agentScore, err := a.getAgentOOMScore()
if err != nil {
agentScore = unsetOOMScore
}
if oomScore == unsetOOMScore && agentScore != unsetOOMScore {
// If the child score has not been explicitly specified we should
// set it to a score relative to the agent score.
oomScore = childOOMScore(agentScore)
}
procs, err := agentproc.List(a.filesystem, a.syscaller)
if err != nil {
return nil, xerrors.Errorf("list: %w", err)
}
modProcs := []*agentproc.Process{}
for _, proc := range procs {
containsFn := func(e string) bool {
contains := strings.Contains(proc.Cmd(), e)
return contains
}
// If the process is prioritized we should adjust
// it's oom_score_adj and avoid lowering its niceness.
if slices.ContainsFunc(prioritizedProcs, containsFn) {
continue
}
score, niceErr := proc.Niceness(a.syscaller)
if !isBenignProcessErr(niceErr) {
debouncer.Warn(ctx, "unable to get proc niceness",
slog.F("cmd", proc.Cmd()),
slog.F("pid", proc.PID),
slog.Error(niceErr),
)
}
// We only want processes that don't have a nice value set
// so we don't override user nice values.
// Getpriority actually returns priority for the nice value
// which is niceness + 20, so here 20 = a niceness of 0 (aka unset).
if score != 20 {
// We don't log here since it can get spammy
continue
}
if niceErr == nil {
err := proc.SetNiceness(a.syscaller, niceness)
if !isBenignProcessErr(err) {
debouncer.Warn(ctx, "unable to set proc niceness",
slog.F("cmd", proc.Cmd()),
slog.F("pid", proc.PID),
slog.F("niceness", niceness),
slog.Error(err),
)
}
}
// If the oom score is valid and it's not already set and isn't a custom value set by another process then it's ok to update it.
if oomScore != unsetOOMScore && oomScore != proc.OOMScoreAdj && !isCustomOOMScore(agentScore, proc) {
oomScoreStr := strconv.Itoa(oomScore)
err := afero.WriteFile(a.filesystem, fmt.Sprintf("/proc/%d/oom_score_adj", proc.PID), []byte(oomScoreStr), 0o644)
if !isBenignProcessErr(err) {
debouncer.Warn(ctx, "unable to set oom_score_adj",
slog.F("cmd", proc.Cmd()),
slog.F("pid", proc.PID),
slog.F("score", oomScoreStr),
slog.Error(err),
)
}
}
modProcs = append(modProcs, proc)
}
return modProcs, nil
}
// isClosed returns whether the API is closed or not.
func (a *agent) isClosed() bool {
return a.hardCtx.Err() != nil
@@ -1976,13 +1683,17 @@ const (
type apiConnRoutineManager struct {
logger slog.Logger
conn drpc.Conn
aAPI proto.DRPCAgentClient23
tAPI tailnetproto.DRPCTailnetClient23
eg *errgroup.Group
stopCtx context.Context
remainCtx context.Context
}
func newAPIConnRoutineManager(gracefulCtx, hardCtx context.Context, logger slog.Logger, conn drpc.Conn) *apiConnRoutineManager {
func newAPIConnRoutineManager(
gracefulCtx, hardCtx context.Context, logger slog.Logger,
aAPI proto.DRPCAgentClient23, tAPI tailnetproto.DRPCTailnetClient23,
) *apiConnRoutineManager {
// routines that remain in operation during graceful shutdown use the remainCtx. They'll still
// exit if the errgroup hits an error, which usually means a problem with the conn.
eg, remainCtx := errgroup.WithContext(hardCtx)
@@ -2002,17 +1713,23 @@ func newAPIConnRoutineManager(gracefulCtx, hardCtx context.Context, logger slog.
stopCtx := eitherContext(remainCtx, gracefulCtx)
return &apiConnRoutineManager{
logger: logger,
conn: conn,
aAPI: aAPI,
tAPI: tAPI,
eg: eg,
stopCtx: stopCtx,
remainCtx: remainCtx,
}
}
func (a *apiConnRoutineManager) start(name string, b gracefulShutdownBehavior, f func(context.Context, drpc.Conn) error) {
// startAgentAPI starts a routine that uses the Agent API. c.f. startTailnetAPI which is the same
// but for Tailnet.
func (a *apiConnRoutineManager) startAgentAPI(
name string, behavior gracefulShutdownBehavior,
f func(context.Context, proto.DRPCAgentClient23) error,
) {
logger := a.logger.With(slog.F("name", name))
var ctx context.Context
switch b {
switch behavior {
case gracefulShutdownBehaviorStop:
ctx = a.stopCtx
case gracefulShutdownBehaviorRemain:
@@ -2021,8 +1738,45 @@ func (a *apiConnRoutineManager) start(name string, b gracefulShutdownBehavior, f
panic("unknown behavior")
}
a.eg.Go(func() error {
logger.Debug(ctx, "starting routine")
err := f(ctx, a.conn)
logger.Debug(ctx, "starting agent routine")
err := f(ctx, a.aAPI)
if xerrors.Is(err, context.Canceled) && ctx.Err() != nil {
logger.Debug(ctx, "swallowing context canceled")
// Don't propagate context canceled errors to the error group, because we don't want the
// graceful context being canceled to halt the work of routines with
// gracefulShutdownBehaviorRemain. Note that we check both that the error is
// context.Canceled and that *our* context is currently canceled, because when Coderd
// unilaterally closes the API connection (for example if the build is outdated), it can
// sometimes show up as context.Canceled in our RPC calls.
return nil
}
logger.Debug(ctx, "routine exited", slog.Error(err))
if err != nil {
return xerrors.Errorf("error in routine %s: %w", name, err)
}
return nil
})
}
// startTailnetAPI starts a routine that uses the Tailnet API. c.f. startAgentAPI which is the same
// but for the Agent API.
func (a *apiConnRoutineManager) startTailnetAPI(
name string, behavior gracefulShutdownBehavior,
f func(context.Context, tailnetproto.DRPCTailnetClient23) error,
) {
logger := a.logger.With(slog.F("name", name))
var ctx context.Context
switch behavior {
case gracefulShutdownBehaviorStop:
ctx = a.stopCtx
case gracefulShutdownBehaviorRemain:
ctx = a.remainCtx
default:
panic("unknown behavior")
}
a.eg.Go(func() error {
logger.Debug(ctx, "starting tailnet routine")
err := f(ctx, a.tAPI)
if xerrors.Is(err, context.Canceled) && ctx.Err() != nil {
logger.Debug(ctx, "swallowing context canceled")
// Don't propagate context canceled errors to the error group, because we don't want the
@@ -2067,88 +1821,3 @@ func PrometheusMetricsHandler(prometheusRegistry *prometheus.Registry, logger sl
}
})
}
// childOOMScore returns the oom_score_adj for a child process. It is based
// on the oom_score_adj of the agent process.
func childOOMScore(agentScore int) int {
// If the agent has a negative oom_score_adj, we set the child to 0
// so it's treated like every other process.
if agentScore < 0 {
return 0
}
// If the agent is already almost at the maximum then set it to the max.
if agentScore >= 998 {
return 1000
}
// If the agent oom_score_adj is >=0, we set the child to slightly
// less than the maximum. If users want a different score they set it
// directly.
return 998
}
func (a *agent) getAgentOOMScore() (int, error) {
scoreStr, err := afero.ReadFile(a.filesystem, "/proc/self/oom_score_adj")
if err != nil {
return 0, xerrors.Errorf("read file: %w", err)
}
score, err := strconv.Atoi(strings.TrimSpace(string(scoreStr)))
if err != nil {
return 0, xerrors.Errorf("parse int: %w", err)
}
return score, nil
}
// isCustomOOMScore checks to see if the oom_score_adj is not a value that would
// originate from an agent-spawned process.
func isCustomOOMScore(agentScore int, process *agentproc.Process) bool {
score := process.OOMScoreAdj
return agentScore != score && score != 1000 && score != 0 && score != 998
}
// logDebouncer skips writing a log for a particular message if
// it's been emitted within the given interval duration.
// It's a shoddy implementation used in one spot that should be replaced at
// some point.
type logDebouncer struct {
logger slog.Logger
messages map[string]time.Time
interval time.Duration
}
func (l *logDebouncer) Warn(ctx context.Context, msg string, fields ...any) {
l.log(ctx, slog.LevelWarn, msg, fields...)
}
func (l *logDebouncer) Error(ctx context.Context, msg string, fields ...any) {
l.log(ctx, slog.LevelError, msg, fields...)
}
func (l *logDebouncer) log(ctx context.Context, level slog.Level, msg string, fields ...any) {
// This (bad) implementation assumes you wouldn't reuse the same msg
// for different levels.
if last, ok := l.messages[msg]; ok && time.Since(last) < l.interval {
return
}
switch level {
case slog.LevelWarn:
l.logger.Warn(ctx, msg, fields...)
case slog.LevelError:
l.logger.Error(ctx, msg, fields...)
}
l.messages[msg] = time.Now()
}
func isBenignProcessErr(err error) bool {
return err != nil &&
(xerrors.Is(err, os.ErrNotExist) ||
xerrors.Is(err, os.ErrPermission) ||
isNoSuchProcessErr(err))
}
func isNoSuchProcessErr(err error) bool {
return err != nil && strings.Contains(err.Error(), "no such process")
}
+48 -277
View File
@@ -19,10 +19,9 @@ import (
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"sync"
"sync/atomic"
"syscall"
"testing"
"time"
@@ -36,7 +35,6 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
"go.uber.org/mock/gomock"
"golang.org/x/crypto/ssh"
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
@@ -44,11 +42,8 @@ import (
"tailscale.com/tailcfg"
"cdr.dev/slog"
"cdr.dev/slog/sloggers/sloghuman"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/agent"
"github.com/coder/coder/v2/agent/agentproc"
"github.com/coder/coder/v2/agent/agentproc/agentproctest"
"github.com/coder/coder/v2/agent/agentssh"
"github.com/coder/coder/v2/agent/agenttest"
"github.com/coder/coder/v2/agent/proto"
@@ -63,7 +58,7 @@ import (
)
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
goleak.VerifyTestMain(m, testutil.GoleakOptions...)
}
// NOTE: These tests only work when your default shell is bash for some reason.
@@ -1507,7 +1502,7 @@ func TestAgent_Lifecycle(t *testing.T) {
t.Run("ShutdownScriptOnce", func(t *testing.T) {
t.Parallel()
logger := slogtest.Make(t, nil).Leveled(slog.LevelDebug)
logger := testutil.Logger(t)
expected := "this-is-shutdown"
derpMap, _ := tailnettest.RunDERPAndSTUN(t)
@@ -1814,20 +1809,45 @@ func TestAgent_Dial(t *testing.T) {
go func() {
defer close(done)
c, err := l.Accept()
if assert.NoError(t, err, "accept connection") {
defer c.Close()
testAccept(ctx, t, c)
for range 2 {
c, err := l.Accept()
if assert.NoError(t, err, "accept connection") {
testAccept(ctx, t, c)
_ = c.Close()
}
}
}()
agentID := uuid.UUID{0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8}
//nolint:dogsled
agentConn, _, _, _, _ := setupAgent(t, agentsdk.Manifest{}, 0)
agentConn, _, _, _, _ := setupAgent(t, agentsdk.Manifest{
AgentID: agentID,
}, 0)
require.True(t, agentConn.AwaitReachable(ctx))
conn, err := agentConn.DialContext(ctx, l.Addr().Network(), l.Addr().String())
require.NoError(t, err)
defer conn.Close()
testDial(ctx, t, conn)
err = conn.Close()
require.NoError(t, err)
// also connect via the CoderServicePrefix, to test that we can reach the agent on this
// IP. This will be required for CoderVPN.
_, rawPort, _ := net.SplitHostPort(l.Addr().String())
port, _ := strconv.ParseUint(rawPort, 10, 16)
ipp := netip.AddrPortFrom(tailnet.CoderServicePrefix.AddrFromUUID(agentID), uint16(port))
switch l.Addr().Network() {
case "tcp":
conn, err = agentConn.Conn.DialContextTCP(ctx, ipp)
case "udp":
conn, err = agentConn.Conn.DialContextUDP(ctx, ipp)
default:
t.Fatalf("unknown network: %s", l.Addr().Network())
}
require.NoError(t, err)
testDial(ctx, t, conn)
err = conn.Close()
require.NoError(t, err)
})
}
}
@@ -1837,7 +1857,7 @@ func TestAgent_Dial(t *testing.T) {
func TestAgent_UpdatedDERP(t *testing.T) {
t.Parallel()
logger := slogtest.Make(t, nil).Leveled(slog.LevelDebug)
logger := testutil.Logger(t)
originalDerpMap, _ := tailnettest.RunDERPAndSTUN(t)
require.NotNil(t, originalDerpMap)
@@ -1880,7 +1900,7 @@ func TestAgent_UpdatedDERP(t *testing.T) {
// Setup a client connection.
newClientConn := func(derpMap *tailcfg.DERPMap, name string) *workspacesdk.AgentConn {
conn, err := tailnet.NewConn(&tailnet.Options{
Addresses: []netip.Prefix{netip.PrefixFrom(tailnet.IP(), 128)},
Addresses: []netip.Prefix{tailnet.TailscaleServicePrefix.RandomPrefix()},
DERPMap: derpMap,
Logger: logger.Named(name),
})
@@ -1892,10 +1912,10 @@ func TestAgent_UpdatedDERP(t *testing.T) {
testCtx, testCtxCancel := context.WithCancel(context.Background())
t.Cleanup(testCtxCancel)
clientID := uuid.New()
coordination := tailnet.NewInMemoryCoordination(
testCtx, logger,
clientID, agentID,
coordinator, conn)
ctrl := tailnet.NewTunnelSrcCoordController(logger, conn)
ctrl.AddDestination(agentID)
auth := tailnet.ClientCoordinateeAuth{AgentID: agentID}
coordination := ctrl.New(tailnet.NewInMemoryCoordinatorClient(logger, clientID, auth, coordinator))
t.Cleanup(func() {
t.Logf("closing coordination %s", name)
cctx, ccancel := context.WithTimeout(testCtx, testutil.WaitShort)
@@ -1993,7 +2013,7 @@ func TestAgent_Speedtest(t *testing.T) {
func TestAgent_Reconnect(t *testing.T) {
t.Parallel()
logger := slogtest.Make(t, nil).Leveled(slog.LevelDebug)
logger := testutil.Logger(t)
// After the agent is disconnected from a coordinator, it's supposed
// to reconnect!
coordinator := tailnet.NewCoordinator(logger)
@@ -2034,7 +2054,7 @@ func TestAgent_Reconnect(t *testing.T) {
func TestAgent_WriteVSCodeConfigs(t *testing.T) {
t.Parallel()
logger := slogtest.Make(t, nil).Leveled(slog.LevelDebug)
logger := testutil.Logger(t)
coordinator := tailnet.NewCoordinator(logger)
defer coordinator.Close()
@@ -2372,7 +2392,7 @@ func setupAgent(t *testing.T, metadata agentsdk.Manifest, ptyTimeout time.Durati
_ = agnt.Close()
})
conn, err := tailnet.NewConn(&tailnet.Options{
Addresses: []netip.Prefix{netip.PrefixFrom(tailnet.IP(), 128)},
Addresses: []netip.Prefix{netip.PrefixFrom(tailnet.TailscaleServicePrefix.RandomAddr(), 128)},
DERPMap: metadata.DERPMap,
Logger: logger.Named("client"),
})
@@ -2383,10 +2403,11 @@ func setupAgent(t *testing.T, metadata agentsdk.Manifest, ptyTimeout time.Durati
testCtx, testCtxCancel := context.WithCancel(context.Background())
t.Cleanup(testCtxCancel)
clientID := uuid.New()
coordination := tailnet.NewInMemoryCoordination(
testCtx, logger,
clientID, metadata.AgentID,
coordinator, conn)
ctrl := tailnet.NewTunnelSrcCoordController(logger, conn)
ctrl.AddDestination(metadata.AgentID)
auth := tailnet.ClientCoordinateeAuth{AgentID: metadata.AgentID}
coordination := ctrl.New(tailnet.NewInMemoryCoordinatorClient(
logger, clientID, auth, coordinator))
t.Cleanup(func() {
cctx, ccancel := context.WithTimeout(testCtx, testutil.WaitShort)
defer ccancel()
@@ -2641,242 +2662,6 @@ func TestAgent_Metrics_SSH(t *testing.T) {
require.NoError(t, err)
}
func TestAgent_ManageProcessPriority(t *testing.T) {
t.Parallel()
t.Run("OK", func(t *testing.T) {
t.Parallel()
if runtime.GOOS != "linux" {
t.Skip("Skipping non-linux environment")
}
var (
expectedProcs = map[int32]agentproc.Process{}
fs = afero.NewMemMapFs()
syscaller = agentproctest.NewMockSyscaller(gomock.NewController(t))
ticker = make(chan time.Time)
modProcs = make(chan []*agentproc.Process)
logger = slog.Make(sloghuman.Sink(io.Discard))
)
requireFileWrite(t, fs, "/proc/self/oom_score_adj", "-500")
// Create some processes.
for i := 0; i < 4; i++ {
// Create a prioritized process.
var proc agentproc.Process
if i == 0 {
proc = agentproctest.GenerateProcess(t, fs,
func(p *agentproc.Process) {
p.CmdLine = "./coder\x00agent\x00--no-reap"
p.PID = int32(i)
},
)
} else {
proc = agentproctest.GenerateProcess(t, fs,
func(p *agentproc.Process) {
// Make the cmd something similar to a prioritized
// process but differentiate the arguments.
p.CmdLine = "./coder\x00stat"
},
)
syscaller.EXPECT().GetPriority(proc.PID).Return(20, nil)
syscaller.EXPECT().SetPriority(proc.PID, 10).Return(nil)
}
syscaller.EXPECT().
Kill(proc.PID, syscall.Signal(0)).
Return(nil)
expectedProcs[proc.PID] = proc
}
_, _, _, _, _ = setupAgent(t, agentsdk.Manifest{}, 0, func(c *agenttest.Client, o *agent.Options) {
o.Syscaller = syscaller
o.ModifiedProcesses = modProcs
o.EnvironmentVariables = map[string]string{agent.EnvProcPrioMgmt: "1"}
o.Filesystem = fs
o.Logger = logger
o.ProcessManagementTick = ticker
})
actualProcs := <-modProcs
require.Len(t, actualProcs, len(expectedProcs)-1)
for _, proc := range actualProcs {
requireFileEquals(t, fs, fmt.Sprintf("/proc/%d/oom_score_adj", proc.PID), "0")
}
})
t.Run("IgnoreCustomNice", func(t *testing.T) {
t.Parallel()
if runtime.GOOS != "linux" {
t.Skip("Skipping non-linux environment")
}
var (
expectedProcs = map[int32]agentproc.Process{}
fs = afero.NewMemMapFs()
ticker = make(chan time.Time)
syscaller = agentproctest.NewMockSyscaller(gomock.NewController(t))
modProcs = make(chan []*agentproc.Process)
logger = slog.Make(sloghuman.Sink(io.Discard))
)
err := afero.WriteFile(fs, "/proc/self/oom_score_adj", []byte("0"), 0o644)
require.NoError(t, err)
// Create some processes.
for i := 0; i < 3; i++ {
proc := agentproctest.GenerateProcess(t, fs)
syscaller.EXPECT().
Kill(proc.PID, syscall.Signal(0)).
Return(nil)
if i == 0 {
// Set a random nice score. This one should not be adjusted by
// our management loop.
syscaller.EXPECT().GetPriority(proc.PID).Return(25, nil)
} else {
syscaller.EXPECT().GetPriority(proc.PID).Return(20, nil)
syscaller.EXPECT().SetPriority(proc.PID, 10).Return(nil)
}
expectedProcs[proc.PID] = proc
}
_, _, _, _, _ = setupAgent(t, agentsdk.Manifest{}, 0, func(c *agenttest.Client, o *agent.Options) {
o.Syscaller = syscaller
o.ModifiedProcesses = modProcs
o.EnvironmentVariables = map[string]string{agent.EnvProcPrioMgmt: "1"}
o.Filesystem = fs
o.Logger = logger
o.ProcessManagementTick = ticker
})
actualProcs := <-modProcs
// We should ignore the process with a custom nice score.
require.Len(t, actualProcs, 2)
for _, proc := range actualProcs {
_, ok := expectedProcs[proc.PID]
require.True(t, ok)
requireFileEquals(t, fs, fmt.Sprintf("/proc/%d/oom_score_adj", proc.PID), "998")
}
})
t.Run("CustomOOMScore", func(t *testing.T) {
t.Parallel()
if runtime.GOOS != "linux" {
t.Skip("Skipping non-linux environment")
}
var (
fs = afero.NewMemMapFs()
ticker = make(chan time.Time)
syscaller = agentproctest.NewMockSyscaller(gomock.NewController(t))
modProcs = make(chan []*agentproc.Process)
logger = slog.Make(sloghuman.Sink(io.Discard))
)
err := afero.WriteFile(fs, "/proc/self/oom_score_adj", []byte("0"), 0o644)
require.NoError(t, err)
// Create some processes.
for i := 0; i < 3; i++ {
proc := agentproctest.GenerateProcess(t, fs)
syscaller.EXPECT().
Kill(proc.PID, syscall.Signal(0)).
Return(nil)
syscaller.EXPECT().GetPriority(proc.PID).Return(20, nil)
syscaller.EXPECT().SetPriority(proc.PID, 10).Return(nil)
}
_, _, _, _, _ = setupAgent(t, agentsdk.Manifest{}, 0, func(c *agenttest.Client, o *agent.Options) {
o.Syscaller = syscaller
o.ModifiedProcesses = modProcs
o.EnvironmentVariables = map[string]string{
agent.EnvProcPrioMgmt: "1",
agent.EnvProcOOMScore: "-567",
}
o.Filesystem = fs
o.Logger = logger
o.ProcessManagementTick = ticker
})
actualProcs := <-modProcs
// We should ignore the process with a custom nice score.
require.Len(t, actualProcs, 3)
for _, proc := range actualProcs {
requireFileEquals(t, fs, fmt.Sprintf("/proc/%d/oom_score_adj", proc.PID), "-567")
}
})
t.Run("DisabledByDefault", func(t *testing.T) {
t.Parallel()
if runtime.GOOS != "linux" {
t.Skip("Skipping non-linux environment")
}
var (
buf bytes.Buffer
wr = &syncWriter{
w: &buf,
}
)
log := slog.Make(sloghuman.Sink(wr)).Leveled(slog.LevelDebug)
_, _, _, _, _ = setupAgent(t, agentsdk.Manifest{}, 0, func(c *agenttest.Client, o *agent.Options) {
o.Logger = log
})
require.Eventually(t, func() bool {
wr.mu.Lock()
defer wr.mu.Unlock()
return strings.Contains(buf.String(), "process priority not enabled")
}, testutil.WaitLong, testutil.IntervalFast)
})
t.Run("DisabledForNonLinux", func(t *testing.T) {
t.Parallel()
if runtime.GOOS == "linux" {
t.Skip("Skipping linux environment")
}
var (
buf bytes.Buffer
wr = &syncWriter{
w: &buf,
}
)
log := slog.Make(sloghuman.Sink(wr)).Leveled(slog.LevelDebug)
_, _, _, _, _ = setupAgent(t, agentsdk.Manifest{}, 0, func(c *agenttest.Client, o *agent.Options) {
o.Logger = log
// Try to enable it so that we can assert that non-linux
// environments are truly disabled.
o.EnvironmentVariables = map[string]string{agent.EnvProcPrioMgmt: "1"}
})
require.Eventually(t, func() bool {
wr.mu.Lock()
defer wr.mu.Unlock()
return strings.Contains(buf.String(), "process priority not enabled")
}, testutil.WaitLong, testutil.IntervalFast)
})
}
type syncWriter struct {
mu sync.Mutex
w io.Writer
}
func (s *syncWriter) Write(p []byte) (int, error) {
s.mu.Lock()
defer s.mu.Unlock()
return s.w.Write(p)
}
// echoOnce accepts a single connection, reads 4 bytes and echos them back
func echoOnce(t *testing.T, ll net.Listener) {
t.Helper()
@@ -2906,17 +2691,3 @@ func requireEcho(t *testing.T, conn net.Conn) {
require.NoError(t, err)
require.Equal(t, "test", string(b))
}
func requireFileWrite(t testing.TB, fs afero.Fs, fp, data string) {
t.Helper()
err := afero.WriteFile(fs, fp, []byte(data), 0o600)
require.NoError(t, err)
}
func requireFileEquals(t testing.TB, fs afero.Fs, fp, expect string) {
t.Helper()
actual, err := afero.ReadFile(fs, fp)
require.NoError(t, err)
require.Equal(t, expect, string(actual))
}
+202
View File
@@ -0,0 +1,202 @@
//go:build linux
// +build linux
package agentexec
import (
"flag"
"fmt"
"os"
"os/exec"
"runtime"
"slices"
"strconv"
"strings"
"syscall"
"golang.org/x/sys/unix"
"golang.org/x/xerrors"
"kernel.org/pub/linux/libs/security/libcap/cap"
)
// CLI runs the agent-exec command. It should only be called by the cli package.
func CLI() error {
// We lock the OS thread here to avoid a race condition where the nice priority
// we set gets applied to a different thread than the one we exec the provided
// command on.
runtime.LockOSThread()
// Nop on success but we do it anyway in case of an error.
defer runtime.UnlockOSThread()
var (
fs = flag.NewFlagSet("agent-exec", flag.ExitOnError)
nice = fs.Int("coder-nice", unset, "")
oom = fs.Int("coder-oom", unset, "")
)
if len(os.Args) < 3 {
return xerrors.Errorf("malformed command %+v", os.Args)
}
// Parse everything after "coder agent-exec".
err := fs.Parse(os.Args[2:])
if err != nil {
return xerrors.Errorf("parse flags: %w", err)
}
// Get everything after "coder agent-exec --"
args := execArgs(os.Args)
if len(args) == 0 {
return xerrors.Errorf("no exec command provided %+v", os.Args)
}
if *oom == unset {
// If an explicit oom score isn't set, we use the default.
*oom, err = defaultOOMScore()
if err != nil {
return xerrors.Errorf("get default oom score: %w", err)
}
}
if *nice == unset {
// If an explicit nice score isn't set, we use the default.
*nice, err = defaultNiceScore()
if err != nil {
return xerrors.Errorf("get default nice score: %w", err)
}
}
// We drop effective caps prior to setting dumpable so that we limit the
// impact of someone attempting to hijack the process (i.e. with a debugger)
// to take advantage of the capabilities of the agent process. We encourage
// users to set cap_net_admin on the agent binary for improved networking
// performance and doing so results in the process having its SET_DUMPABLE
// attribute disabled (meaning we cannot adjust the oom score).
err = dropEffectiveCaps()
if err != nil {
printfStdErr("failed to drop effective caps: %v", err)
}
// Set dumpable to 1 so that we can adjust the oom score. If the process
// doesn't have capabilities or has an suid/sgid bit set, this is already
// set.
err = unix.Prctl(unix.PR_SET_DUMPABLE, 1, 0, 0, 0)
if err != nil {
printfStdErr("failed to set dumpable: %v", err)
}
err = writeOOMScoreAdj(*oom)
if err != nil {
// We alert the user instead of failing the command since it can be difficult to debug
// for a template admin otherwise. It's quite possible (and easy) to set an
// inappriopriate value for oom_score_adj.
printfStdErr("failed to adjust oom score to %d for cmd %+v: %v", *oom, execArgs(os.Args), err)
}
// Set dumpable back to 0 just to be safe. It's not inherited for execve anyways.
err = unix.Prctl(unix.PR_SET_DUMPABLE, 0, 0, 0, 0)
if err != nil {
printfStdErr("failed to unset dumpable: %v", err)
}
err = unix.Setpriority(unix.PRIO_PROCESS, 0, *nice)
if err != nil {
// We alert the user instead of failing the command since it can be difficult to debug
// for a template admin otherwise. It's quite possible (and easy) to set an
// inappriopriate value for niceness.
printfStdErr("failed to adjust niceness to %d for cmd %+v: %v", *nice, args, err)
}
path, err := exec.LookPath(args[0])
if err != nil {
return xerrors.Errorf("look path: %w", err)
}
// Remove environment variables specific to the agentexec command. This is
// especially important for environments that are attempting to develop Coder in Coder.
env := os.Environ()
env = slices.DeleteFunc(env, func(e string) bool {
return strings.HasPrefix(e, EnvProcPrioMgmt) ||
strings.HasPrefix(e, EnvProcOOMScore) ||
strings.HasPrefix(e, EnvProcNiceScore)
})
return syscall.Exec(path, args, env)
}
func defaultNiceScore() (int, error) {
score, err := unix.Getpriority(unix.PRIO_PROCESS, 0)
if err != nil {
return 0, xerrors.Errorf("get nice score: %w", err)
}
// See https://linux.die.net/man/2/setpriority#Notes
score = 20 - score
score += 5
if score > 19 {
return 19, nil
}
return score, nil
}
func defaultOOMScore() (int, error) {
score, err := oomScoreAdj()
if err != nil {
return 0, xerrors.Errorf("get oom score: %w", err)
}
// If the agent has a negative oom_score_adj, we set the child to 0
// so it's treated like every other process.
if score < 0 {
return 0, nil
}
// If the agent is already almost at the maximum then set it to the max.
if score >= 998 {
return 1000, nil
}
// If the agent oom_score_adj is >=0, we set the child to slightly
// less than the maximum. If users want a different score they set it
// directly.
return 998, nil
}
func oomScoreAdj() (int, error) {
scoreStr, err := os.ReadFile("/proc/self/oom_score_adj")
if err != nil {
return 0, xerrors.Errorf("read oom_score_adj: %w", err)
}
return strconv.Atoi(strings.TrimSpace(string(scoreStr)))
}
func writeOOMScoreAdj(score int) error {
return os.WriteFile(fmt.Sprintf("/proc/%d/oom_score_adj", os.Getpid()), []byte(fmt.Sprintf("%d", score)), 0o600)
}
// execArgs returns the arguments to pass to syscall.Exec after the "--" delimiter.
func execArgs(args []string) []string {
for i, arg := range args {
if arg == "--" {
return args[i+1:]
}
}
return nil
}
func printfStdErr(format string, a ...any) {
_, _ = fmt.Fprintf(os.Stderr, "coder-agent: %s\n", fmt.Sprintf(format, a...))
}
func dropEffectiveCaps() error {
proc := cap.GetProc()
err := proc.ClearFlag(cap.Effective)
if err != nil {
return xerrors.Errorf("clear effective caps: %w", err)
}
err = proc.SetProc()
if err != nil {
return xerrors.Errorf("set proc: %w", err)
}
return nil
}
+252
View File
@@ -0,0 +1,252 @@
//go:build linux
// +build linux
package agentexec_test
import (
"bytes"
"context"
"fmt"
"os"
"os/exec"
"path/filepath"
"slices"
"strconv"
"strings"
"syscall"
"testing"
"time"
"github.com/stretchr/testify/require"
"golang.org/x/sys/unix"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/testutil"
)
//nolint:paralleltest // This test is sensitive to environment variables
func TestCLI(t *testing.T) {
t.Run("OK", func(t *testing.T) {
ctx := testutil.Context(t, testutil.WaitMedium)
cmd, path := cmd(ctx, t, 123, 12)
err := cmd.Start()
require.NoError(t, err)
go cmd.Wait()
waitForSentinel(ctx, t, cmd, path)
requireOOMScore(t, cmd.Process.Pid, 123)
requireNiceScore(t, cmd.Process.Pid, 12)
})
t.Run("FiltersEnv", func(t *testing.T) {
ctx := testutil.Context(t, testutil.WaitMedium)
cmd, path := cmd(ctx, t, 123, 12)
cmd.Env = append(cmd.Env, fmt.Sprintf("%s=true", agentexec.EnvProcPrioMgmt))
cmd.Env = append(cmd.Env, fmt.Sprintf("%s=123", agentexec.EnvProcOOMScore))
cmd.Env = append(cmd.Env, fmt.Sprintf("%s=12", agentexec.EnvProcNiceScore))
// Ensure unrelated environment variables are preserved.
cmd.Env = append(cmd.Env, "CODER_TEST_ME_AGENTEXEC=true")
err := cmd.Start()
require.NoError(t, err)
go cmd.Wait()
waitForSentinel(ctx, t, cmd, path)
env := procEnv(t, cmd.Process.Pid)
hasExecEnvs := slices.ContainsFunc(
env,
func(e string) bool {
return strings.HasPrefix(e, agentexec.EnvProcPrioMgmt) ||
strings.HasPrefix(e, agentexec.EnvProcOOMScore) ||
strings.HasPrefix(e, agentexec.EnvProcNiceScore)
})
require.False(t, hasExecEnvs, "expected environment variables to be filtered")
userEnv := slices.Contains(env, "CODER_TEST_ME_AGENTEXEC=true")
require.True(t, userEnv, "expected user environment variables to be preserved")
})
t.Run("Defaults", func(t *testing.T) {
ctx := testutil.Context(t, testutil.WaitMedium)
cmd, path := cmd(ctx, t, 0, 0)
err := cmd.Start()
require.NoError(t, err)
go cmd.Wait()
waitForSentinel(ctx, t, cmd, path)
expectedNice := expectedNiceScore(t)
expectedOOM := expectedOOMScore(t)
requireOOMScore(t, cmd.Process.Pid, expectedOOM)
requireNiceScore(t, cmd.Process.Pid, expectedNice)
})
t.Run("Capabilities", func(t *testing.T) {
testdir := filepath.Dir(TestBin)
capDir := filepath.Join(testdir, "caps")
err := os.Mkdir(capDir, 0o755)
require.NoError(t, err)
bin := buildBinary(capDir)
// Try to set capabilities on the binary. This should work fine in CI but
// it's possible some developers may be working in an environment where they don't have the necessary permissions.
err = setCaps(t, bin, "cap_net_admin")
if os.Getenv("CI") != "" {
require.NoError(t, err)
} else if err != nil {
t.Skipf("unable to set capabilities for test: %v", err)
}
ctx := testutil.Context(t, testutil.WaitMedium)
cmd, path := binCmd(ctx, t, bin, 123, 12)
err = cmd.Start()
require.NoError(t, err)
go cmd.Wait()
waitForSentinel(ctx, t, cmd, path)
// This is what we're really testing, a binary with added capabilities requires setting dumpable.
requireOOMScore(t, cmd.Process.Pid, 123)
requireNiceScore(t, cmd.Process.Pid, 12)
})
}
func requireNiceScore(t *testing.T, pid int, score int) {
t.Helper()
nice, err := unix.Getpriority(unix.PRIO_PROCESS, pid)
require.NoError(t, err)
// See https://linux.die.net/man/2/setpriority#Notes
require.Equal(t, score, 20-nice)
}
func requireOOMScore(t *testing.T, pid int, expected int) {
t.Helper()
actual, err := os.ReadFile(fmt.Sprintf("/proc/%d/oom_score_adj", pid))
require.NoError(t, err)
score := strings.TrimSpace(string(actual))
require.Equal(t, strconv.Itoa(expected), score)
}
func waitForSentinel(ctx context.Context, t *testing.T, cmd *exec.Cmd, path string) {
t.Helper()
ticker := time.NewTicker(testutil.IntervalFast)
defer ticker.Stop()
// RequireEventually doesn't work well with require.NoError or similar require functions.
for {
err := cmd.Process.Signal(syscall.Signal(0))
require.NoError(t, err)
_, err = os.Stat(path)
if err == nil {
return
}
select {
case <-ticker.C:
case <-ctx.Done():
require.NoError(t, ctx.Err())
}
}
}
func binCmd(ctx context.Context, t *testing.T, bin string, oom, nice int) (*exec.Cmd, string) {
var (
args = execArgs(oom, nice)
dir = t.TempDir()
file = filepath.Join(dir, "sentinel")
)
args = append(args, "sh", "-c", fmt.Sprintf("touch %s && sleep 10m", file))
//nolint:gosec
cmd := exec.CommandContext(ctx, bin, args...)
// We set this so we can also easily kill the sleep process the shell spawns.
cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
}
cmd.Env = os.Environ()
var buf bytes.Buffer
cmd.Stdout = &buf
cmd.Stderr = &buf
t.Cleanup(func() {
// Print output of a command if the test fails.
if t.Failed() {
t.Logf("cmd %q output: %s", cmd.Args, buf.String())
}
if cmd.Process != nil {
// We use -cmd.Process.Pid to kill the whole process group.
_ = syscall.Kill(-cmd.Process.Pid, syscall.SIGINT)
}
})
return cmd, file
}
func cmd(ctx context.Context, t *testing.T, oom, nice int) (*exec.Cmd, string) {
return binCmd(ctx, t, TestBin, oom, nice)
}
func expectedOOMScore(t *testing.T) int {
t.Helper()
score, err := os.ReadFile(fmt.Sprintf("/proc/%d/oom_score_adj", os.Getpid()))
require.NoError(t, err)
scoreInt, err := strconv.Atoi(strings.TrimSpace(string(score)))
require.NoError(t, err)
if scoreInt < 0 {
return 0
}
if scoreInt >= 998 {
return 1000
}
return 998
}
// procEnv returns the environment variables for a given process.
func procEnv(t *testing.T, pid int) []string {
t.Helper()
env, err := os.ReadFile(fmt.Sprintf("/proc/%d/environ", pid))
require.NoError(t, err)
return strings.Split(string(env), "\x00")
}
func expectedNiceScore(t *testing.T) int {
t.Helper()
score, err := unix.Getpriority(unix.PRIO_PROCESS, os.Getpid())
require.NoError(t, err)
// Priority is niceness + 20.
score = 20 - score
score += 5
if score > 19 {
return 19
}
return score
}
func execArgs(oom int, nice int) []string {
execArgs := []string{"agent-exec"}
if oom != 0 {
execArgs = append(execArgs, fmt.Sprintf("--coder-oom=%d", oom))
}
if nice != 0 {
execArgs = append(execArgs, fmt.Sprintf("--coder-nice=%d", nice))
}
execArgs = append(execArgs, "--")
return execArgs
}
func setCaps(t *testing.T, bin string, caps ...string) error {
t.Helper()
setcap := fmt.Sprintf("sudo -n setcap %s=ep %s", strings.Join(caps, ", "), bin)
out, err := exec.CommandContext(context.Background(), "sh", "-c", setcap).CombinedOutput()
if err != nil {
return xerrors.Errorf("setcap %q (%s): %w", setcap, out, err)
}
return nil
}
+10
View File
@@ -0,0 +1,10 @@
//go:build !linux
// +build !linux
package agentexec
import "golang.org/x/xerrors"
func CLI() error {
return xerrors.New("agent-exec is only supported on Linux")
}
+19
View File
@@ -0,0 +1,19 @@
//go:build linux
// +build linux
package main
import (
"fmt"
"os"
"github.com/coder/coder/v2/agent/agentexec"
)
func main() {
err := agentexec.CLI()
if err != nil {
_, _ = fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
+149
View File
@@ -0,0 +1,149 @@
package agentexec
import (
"context"
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/pty"
)
const (
// EnvProcPrioMgmt is the environment variable that determines whether
// we attempt to manage process CPU and OOM Killer priority.
EnvProcPrioMgmt = "CODER_PROC_PRIO_MGMT"
EnvProcOOMScore = "CODER_PROC_OOM_SCORE"
EnvProcNiceScore = "CODER_PROC_NICE_SCORE"
// unset is set to an invalid value for nice and oom scores.
unset = -2000
)
var DefaultExecer Execer = execer{}
// Execer defines an abstraction for creating exec.Cmd variants. It's unfortunately
// necessary because we need to be able to wrap child processes with "coder agent-exec"
// for templates that expect the agent to manage process priority.
type Execer interface {
// CommandContext returns an exec.Cmd that calls "coder agent-exec" prior to exec'ing
// the provided command if CODER_PROC_PRIO_MGMT is set, otherwise a normal exec.Cmd
// is returned. All instances of exec.Cmd should flow through this function to ensure
// proper resource constraints are applied to the child process.
CommandContext(ctx context.Context, cmd string, args ...string) *exec.Cmd
// PTYCommandContext returns an pty.Cmd that calls "coder agent-exec" prior to exec'ing
// the provided command if CODER_PROC_PRIO_MGMT is set, otherwise a normal pty.Cmd
// is returned. All instances of pty.Cmd should flow through this function to ensure
// proper resource constraints are applied to the child process.
PTYCommandContext(ctx context.Context, cmd string, args ...string) *pty.Cmd
}
func NewExecer() (Execer, error) {
_, enabled := os.LookupEnv(EnvProcPrioMgmt)
if runtime.GOOS != "linux" || !enabled {
return DefaultExecer, nil
}
executable, err := os.Executable()
if err != nil {
return nil, xerrors.Errorf("get executable: %w", err)
}
bin, err := filepath.EvalSymlinks(executable)
if err != nil {
return nil, xerrors.Errorf("eval symlinks: %w", err)
}
oomScore, ok := envValInt(EnvProcOOMScore)
if !ok {
oomScore = unset
}
niceScore, ok := envValInt(EnvProcNiceScore)
if !ok {
niceScore = unset
}
return priorityExecer{
binPath: bin,
oomScore: oomScore,
niceScore: niceScore,
}, nil
}
type execer struct{}
func (execer) CommandContext(ctx context.Context, cmd string, args ...string) *exec.Cmd {
return exec.CommandContext(ctx, cmd, args...)
}
func (execer) PTYCommandContext(ctx context.Context, cmd string, args ...string) *pty.Cmd {
return pty.CommandContext(ctx, cmd, args...)
}
type priorityExecer struct {
binPath string
oomScore int
niceScore int
}
func (e priorityExecer) CommandContext(ctx context.Context, cmd string, args ...string) *exec.Cmd {
cmd, args = e.agentExecCmd(cmd, args...)
return exec.CommandContext(ctx, cmd, args...)
}
func (e priorityExecer) PTYCommandContext(ctx context.Context, cmd string, args ...string) *pty.Cmd {
cmd, args = e.agentExecCmd(cmd, args...)
return pty.CommandContext(ctx, cmd, args...)
}
func (e priorityExecer) agentExecCmd(cmd string, args ...string) (string, []string) {
execArgs := []string{"agent-exec"}
if e.oomScore != unset {
execArgs = append(execArgs, oomScoreArg(e.oomScore))
}
if e.niceScore != unset {
execArgs = append(execArgs, niceScoreArg(e.niceScore))
}
execArgs = append(execArgs, "--", cmd)
execArgs = append(execArgs, args...)
return e.binPath, execArgs
}
// envValInt searches for a key in a list of environment variables and parses it to an int.
// If the key is not found or cannot be parsed, returns 0 and false.
func envValInt(key string) (int, bool) {
val, ok := os.LookupEnv(key)
if !ok {
return 0, false
}
i, err := strconv.Atoi(val)
if err != nil {
return 0, false
}
return i, true
}
// The following are flags used by the agent-exec command. We use flags instead of
// environment variables to avoid having to deal with a caller overriding the
// environment variables.
const (
niceFlag = "coder-nice"
oomFlag = "coder-oom"
)
func niceScoreArg(score int) string {
return fmt.Sprintf("--%s=%d", niceFlag, score)
}
func oomScoreArg(score int) string {
return fmt.Sprintf("--%s=%d", oomFlag, score)
}
+84
View File
@@ -0,0 +1,84 @@
package agentexec
import (
"context"
"os/exec"
"testing"
"github.com/stretchr/testify/require"
)
func TestExecer(t *testing.T) {
t.Parallel()
t.Run("Default", func(t *testing.T) {
t.Parallel()
cmd := DefaultExecer.CommandContext(context.Background(), "sh", "-c", "sleep")
path, err := exec.LookPath("sh")
require.NoError(t, err)
require.Equal(t, path, cmd.Path)
require.Equal(t, []string{"sh", "-c", "sleep"}, cmd.Args)
})
t.Run("Priority", func(t *testing.T) {
t.Parallel()
t.Run("OK", func(t *testing.T) {
t.Parallel()
e := priorityExecer{
binPath: "/foo/bar/baz",
oomScore: unset,
niceScore: unset,
}
cmd := e.CommandContext(context.Background(), "sh", "-c", "sleep")
require.Equal(t, e.binPath, cmd.Path)
require.Equal(t, []string{e.binPath, "agent-exec", "--", "sh", "-c", "sleep"}, cmd.Args)
})
t.Run("Nice", func(t *testing.T) {
t.Parallel()
e := priorityExecer{
binPath: "/foo/bar/baz",
oomScore: unset,
niceScore: 10,
}
cmd := e.CommandContext(context.Background(), "sh", "-c", "sleep")
require.Equal(t, e.binPath, cmd.Path)
require.Equal(t, []string{e.binPath, "agent-exec", "--coder-nice=10", "--", "sh", "-c", "sleep"}, cmd.Args)
})
t.Run("OOM", func(t *testing.T) {
t.Parallel()
e := priorityExecer{
binPath: "/foo/bar/baz",
oomScore: 123,
niceScore: unset,
}
cmd := e.CommandContext(context.Background(), "sh", "-c", "sleep")
require.Equal(t, e.binPath, cmd.Path)
require.Equal(t, []string{e.binPath, "agent-exec", "--coder-oom=123", "--", "sh", "-c", "sleep"}, cmd.Args)
})
t.Run("Both", func(t *testing.T) {
t.Parallel()
e := priorityExecer{
binPath: "/foo/bar/baz",
oomScore: 432,
niceScore: 14,
}
cmd := e.CommandContext(context.Background(), "sh", "-c", "sleep")
require.Equal(t, e.binPath, cmd.Path)
require.Equal(t, []string{e.binPath, "agent-exec", "--coder-oom=432", "--coder-nice=14", "--", "sh", "-c", "sleep"}, cmd.Args)
})
})
}
+46
View File
@@ -0,0 +1,46 @@
//go:build linux
// +build linux
package agentexec_test
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"testing"
)
var TestBin string
func TestMain(m *testing.M) {
code := func() int {
// We generate a unique directory per test invocation to avoid collisions between two
// processes attempting to create the same temp file.
dir := genDir()
defer os.RemoveAll(dir)
TestBin = buildBinary(dir)
return m.Run()
}()
os.Exit(code)
}
func buildBinary(dir string) string {
path := filepath.Join(dir, "agent-test")
out, err := exec.Command("go", "build", "-o", path, "./cmdtest").CombinedOutput()
mustf(err, "build binary: %s", out)
return path
}
func mustf(err error, msg string, args ...any) {
if err != nil {
panic(fmt.Sprintf(msg, args...))
}
}
func genDir() string {
dir, err := os.MkdirTemp(os.TempDir(), "agentexec")
mustf(err, "create temp dir: %v", err)
return dir
}
-5
View File
@@ -1,5 +0,0 @@
// Package agentproctest contains utility functions
// for testing process management in the agent.
package agentproctest
//go:generate mockgen -destination ./syscallermock.go -package agentproctest github.com/coder/coder/v2/agent/agentproc Syscaller
-55
View File
@@ -1,55 +0,0 @@
package agentproctest
import (
"fmt"
"strconv"
"testing"
"github.com/spf13/afero"
"github.com/stretchr/testify/require"
"github.com/coder/coder/v2/agent/agentproc"
"github.com/coder/coder/v2/cryptorand"
)
func GenerateProcess(t *testing.T, fs afero.Fs, muts ...func(*agentproc.Process)) agentproc.Process {
t.Helper()
pid, err := cryptorand.Intn(1<<31 - 1)
require.NoError(t, err)
arg1, err := cryptorand.String(5)
require.NoError(t, err)
arg2, err := cryptorand.String(5)
require.NoError(t, err)
arg3, err := cryptorand.String(5)
require.NoError(t, err)
cmdline := fmt.Sprintf("%s\x00%s\x00%s", arg1, arg2, arg3)
process := agentproc.Process{
CmdLine: cmdline,
PID: int32(pid),
OOMScoreAdj: 0,
}
for _, mut := range muts {
mut(&process)
}
process.Dir = fmt.Sprintf("%s/%d", "/proc", process.PID)
err = fs.MkdirAll(process.Dir, 0o555)
require.NoError(t, err)
err = afero.WriteFile(fs, fmt.Sprintf("%s/cmdline", process.Dir), []byte(process.CmdLine), 0o444)
require.NoError(t, err)
score := strconv.Itoa(process.OOMScoreAdj)
err = afero.WriteFile(fs, fmt.Sprintf("%s/oom_score_adj", process.Dir), []byte(score), 0o444)
require.NoError(t, err)
return process
}
@@ -1,83 +0,0 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/coder/coder/v2/agent/agentproc (interfaces: Syscaller)
//
// Generated by this command:
//
// mockgen -destination ./syscallermock.go -package agentproctest github.com/coder/coder/v2/agent/agentproc Syscaller
//
// Package agentproctest is a generated GoMock package.
package agentproctest
import (
reflect "reflect"
syscall "syscall"
gomock "go.uber.org/mock/gomock"
)
// MockSyscaller is a mock of Syscaller interface.
type MockSyscaller struct {
ctrl *gomock.Controller
recorder *MockSyscallerMockRecorder
}
// MockSyscallerMockRecorder is the mock recorder for MockSyscaller.
type MockSyscallerMockRecorder struct {
mock *MockSyscaller
}
// NewMockSyscaller creates a new mock instance.
func NewMockSyscaller(ctrl *gomock.Controller) *MockSyscaller {
mock := &MockSyscaller{ctrl: ctrl}
mock.recorder = &MockSyscallerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSyscaller) EXPECT() *MockSyscallerMockRecorder {
return m.recorder
}
// GetPriority mocks base method.
func (m *MockSyscaller) GetPriority(arg0 int32) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPriority", arg0)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetPriority indicates an expected call of GetPriority.
func (mr *MockSyscallerMockRecorder) GetPriority(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPriority", reflect.TypeOf((*MockSyscaller)(nil).GetPriority), arg0)
}
// Kill mocks base method.
func (m *MockSyscaller) Kill(arg0 int32, arg1 syscall.Signal) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Kill", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Kill indicates an expected call of Kill.
func (mr *MockSyscallerMockRecorder) Kill(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kill", reflect.TypeOf((*MockSyscaller)(nil).Kill), arg0, arg1)
}
// SetPriority mocks base method.
func (m *MockSyscaller) SetPriority(arg0 int32, arg1 int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetPriority", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetPriority indicates an expected call of SetPriority.
func (mr *MockSyscallerMockRecorder) SetPriority(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPriority", reflect.TypeOf((*MockSyscaller)(nil).SetPriority), arg0, arg1)
}
-3
View File
@@ -1,3 +0,0 @@
// Package agentproc contains logic for interfacing with local
// processes running in the same context as the agent.
package agentproc
-24
View File
@@ -1,24 +0,0 @@
//go:build !linux
// +build !linux
package agentproc
import (
"github.com/spf13/afero"
)
func (*Process) Niceness(Syscaller) (int, error) {
return 0, errUnimplemented
}
func (*Process) SetNiceness(Syscaller, int) error {
return errUnimplemented
}
func (*Process) Cmd() string {
return ""
}
func List(afero.Fs, Syscaller) ([]*Process, error) {
return nil, errUnimplemented
}
-166
View File
@@ -1,166 +0,0 @@
package agentproc_test
import (
"runtime"
"syscall"
"testing"
"github.com/spf13/afero"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/agent/agentproc"
"github.com/coder/coder/v2/agent/agentproc/agentproctest"
)
func TestList(t *testing.T) {
t.Parallel()
if runtime.GOOS != "linux" {
t.Skipf("skipping non-linux environment")
}
t.Run("OK", func(t *testing.T) {
t.Parallel()
var (
fs = afero.NewMemMapFs()
sc = agentproctest.NewMockSyscaller(gomock.NewController(t))
expectedProcs = make(map[int32]agentproc.Process)
)
for i := 0; i < 4; i++ {
proc := agentproctest.GenerateProcess(t, fs)
expectedProcs[proc.PID] = proc
sc.EXPECT().
Kill(proc.PID, syscall.Signal(0)).
Return(nil)
}
actualProcs, err := agentproc.List(fs, sc)
require.NoError(t, err)
require.Len(t, actualProcs, len(expectedProcs))
for _, proc := range actualProcs {
expected, ok := expectedProcs[proc.PID]
require.True(t, ok)
require.Equal(t, expected.PID, proc.PID)
require.Equal(t, expected.CmdLine, proc.CmdLine)
require.Equal(t, expected.Dir, proc.Dir)
}
})
t.Run("FinishedProcess", func(t *testing.T) {
t.Parallel()
var (
fs = afero.NewMemMapFs()
sc = agentproctest.NewMockSyscaller(gomock.NewController(t))
expectedProcs = make(map[int32]agentproc.Process)
)
for i := 0; i < 3; i++ {
proc := agentproctest.GenerateProcess(t, fs)
expectedProcs[proc.PID] = proc
sc.EXPECT().
Kill(proc.PID, syscall.Signal(0)).
Return(nil)
}
// Create a process that's already finished. We're not adding
// it to the map because it should be skipped over.
proc := agentproctest.GenerateProcess(t, fs)
sc.EXPECT().
Kill(proc.PID, syscall.Signal(0)).
Return(xerrors.New("os: process already finished"))
actualProcs, err := agentproc.List(fs, sc)
require.NoError(t, err)
require.Len(t, actualProcs, len(expectedProcs))
for _, proc := range actualProcs {
expected, ok := expectedProcs[proc.PID]
require.True(t, ok)
require.Equal(t, expected.PID, proc.PID)
require.Equal(t, expected.CmdLine, proc.CmdLine)
require.Equal(t, expected.Dir, proc.Dir)
}
})
t.Run("NoSuchProcess", func(t *testing.T) {
t.Parallel()
var (
fs = afero.NewMemMapFs()
sc = agentproctest.NewMockSyscaller(gomock.NewController(t))
expectedProcs = make(map[int32]agentproc.Process)
)
for i := 0; i < 3; i++ {
proc := agentproctest.GenerateProcess(t, fs)
expectedProcs[proc.PID] = proc
sc.EXPECT().
Kill(proc.PID, syscall.Signal(0)).
Return(nil)
}
// Create a process that doesn't exist. We're not adding
// it to the map because it should be skipped over.
proc := agentproctest.GenerateProcess(t, fs)
sc.EXPECT().
Kill(proc.PID, syscall.Signal(0)).
Return(syscall.ESRCH)
actualProcs, err := agentproc.List(fs, sc)
require.NoError(t, err)
require.Len(t, actualProcs, len(expectedProcs))
for _, proc := range actualProcs {
expected, ok := expectedProcs[proc.PID]
require.True(t, ok)
require.Equal(t, expected.PID, proc.PID)
require.Equal(t, expected.CmdLine, proc.CmdLine)
require.Equal(t, expected.Dir, proc.Dir)
}
})
}
// These tests are not very interesting but they provide some modicum of
// confidence.
func TestProcess(t *testing.T) {
t.Parallel()
if runtime.GOOS != "linux" {
t.Skipf("skipping non-linux environment")
}
t.Run("SetNiceness", func(t *testing.T) {
t.Parallel()
var (
sc = agentproctest.NewMockSyscaller(gomock.NewController(t))
proc = &agentproc.Process{
PID: 32,
}
score = 20
)
sc.EXPECT().SetPriority(proc.PID, score).Return(nil)
err := proc.SetNiceness(sc, score)
require.NoError(t, err)
})
t.Run("Cmd", func(t *testing.T) {
t.Parallel()
var (
proc = &agentproc.Process{
CmdLine: "helloworld\x00--arg1\x00--arg2",
}
expectedName = "helloworld --arg1 --arg2"
)
require.Equal(t, expectedName, proc.Cmd())
})
}
-134
View File
@@ -1,134 +0,0 @@
//go:build linux
// +build linux
package agentproc
import (
"errors"
"os"
"path/filepath"
"strconv"
"strings"
"syscall"
"github.com/spf13/afero"
"golang.org/x/xerrors"
)
func List(fs afero.Fs, syscaller Syscaller) ([]*Process, error) {
d, err := fs.Open(defaultProcDir)
if err != nil {
return nil, xerrors.Errorf("open dir %q: %w", defaultProcDir, err)
}
defer d.Close()
entries, err := d.Readdirnames(0)
if err != nil {
return nil, xerrors.Errorf("readdirnames: %w", err)
}
processes := make([]*Process, 0, len(entries))
for _, entry := range entries {
pid, err := strconv.ParseInt(entry, 10, 32)
if err != nil {
continue
}
// Check that the process still exists.
exists, err := isProcessExist(syscaller, int32(pid))
if err != nil {
return nil, xerrors.Errorf("check process exists: %w", err)
}
if !exists {
continue
}
cmdline, err := afero.ReadFile(fs, filepath.Join(defaultProcDir, entry, "cmdline"))
if err != nil {
if isBenignError(err) {
continue
}
return nil, xerrors.Errorf("read cmdline: %w", err)
}
oomScore, err := afero.ReadFile(fs, filepath.Join(defaultProcDir, entry, "oom_score_adj"))
if err != nil {
if isBenignError(err) {
continue
}
return nil, xerrors.Errorf("read oom_score_adj: %w", err)
}
oom, err := strconv.Atoi(strings.TrimSpace(string(oomScore)))
if err != nil {
return nil, xerrors.Errorf("convert oom score: %w", err)
}
processes = append(processes, &Process{
PID: int32(pid),
CmdLine: string(cmdline),
Dir: filepath.Join(defaultProcDir, entry),
OOMScoreAdj: oom,
})
}
return processes, nil
}
func isProcessExist(syscaller Syscaller, pid int32) (bool, error) {
err := syscaller.Kill(pid, syscall.Signal(0))
if err == nil {
return true, nil
}
if err.Error() == "os: process already finished" {
return false, nil
}
var errno syscall.Errno
if !errors.As(err, &errno) {
return false, err
}
switch errno {
case syscall.ESRCH:
return false, nil
case syscall.EPERM:
return true, nil
}
return false, xerrors.Errorf("kill: %w", err)
}
func (p *Process) Niceness(sc Syscaller) (int, error) {
nice, err := sc.GetPriority(p.PID)
if err != nil {
return 0, xerrors.Errorf("get priority for %q: %w", p.CmdLine, err)
}
return nice, nil
}
func (p *Process) SetNiceness(sc Syscaller, score int) error {
err := sc.SetPriority(p.PID, score)
if err != nil {
return xerrors.Errorf("set priority for %q: %w", p.CmdLine, err)
}
return nil
}
func (p *Process) Cmd() string {
return strings.Join(p.cmdLine(), " ")
}
func (p *Process) cmdLine() []string {
return strings.Split(p.CmdLine, "\x00")
}
func isBenignError(err error) bool {
var errno syscall.Errno
if !xerrors.As(err, &errno) {
return false
}
return errno == syscall.ESRCH || errno == syscall.EPERM || xerrors.Is(err, os.ErrNotExist)
}
-21
View File
@@ -1,21 +0,0 @@
package agentproc
import (
"syscall"
)
type Syscaller interface {
SetPriority(pid int32, priority int) error
GetPriority(pid int32) (int, error)
Kill(pid int32, sig syscall.Signal) error
}
// nolint: unused // used on some but no all platforms
const defaultProcDir = "/proc"
type Process struct {
Dir string
CmdLine string
PID int32
OOMScoreAdj int
}
-30
View File
@@ -1,30 +0,0 @@
//go:build !linux
// +build !linux
package agentproc
import (
"syscall"
"golang.org/x/xerrors"
)
func NewSyscaller() Syscaller {
return nopSyscaller{}
}
var errUnimplemented = xerrors.New("unimplemented")
type nopSyscaller struct{}
func (nopSyscaller) SetPriority(int32, int) error {
return errUnimplemented
}
func (nopSyscaller) GetPriority(int32) (int, error) {
return 0, errUnimplemented
}
func (nopSyscaller) Kill(int32, syscall.Signal) error {
return errUnimplemented
}
-42
View File
@@ -1,42 +0,0 @@
//go:build linux
// +build linux
package agentproc
import (
"syscall"
"golang.org/x/sys/unix"
"golang.org/x/xerrors"
)
func NewSyscaller() Syscaller {
return UnixSyscaller{}
}
type UnixSyscaller struct{}
func (UnixSyscaller) SetPriority(pid int32, nice int) error {
err := unix.Setpriority(unix.PRIO_PROCESS, int(pid), nice)
if err != nil {
return xerrors.Errorf("set priority: %w", err)
}
return nil
}
func (UnixSyscaller) GetPriority(pid int32) (int, error) {
nice, err := unix.Getpriority(0, int(pid))
if err != nil {
return 0, xerrors.Errorf("get priority: %w", err)
}
return nice, nil
}
func (UnixSyscaller) Kill(pid int32, sig syscall.Signal) error {
err := syscall.Kill(int(pid), sig)
if err != nil {
return xerrors.Errorf("kill: %w", err)
}
return nil
}
+8 -8
View File
@@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/agent/agentscripts"
"github.com/coder/coder/v2/agent/agentssh"
"github.com/coder/coder/v2/agent/agenttest"
@@ -24,7 +24,7 @@ import (
)
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
goleak.VerifyTestMain(m, testutil.GoleakOptions...)
}
func TestExecuteBasic(t *testing.T) {
@@ -35,7 +35,7 @@ func TestExecuteBasic(t *testing.T) {
return fLogger
})
defer runner.Close()
aAPI := agenttest.NewFakeAgentAPI(t, slogtest.Make(t, nil), nil, nil)
aAPI := agenttest.NewFakeAgentAPI(t, testutil.Logger(t), nil, nil)
err := runner.Init([]codersdk.WorkspaceAgentScript{{
LogSourceID: uuid.New(),
Script: "echo hello",
@@ -61,7 +61,7 @@ func TestEnv(t *testing.T) {
cmd.exe /c echo %CODER_SCRIPT_BIN_DIR%
`
}
aAPI := agenttest.NewFakeAgentAPI(t, slogtest.Make(t, nil), nil, nil)
aAPI := agenttest.NewFakeAgentAPI(t, testutil.Logger(t), nil, nil)
err := runner.Init([]codersdk.WorkspaceAgentScript{{
LogSourceID: id,
Script: script,
@@ -102,7 +102,7 @@ func TestTimeout(t *testing.T) {
t.Parallel()
runner := setup(t, nil)
defer runner.Close()
aAPI := agenttest.NewFakeAgentAPI(t, slogtest.Make(t, nil), nil, nil)
aAPI := agenttest.NewFakeAgentAPI(t, testutil.Logger(t), nil, nil)
err := runner.Init([]codersdk.WorkspaceAgentScript{{
LogSourceID: uuid.New(),
Script: "sleep infinity",
@@ -121,7 +121,7 @@ func TestScriptReportsTiming(t *testing.T) {
return fLogger
})
aAPI := agenttest.NewFakeAgentAPI(t, slogtest.Make(t, nil), nil, nil)
aAPI := agenttest.NewFakeAgentAPI(t, testutil.Logger(t), nil, nil)
err := runner.Init([]codersdk.WorkspaceAgentScript{{
DisplayName: "say-hello",
LogSourceID: uuid.New(),
@@ -160,8 +160,8 @@ func setup(t *testing.T, getScriptLogger func(logSourceID uuid.UUID) agentscript
}
}
fs := afero.NewMemMapFs()
logger := slogtest.Make(t, nil)
s, err := agentssh.NewServer(context.Background(), logger, prometheus.NewRegistry(), fs, nil)
logger := testutil.Logger(t)
s, err := agentssh.NewServer(context.Background(), logger, prometheus.NewRegistry(), fs, agentexec.DefaultExecer, nil)
require.NoError(t, err)
t.Cleanup(func() {
_ = s.Close()
+5 -2
View File
@@ -30,6 +30,7 @@ import (
"cdr.dev/slog"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/agent/usershell"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/pty"
@@ -97,6 +98,7 @@ type Server struct {
// a lock on mu but protected by closing.
wg sync.WaitGroup
Execer agentexec.Execer
logger slog.Logger
srv *ssh.Server
@@ -109,7 +111,7 @@ type Server struct {
metrics *sshServerMetrics
}
func NewServer(ctx context.Context, logger slog.Logger, prometheusRegistry *prometheus.Registry, fs afero.Fs, config *Config) (*Server, error) {
func NewServer(ctx context.Context, logger slog.Logger, prometheusRegistry *prometheus.Registry, fs afero.Fs, execer agentexec.Execer, config *Config) (*Server, error) {
// Clients' should ignore the host key when connecting.
// The agent needs to authenticate with coderd to SSH,
// so SSH authentication doesn't improve security.
@@ -152,6 +154,7 @@ func NewServer(ctx context.Context, logger slog.Logger, prometheusRegistry *prom
metrics := newSSHServerMetrics(prometheusRegistry)
s := &Server{
Execer: execer,
listeners: make(map[net.Listener]struct{}),
fs: fs,
conns: make(map[net.Conn]struct{}),
@@ -725,7 +728,7 @@ func (s *Server) CreateCommand(ctx context.Context, script string, env []string)
}
}
cmd := pty.CommandContext(ctx, name, args...)
cmd := s.Execer.PTYCommandContext(ctx, name, args...)
cmd.Dir = s.config.WorkingDirectory()
// If the metadata directory doesn't exist, we run the command
+3 -4
View File
@@ -15,10 +15,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/pty"
"github.com/coder/coder/v2/testutil"
"cdr.dev/slog/sloggers/slogtest"
)
const longScript = `
@@ -36,8 +35,8 @@ func Test_sessionStart_orphan(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium)
defer cancel()
logger := slogtest.Make(t, nil)
s, err := NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), nil)
logger := testutil.Logger(t)
s, err := NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), agentexec.DefaultExecer, nil)
require.NoError(t, err)
defer s.Close()
+11 -10
View File
@@ -22,21 +22,22 @@ import (
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/agent/agentssh"
"github.com/coder/coder/v2/pty/ptytest"
"github.com/coder/coder/v2/testutil"
)
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
goleak.VerifyTestMain(m, testutil.GoleakOptions...)
}
func TestNewServer_ServeClient(t *testing.T) {
t.Parallel()
ctx := context.Background()
logger := slogtest.Make(t, nil)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), nil)
logger := testutil.Logger(t)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), agentexec.DefaultExecer, nil)
require.NoError(t, err)
defer s.Close()
@@ -76,8 +77,8 @@ func TestNewServer_ExecuteShebang(t *testing.T) {
}
ctx := context.Background()
logger := slogtest.Make(t, nil)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), nil)
logger := testutil.Logger(t)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), agentexec.DefaultExecer, nil)
require.NoError(t, err)
t.Cleanup(func() {
_ = s.Close()
@@ -108,7 +109,7 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
ctx := context.Background()
logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true})
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), nil)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), agentexec.DefaultExecer, nil)
require.NoError(t, err)
defer s.Close()
@@ -158,8 +159,8 @@ func TestNewServer_Signal(t *testing.T) {
t.Parallel()
ctx := context.Background()
logger := slogtest.Make(t, nil)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), nil)
logger := testutil.Logger(t)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), agentexec.DefaultExecer, nil)
require.NoError(t, err)
defer s.Close()
@@ -223,8 +224,8 @@ func TestNewServer_Signal(t *testing.T) {
t.Parallel()
ctx := context.Background()
logger := slogtest.Make(t, nil)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), nil)
logger := testutil.Logger(t)
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), agentexec.DefaultExecer, nil)
require.NoError(t, err)
defer s.Close()
+3 -4
View File
@@ -21,8 +21,7 @@ import (
"github.com/stretchr/testify/require"
gossh "golang.org/x/crypto/ssh"
"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/agent/agentssh"
"github.com/coder/coder/v2/testutil"
)
@@ -34,9 +33,9 @@ func TestServer_X11(t *testing.T) {
}
ctx := context.Background()
logger := slogtest.Make(t, nil).Leveled(slog.LevelDebug)
logger := testutil.Logger(t)
fs := afero.NewOsFs()
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), fs, &agentssh.Config{})
s, err := agentssh.NewServer(ctx, logger, prometheus.NewRegistry(), fs, agentexec.DefaultExecer, &agentssh.Config{})
require.NoError(t, err)
defer s.Close()
+2 -3
View File
@@ -7,10 +7,9 @@ import (
"github.com/stretchr/testify/assert"
"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/agent"
"github.com/coder/coder/v2/codersdk/agentsdk"
"github.com/coder/coder/v2/testutil"
)
// New starts a new agent for use in tests.
@@ -24,7 +23,7 @@ func New(t testing.TB, coderURL *url.URL, agentToken string, opts ...func(*agent
t.Helper()
var o agent.Options
log := slogtest.Make(t, nil).Leveled(slog.LevelDebug).Named("agent")
log := testutil.Logger(t).Named("agent")
o.Logger = log
for _, opt := range opts {
+4 -5
View File
@@ -15,7 +15,6 @@ import (
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
"google.golang.org/protobuf/types/known/durationpb"
"storj.io/drpc"
"storj.io/drpc/drpcmux"
"storj.io/drpc/drpcserver"
"tailscale.com/tailcfg"
@@ -71,7 +70,6 @@ func NewClient(t testing.TB,
t: t,
logger: logger.Named("client"),
agentID: agentID,
coordinator: coordinator,
server: server,
fakeAgentAPI: fakeAAPI,
derpMapUpdates: derpMapUpdates,
@@ -82,7 +80,6 @@ type Client struct {
t testing.TB
logger slog.Logger
agentID uuid.UUID
coordinator tailnet.Coordinator
server *drpcserver.Server
fakeAgentAPI *FakeAgentAPI
LastWorkspaceAgent func()
@@ -99,7 +96,9 @@ func (c *Client) Close() {
c.derpMapOnce.Do(func() { close(c.derpMapUpdates) })
}
func (c *Client) ConnectRPC(ctx context.Context) (drpc.Conn, error) {
func (c *Client) ConnectRPC23(ctx context.Context) (
agentproto.DRPCAgentClient23, proto.DRPCTailnetClient23, error,
) {
conn, lis := drpcsdk.MemTransportPipe()
c.LastWorkspaceAgent = func() {
_ = conn.Close()
@@ -117,7 +116,7 @@ func (c *Client) ConnectRPC(ctx context.Context) (drpc.Conn, error) {
go func() {
_ = c.server.Serve(serveCtx, lis)
}()
return conn, nil
return agentproto.NewDRPCAgentClient(conn), proto.NewDRPCTailnetClient(conn), nil
}
func (c *Client) GetLifecycleStates() []codersdk.WorkspaceAgentLifecycle {
+2 -4
View File
@@ -12,8 +12,6 @@ import (
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/agent"
"github.com/coder/coder/v2/agent/agenttest"
"github.com/coder/coder/v2/agent/proto"
@@ -258,10 +256,10 @@ func setupAppReporter(
// We use a proper fake agent API so we can test the conversion code and the
// request code as well. Before we were bypassing these by using a custom
// post function.
fakeAAPI := agenttest.NewFakeAgentAPI(t, slogtest.Make(t, nil), nil, nil)
fakeAAPI := agenttest.NewFakeAgentAPI(t, testutil.Logger(t), nil, nil)
go agent.NewAppHealthReporterWithClock(
slogtest.Make(t, nil).Leveled(slog.LevelDebug),
testutil.Logger(t),
apps, agentsdk.AppHealthPoster(fakeAAPI), clk,
)(ctx)
+2 -2
View File
@@ -12,7 +12,7 @@ import (
func TestCheckpoint_CompleteWait(t *testing.T) {
t.Parallel()
logger := slogtest.Make(t, nil)
logger := testutil.Logger(t)
ctx := testutil.Context(t, testutil.WaitShort)
uut := newCheckpoint(logger)
err := xerrors.New("test")
@@ -35,7 +35,7 @@ func TestCheckpoint_CompleteTwice(t *testing.T) {
func TestCheckpoint_WaitComplete(t *testing.T) {
t.Parallel()
logger := slogtest.Make(t, nil)
logger := testutil.Logger(t)
ctx := testutil.Context(t, testutil.WaitShort)
uut := newCheckpoint(logger)
err := xerrors.New("test")
+1 -1
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.30.0
// protoc v4.23.3
// protoc v4.23.4
// source: agent/proto/agent.proto
package proto
+1 -1
View File
@@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-drpc. DO NOT EDIT.
// protoc-gen-go-drpc version: v0.0.33
// protoc-gen-go-drpc version: v0.0.34
// source: agent/proto/agent.proto
package proto
+14 -10
View File
@@ -24,15 +24,19 @@ type DRPCAgentClient20 interface {
// DRPCAgentClient21 is the Agent API at v2.1. It is useful if you want to be maximally compatible
// with Coderd Release Versions from 2.12+
type DRPCAgentClient21 interface {
DRPCConn() drpc.Conn
GetManifest(ctx context.Context, in *GetManifestRequest) (*Manifest, error)
GetServiceBanner(ctx context.Context, in *GetServiceBannerRequest) (*ServiceBanner, error)
UpdateStats(ctx context.Context, in *UpdateStatsRequest) (*UpdateStatsResponse, error)
UpdateLifecycle(ctx context.Context, in *UpdateLifecycleRequest) (*Lifecycle, error)
BatchUpdateAppHealths(ctx context.Context, in *BatchUpdateAppHealthRequest) (*BatchUpdateAppHealthResponse, error)
UpdateStartup(ctx context.Context, in *UpdateStartupRequest) (*Startup, error)
BatchUpdateMetadata(ctx context.Context, in *BatchUpdateMetadataRequest) (*BatchUpdateMetadataResponse, error)
BatchCreateLogs(ctx context.Context, in *BatchCreateLogsRequest) (*BatchCreateLogsResponse, error)
DRPCAgentClient20
GetAnnouncementBanners(ctx context.Context, in *GetAnnouncementBannersRequest) (*GetAnnouncementBannersResponse, error)
}
// DRPCAgentClient22 is the Agent API at v2.2. It is identical to 2.1, since the change was made on
// the Tailnet API, which uses the same version number. Compatible with Coder v2.13+
type DRPCAgentClient22 interface {
DRPCAgentClient21
}
// DRPCAgentClient23 is the Agent API at v2.3. It adds the ScriptCompleted RPC. Compatible with
// Coder v2.18+
type DRPCAgentClient23 interface {
DRPCAgentClient22
ScriptCompleted(ctx context.Context, in *WorkspaceAgentScriptCompletedRequest) (*WorkspaceAgentScriptCompletedResponse, error)
}
+3 -2
View File
@@ -14,6 +14,7 @@ import (
"cdr.dev/slog"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/pty"
)
@@ -39,7 +40,7 @@ type bufferedReconnectingPTY struct {
// newBuffered starts the buffered pty. If the context ends the process will be
// killed.
func newBuffered(ctx context.Context, cmd *pty.Cmd, options *Options, logger slog.Logger) *bufferedReconnectingPTY {
func newBuffered(ctx context.Context, logger slog.Logger, execer agentexec.Execer, cmd *pty.Cmd, options *Options) *bufferedReconnectingPTY {
rpty := &bufferedReconnectingPTY{
activeConns: map[string]net.Conn{},
command: cmd,
@@ -58,7 +59,7 @@ func newBuffered(ctx context.Context, cmd *pty.Cmd, options *Options, logger slo
// Add TERM then start the command with a pty. pty.Cmd duplicates Path as the
// first argument so remove it.
cmdWithEnv := pty.CommandContext(ctx, cmd.Path, cmd.Args[1:]...)
cmdWithEnv := execer.PTYCommandContext(ctx, cmd.Path, cmd.Args[1:]...)
cmdWithEnv.Env = append(rpty.command.Env, "TERM=xterm-256color")
cmdWithEnv.Dir = rpty.command.Dir
ptty, process, err := pty.Start(cmdWithEnv)
+4 -3
View File
@@ -14,6 +14,7 @@ import (
"golang.org/x/xerrors"
"cdr.dev/slog"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/codersdk/workspacesdk"
"github.com/coder/coder/v2/pty"
)
@@ -55,7 +56,7 @@ type ReconnectingPTY interface {
// close itself (and all connections to it) if nothing is attached for the
// duration of the timeout, if the context ends, or the process exits (buffered
// backend only).
func New(ctx context.Context, cmd *pty.Cmd, options *Options, logger slog.Logger) ReconnectingPTY {
func New(ctx context.Context, logger slog.Logger, execer agentexec.Execer, cmd *pty.Cmd, options *Options) ReconnectingPTY {
if options.Timeout == 0 {
options.Timeout = 5 * time.Minute
}
@@ -75,9 +76,9 @@ func New(ctx context.Context, cmd *pty.Cmd, options *Options, logger slog.Logger
switch backendType {
case "screen":
return newScreen(ctx, cmd, options, logger)
return newScreen(ctx, logger, execer, cmd, options)
default:
return newBuffered(ctx, cmd, options, logger)
return newBuffered(ctx, logger, execer, cmd, options)
}
}
+22 -12
View File
@@ -9,7 +9,6 @@ import (
"io"
"net"
"os"
"os/exec"
"path/filepath"
"strings"
"sync"
@@ -20,11 +19,13 @@ import (
"golang.org/x/xerrors"
"cdr.dev/slog"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/pty"
)
// screenReconnectingPTY provides a reconnectable PTY via `screen`.
type screenReconnectingPTY struct {
execer agentexec.Execer
command *pty.Cmd
// id holds the id of the session for both creating and attaching. This will
@@ -59,16 +60,15 @@ type screenReconnectingPTY struct {
// spawns the daemon with a hardcoded 24x80 size it is not a very good user
// experience. Instead we will let the attach command spawn the daemon on its
// own which causes it to spawn with the specified size.
func newScreen(ctx context.Context, cmd *pty.Cmd, options *Options, logger slog.Logger) *screenReconnectingPTY {
func newScreen(ctx context.Context, logger slog.Logger, execer agentexec.Execer, cmd *pty.Cmd, options *Options) *screenReconnectingPTY {
rpty := &screenReconnectingPTY{
execer: execer,
command: cmd,
metrics: options.Metrics,
state: newState(),
timeout: options.Timeout,
}
go rpty.lifecycle(ctx, logger)
// Socket paths are limited to around 100 characters on Linux and macOS which
// depending on the temporary directory can be a problem. To give more leeway
// use a short ID.
@@ -124,6 +124,8 @@ func newScreen(ctx context.Context, cmd *pty.Cmd, options *Options, logger slog.
return rpty
}
go rpty.lifecycle(ctx, logger)
return rpty
}
@@ -210,7 +212,7 @@ func (rpty *screenReconnectingPTY) doAttach(ctx context.Context, conn net.Conn,
logger.Debug(ctx, "spawning screen client", slog.F("screen_id", rpty.id))
// Wrap the command with screen and tie it to the connection's context.
cmd := pty.CommandContext(ctx, "screen", append([]string{
cmd := rpty.execer.PTYCommandContext(ctx, "screen", append([]string{
// -S is for setting the session's name.
"-S", rpty.id,
// -U tells screen to use UTF-8 encoding.
@@ -327,10 +329,10 @@ func (rpty *screenReconnectingPTY) sendCommand(ctx context.Context, command stri
defer cancel()
var lastErr error
run := func() bool {
run := func() (bool, error) {
var stdout bytes.Buffer
//nolint:gosec
cmd := exec.CommandContext(ctx, "screen",
cmd := rpty.execer.CommandContext(ctx, "screen",
// -x targets an attached session.
"-x", rpty.id,
// -c is the flag for the config file.
@@ -343,13 +345,13 @@ func (rpty *screenReconnectingPTY) sendCommand(ctx context.Context, command stri
cmd.Stdout = &stdout
err := cmd.Run()
if err == nil {
return true
return true, nil
}
stdoutStr := stdout.String()
for _, se := range successErrors {
if strings.Contains(stdoutStr, se) {
return true
return true, nil
}
}
@@ -359,11 +361,15 @@ func (rpty *screenReconnectingPTY) sendCommand(ctx context.Context, command stri
lastErr = xerrors.Errorf("`screen -x %s -X %s`: %w: %s", rpty.id, command, err, stdoutStr)
}
return false
return false, nil
}
// Run immediately.
if done := run(); done {
done, err := run()
if err != nil {
return err
}
if done {
return nil
}
@@ -379,7 +385,11 @@ func (rpty *screenReconnectingPTY) sendCommand(ctx context.Context, command stri
}
return errors.Join(ctx.Err(), lastErr)
case <-ticker.C:
if done := run(); done {
done, err := run()
if err != nil {
return err
}
if done {
return nil
}
}
+196
View File
@@ -0,0 +1,196 @@
package reconnectingpty
import (
"context"
"encoding/binary"
"encoding/json"
"net"
"sync"
"sync/atomic"
"time"
"github.com/google/uuid"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/xerrors"
"cdr.dev/slog"
"github.com/coder/coder/v2/agent/agentssh"
"github.com/coder/coder/v2/codersdk/workspacesdk"
)
type Server struct {
logger slog.Logger
connectionsTotal prometheus.Counter
errorsTotal *prometheus.CounterVec
commandCreator *agentssh.Server
connCount atomic.Int64
reconnectingPTYs sync.Map
timeout time.Duration
}
// NewServer returns a new ReconnectingPTY server
func NewServer(logger slog.Logger, commandCreator *agentssh.Server,
connectionsTotal prometheus.Counter, errorsTotal *prometheus.CounterVec,
timeout time.Duration,
) *Server {
return &Server{
logger: logger,
commandCreator: commandCreator,
connectionsTotal: connectionsTotal,
errorsTotal: errorsTotal,
timeout: timeout,
}
}
func (s *Server) Serve(ctx, hardCtx context.Context, l net.Listener) (retErr error) {
var wg sync.WaitGroup
for {
if ctx.Err() != nil {
break
}
conn, err := l.Accept()
if err != nil {
s.logger.Debug(ctx, "accept pty failed", slog.Error(err))
retErr = err
break
}
clog := s.logger.With(
slog.F("remote", conn.RemoteAddr().String()),
slog.F("local", conn.LocalAddr().String()))
clog.Info(ctx, "accepted conn")
wg.Add(1)
closed := make(chan struct{})
go func() {
select {
case <-closed:
case <-hardCtx.Done():
_ = conn.Close()
}
wg.Done()
}()
wg.Add(1)
go func() {
defer close(closed)
defer wg.Done()
_ = s.handleConn(ctx, clog, conn)
}()
}
wg.Wait()
return retErr
}
func (s *Server) ConnCount() int64 {
return s.connCount.Load()
}
func (s *Server) handleConn(ctx context.Context, logger slog.Logger, conn net.Conn) (retErr error) {
defer conn.Close()
s.connectionsTotal.Add(1)
s.connCount.Add(1)
defer s.connCount.Add(-1)
// This cannot use a JSON decoder, since that can
// buffer additional data that is required for the PTY.
rawLen := make([]byte, 2)
_, err := conn.Read(rawLen)
if err != nil {
// logging at info since a single incident isn't too worrying (the client could just have
// hung up), but if we get a lot of these we'd want to investigate.
logger.Info(ctx, "failed to read AgentReconnectingPTYInit length", slog.Error(err))
return nil
}
length := binary.LittleEndian.Uint16(rawLen)
data := make([]byte, length)
_, err = conn.Read(data)
if err != nil {
// logging at info since a single incident isn't too worrying (the client could just have
// hung up), but if we get a lot of these we'd want to investigate.
logger.Info(ctx, "failed to read AgentReconnectingPTYInit", slog.Error(err))
return nil
}
var msg workspacesdk.AgentReconnectingPTYInit
err = json.Unmarshal(data, &msg)
if err != nil {
logger.Warn(ctx, "failed to unmarshal init", slog.F("raw", data))
return nil
}
connectionID := uuid.NewString()
connLogger := logger.With(slog.F("message_id", msg.ID), slog.F("connection_id", connectionID))
connLogger.Debug(ctx, "starting handler")
defer func() {
if err := retErr; err != nil {
// If the context is done, we don't want to log this as an error since it's expected.
if ctx.Err() != nil {
connLogger.Info(ctx, "reconnecting pty failed with attach error (agent closed)", slog.Error(err))
} else {
connLogger.Error(ctx, "reconnecting pty failed with attach error", slog.Error(err))
}
}
connLogger.Info(ctx, "reconnecting pty connection closed")
}()
var rpty ReconnectingPTY
sendConnected := make(chan ReconnectingPTY, 1)
// On store, reserve this ID to prevent multiple concurrent new connections.
waitReady, ok := s.reconnectingPTYs.LoadOrStore(msg.ID, sendConnected)
if ok {
close(sendConnected) // Unused.
connLogger.Debug(ctx, "connecting to existing reconnecting pty")
c, ok := waitReady.(chan ReconnectingPTY)
if !ok {
return xerrors.Errorf("found invalid type in reconnecting pty map: %T", waitReady)
}
rpty, ok = <-c
if !ok || rpty == nil {
return xerrors.Errorf("reconnecting pty closed before connection")
}
c <- rpty // Put it back for the next reconnect.
} else {
connLogger.Debug(ctx, "creating new reconnecting pty")
connected := false
defer func() {
if !connected && retErr != nil {
s.reconnectingPTYs.Delete(msg.ID)
close(sendConnected)
}
}()
// Empty command will default to the users shell!
cmd, err := s.commandCreator.CreateCommand(ctx, msg.Command, nil)
if err != nil {
s.errorsTotal.WithLabelValues("create_command").Add(1)
return xerrors.Errorf("create command: %w", err)
}
rpty = New(ctx,
logger.With(slog.F("message_id", msg.ID)),
s.commandCreator.Execer,
cmd,
&Options{
Timeout: s.timeout,
Metrics: s.errorsTotal,
},
)
done := make(chan struct{})
go func() {
select {
case <-done:
case <-ctx.Done():
rpty.Close(ctx.Err())
}
}()
go func() {
rpty.Wait()
s.reconnectingPTYs.Delete(msg.ID)
}()
connected = true
sendConnected <- rpty
}
return rpty.Attach(ctx, connectionID, conn, msg.Height, msg.Width, connLogger)
}
+12 -5
View File
@@ -2,6 +2,7 @@ package agent
import (
"context"
"maps"
"sync"
"time"
@@ -32,7 +33,7 @@ type statsDest interface {
// statsDest (agent API in prod)
type statsReporter struct {
*sync.Cond
networkStats *map[netlogtype.Connection]netlogtype.Counts
networkStats map[netlogtype.Connection]netlogtype.Counts
unreported bool
lastInterval time.Duration
@@ -54,8 +55,15 @@ func (s *statsReporter) callback(_, _ time.Time, virtual, _ map[netlogtype.Conne
s.L.Lock()
defer s.L.Unlock()
s.logger.Debug(context.Background(), "got stats callback")
s.networkStats = &virtual
s.unreported = true
// Accumulate stats until they've been reported.
if s.unreported && len(s.networkStats) > 0 {
for k, v := range virtual {
s.networkStats[k] = s.networkStats[k].Add(v)
}
} else {
s.networkStats = maps.Clone(virtual)
s.unreported = true
}
s.Broadcast()
}
@@ -96,9 +104,8 @@ func (s *statsReporter) reportLoop(ctx context.Context, dest statsDest) error {
if ctxDone {
return nil
}
networkStats := *s.networkStats
s.unreported = false
if err = s.reportLocked(ctx, dest, networkStats); err != nil {
if err = s.reportLocked(ctx, dest, s.networkStats); err != nil {
return xerrors.Errorf("report stats: %w", err)
}
}
+16 -65
View File
@@ -1,10 +1,7 @@
package agent
import (
"bytes"
"context"
"encoding/json"
"io"
"net/netip"
"sync"
"testing"
@@ -16,9 +13,6 @@ import (
"tailscale.com/types/netlogtype"
"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogjson"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/agent/proto"
"github.com/coder/coder/v2/testutil"
)
@@ -26,7 +20,7 @@ import (
func TestStatsReporter(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
logger := slogtest.Make(t, nil).Leveled(slog.LevelDebug)
logger := testutil.Logger(t)
fSource := newFakeNetworkStatsSource(ctx, t)
fCollector := newFakeCollector(t)
fDest := newFakeStatsDest()
@@ -70,7 +64,7 @@ func TestStatsReporter(t *testing.T) {
require.Equal(t, netStats, gotNetStats)
// while we are collecting the stats, send in two new netStats to simulate
// what happens if we don't keep up. Only the latest should be kept.
// what happens if we don't keep up. The stats should be accumulated.
netStats0 := map[netlogtype.Connection]netlogtype.Counts{
{
Proto: ipproto.TCP,
@@ -108,9 +102,21 @@ func TestStatsReporter(t *testing.T) {
require.Equal(t, stats, update.Stats)
testutil.RequireSendCtx(ctx, t, fDest.resps, &proto.UpdateStatsResponse{ReportInterval: durationpb.New(interval)})
// second update -- only netStats1 is reported
// second update -- netStat0 and netStats1 are accumulated and reported
wantNetStats := map[netlogtype.Connection]netlogtype.Counts{
{
Proto: ipproto.TCP,
Src: netip.MustParseAddrPort("192.168.1.33:4887"),
Dst: netip.MustParseAddrPort("192.168.2.99:9999"),
}: {
TxPackets: 21,
TxBytes: 21,
RxPackets: 21,
RxBytes: 21,
},
}
gotNetStats = testutil.RequireRecvCtx(ctx, t, fCollector.calls)
require.Equal(t, netStats1, gotNetStats)
require.Equal(t, wantNetStats, gotNetStats)
stats = &proto.Stats{SessionCountJetbrains: 66}
testutil.RequireSendCtx(ctx, t, fCollector.stats, stats)
update = testutil.RequireRecvCtx(ctx, t, fDest.reqs)
@@ -214,58 +220,3 @@ func newFakeStatsDest() *fakeStatsDest {
resps: make(chan *proto.UpdateStatsResponse),
}
}
func Test_logDebouncer(t *testing.T) {
t.Parallel()
var (
buf bytes.Buffer
logger = slog.Make(slogjson.Sink(&buf))
ctx = context.Background()
)
debouncer := &logDebouncer{
logger: logger,
messages: map[string]time.Time{},
interval: time.Minute,
}
fields := map[string]interface{}{
"field_1": float64(1),
"field_2": "2",
}
debouncer.Error(ctx, "my message", "field_1", 1, "field_2", "2")
debouncer.Warn(ctx, "another message", "field_1", 1, "field_2", "2")
// Shouldn't log this.
debouncer.Warn(ctx, "another message", "field_1", 1, "field_2", "2")
require.Len(t, debouncer.messages, 2)
type entry struct {
Msg string `json:"msg"`
Level string `json:"level"`
Fields map[string]interface{} `json:"fields"`
}
assertLog := func(msg string, level string, fields map[string]interface{}) {
line, err := buf.ReadString('\n')
require.NoError(t, err)
var e entry
err = json.Unmarshal([]byte(line), &e)
require.NoError(t, err)
require.Equal(t, msg, e.Msg)
require.Equal(t, level, e.Level)
require.Equal(t, fields, e.Fields)
}
assertLog("my message", "ERROR", fields)
assertLog("another message", "WARN", fields)
debouncer.messages["another message"] = time.Now().Add(-2 * time.Minute)
debouncer.Warn(ctx, "another message", "field_1", 1, "field_2", "2")
assertLog("another message", "WARN", fields)
// Assert nothing else was written.
_, err := buf.ReadString('\n')
require.ErrorIs(t, err, io.EOF)
}
+26
View File
@@ -0,0 +1,26 @@
// Package apiversion provides an API version type that can be used to validate
// compatibility between two API versions.
//
// NOTE: API VERSIONS ARE NOT SEMANTIC VERSIONS.
//
// API versions are represented as major.minor where major and minor are both
// positive integers.
//
// API versions are not directly tied to a specific release of the software.
// Instead, they are used to represent the capabilities of the server. For
// example, a server that supports API version 1.2 should be able to handle
// requests from clients that support API version 1.0, 1.1, or 1.2.
// However, a server that supports API version 2.0 is not required to handle
// requests from clients that support API version 1.x.
// Clients may need to negotiate with the server to determine the highest
// supported API version.
//
// When making a change to the API, use the following rules to determine the
// next API version:
// 1. If the change is backward-compatible, increment the minor version.
// Examples of backward-compatible changes include adding new fields to
// a response or adding new endpoints.
// 2. If the change is not backward-compatible, increment the major version.
// Examples of non-backward-compatible changes include removing or renaming
// fields.
package apiversion
+14 -11
View File
@@ -1,4 +1,4 @@
package coderd
package archive
import (
"archive/tar"
@@ -10,21 +10,22 @@ import (
"strings"
)
func CreateTarFromZip(zipReader *zip.Reader) ([]byte, error) {
// CreateTarFromZip converts the given zipReader to a tar archive.
func CreateTarFromZip(zipReader *zip.Reader, maxSize int64) ([]byte, error) {
var tarBuffer bytes.Buffer
err := writeTarArchive(&tarBuffer, zipReader)
err := writeTarArchive(&tarBuffer, zipReader, maxSize)
if err != nil {
return nil, err
}
return tarBuffer.Bytes(), nil
}
func writeTarArchive(w io.Writer, zipReader *zip.Reader) error {
func writeTarArchive(w io.Writer, zipReader *zip.Reader, maxSize int64) error {
tarWriter := tar.NewWriter(w)
defer tarWriter.Close()
for _, file := range zipReader.File {
err := processFileInZipArchive(file, tarWriter)
err := processFileInZipArchive(file, tarWriter, maxSize)
if err != nil {
return err
}
@@ -32,7 +33,7 @@ func writeTarArchive(w io.Writer, zipReader *zip.Reader) error {
return nil
}
func processFileInZipArchive(file *zip.File, tarWriter *tar.Writer) error {
func processFileInZipArchive(file *zip.File, tarWriter *tar.Writer, maxSize int64) error {
fileReader, err := file.Open()
if err != nil {
return err
@@ -52,7 +53,7 @@ func processFileInZipArchive(file *zip.File, tarWriter *tar.Writer) error {
return err
}
n, err := io.CopyN(tarWriter, fileReader, httpFileMaxBytes)
n, err := io.CopyN(tarWriter, fileReader, maxSize)
log.Println(file.Name, n, err)
if errors.Is(err, io.EOF) {
err = nil
@@ -60,16 +61,18 @@ func processFileInZipArchive(file *zip.File, tarWriter *tar.Writer) error {
return err
}
func CreateZipFromTar(tarReader *tar.Reader) ([]byte, error) {
// CreateZipFromTar converts the given tarReader to a zip archive.
func CreateZipFromTar(tarReader *tar.Reader, maxSize int64) ([]byte, error) {
var zipBuffer bytes.Buffer
err := WriteZipArchive(&zipBuffer, tarReader)
err := WriteZip(&zipBuffer, tarReader, maxSize)
if err != nil {
return nil, err
}
return zipBuffer.Bytes(), nil
}
func WriteZipArchive(w io.Writer, tarReader *tar.Reader) error {
// WriteZip writes the given tarReader to w.
func WriteZip(w io.Writer, tarReader *tar.Reader, maxSize int64) error {
zipWriter := zip.NewWriter(w)
defer zipWriter.Close()
@@ -100,7 +103,7 @@ func WriteZipArchive(w io.Writer, tarReader *tar.Reader) error {
return err
}
_, err = io.CopyN(zipEntry, tarReader, httpFileMaxBytes)
_, err = io.CopyN(zipEntry, tarReader, maxSize)
if errors.Is(err, io.EOF) {
err = nil
}
@@ -1,10 +1,9 @@
package coderd_test
package archive_test
import (
"archive/tar"
"archive/zip"
"bytes"
"io"
"io/fs"
"os"
"os/exec"
@@ -12,13 +11,12 @@ import (
"runtime"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/coderd"
"github.com/coder/coder/v2/archive"
"github.com/coder/coder/v2/archive/archivetest"
"github.com/coder/coder/v2/testutil"
)
@@ -30,18 +28,17 @@ func TestCreateTarFromZip(t *testing.T) {
// Read a zip file we prepared earlier
ctx := testutil.Context(t, testutil.WaitShort)
zipBytes, err := os.ReadFile(filepath.Join("testdata", "test.zip"))
require.NoError(t, err, "failed to read sample zip file")
zipBytes := archivetest.TestZipFileBytes()
// Assert invariant
assertSampleZipFile(t, zipBytes)
archivetest.AssertSampleZipFile(t, zipBytes)
zr, err := zip.NewReader(bytes.NewReader(zipBytes), int64(len(zipBytes)))
require.NoError(t, err, "failed to parse sample zip file")
tarBytes, err := coderd.CreateTarFromZip(zr)
tarBytes, err := archive.CreateTarFromZip(zr, int64(len(zipBytes)))
require.NoError(t, err, "failed to convert zip to tar")
assertSampleTarFile(t, tarBytes)
archivetest.AssertSampleTarFile(t, tarBytes)
tempDir := t.TempDir()
tempFilePath := filepath.Join(tempDir, "test.tar")
@@ -60,14 +57,13 @@ func TestCreateZipFromTar(t *testing.T) {
}
t.Run("OK", func(t *testing.T) {
t.Parallel()
tarBytes, err := os.ReadFile(filepath.Join(".", "testdata", "test.tar"))
require.NoError(t, err, "failed to read sample tar file")
tarBytes := archivetest.TestTarFileBytes()
tr := tar.NewReader(bytes.NewReader(tarBytes))
zipBytes, err := coderd.CreateZipFromTar(tr)
zipBytes, err := archive.CreateZipFromTar(tr, int64(len(tarBytes)))
require.NoError(t, err)
assertSampleZipFile(t, zipBytes)
archivetest.AssertSampleZipFile(t, zipBytes)
tempDir := t.TempDir()
tempFilePath := filepath.Join(tempDir, "test.zip")
@@ -99,7 +95,7 @@ func TestCreateZipFromTar(t *testing.T) {
// When: we convert this to a zip
tr := tar.NewReader(&tarBytes)
zipBytes, err := coderd.CreateZipFromTar(tr)
zipBytes, err := archive.CreateZipFromTar(tr, int64(tarBytes.Len()))
require.NoError(t, err)
// Then: the resulting zip should contain a corresponding directory
@@ -133,7 +129,7 @@ func assertExtractedFiles(t *testing.T, dir string, checkModePerm bool) {
if checkModePerm {
assert.Equal(t, fs.ModePerm&0o755, stat.Mode().Perm(), "expected mode 0755 on directory")
}
assert.Equal(t, archiveRefTime(t).UTC(), stat.ModTime().UTC(), "unexpected modtime of %q", path)
assert.Equal(t, archivetest.ArchiveRefTime(t).UTC(), stat.ModTime().UTC(), "unexpected modtime of %q", path)
case "/test/hello.txt":
stat, err := os.Stat(path)
assert.NoError(t, err, "failed to stat path %q", path)
@@ -168,84 +164,3 @@ func assertExtractedFiles(t *testing.T, dir string, checkModePerm bool) {
return nil
})
}
func assertSampleTarFile(t *testing.T, tarBytes []byte) {
t.Helper()
tr := tar.NewReader(bytes.NewReader(tarBytes))
for {
hdr, err := tr.Next()
if err != nil {
if err == io.EOF {
return
}
require.NoError(t, err)
}
// Note: ignoring timezones here.
require.Equal(t, archiveRefTime(t).UTC(), hdr.ModTime.UTC())
switch hdr.Name {
case "test/":
require.Equal(t, hdr.Typeflag, byte(tar.TypeDir))
case "test/hello.txt":
require.Equal(t, hdr.Typeflag, byte(tar.TypeReg))
bs, err := io.ReadAll(tr)
if err != nil && !xerrors.Is(err, io.EOF) {
require.NoError(t, err)
}
require.Equal(t, "hello", string(bs))
case "test/dir/":
require.Equal(t, hdr.Typeflag, byte(tar.TypeDir))
case "test/dir/world.txt":
require.Equal(t, hdr.Typeflag, byte(tar.TypeReg))
bs, err := io.ReadAll(tr)
if err != nil && !xerrors.Is(err, io.EOF) {
require.NoError(t, err)
}
require.Equal(t, "world", string(bs))
default:
require.Failf(t, "unexpected file in tar", hdr.Name)
}
}
}
func assertSampleZipFile(t *testing.T, zipBytes []byte) {
t.Helper()
zr, err := zip.NewReader(bytes.NewReader(zipBytes), int64(len(zipBytes)))
require.NoError(t, err)
for _, f := range zr.File {
// Note: ignoring timezones here.
require.Equal(t, archiveRefTime(t).UTC(), f.Modified.UTC())
switch f.Name {
case "test/", "test/dir/":
// directory
case "test/hello.txt":
rc, err := f.Open()
require.NoError(t, err)
bs, err := io.ReadAll(rc)
_ = rc.Close()
require.NoError(t, err)
require.Equal(t, "hello", string(bs))
case "test/dir/world.txt":
rc, err := f.Open()
require.NoError(t, err)
bs, err := io.ReadAll(rc)
_ = rc.Close()
require.NoError(t, err)
require.Equal(t, "world", string(bs))
default:
require.Failf(t, "unexpected file in zip", f.Name)
}
}
}
// archiveRefTime is the Go reference time. The contents of the sample tar and zip files
// in testdata/ all have their modtimes set to the below in some timezone.
func archiveRefTime(t *testing.T) time.Time {
locMST, err := time.LoadLocation("MST")
require.NoError(t, err, "failed to load MST timezone")
return time.Date(2006, 1, 2, 3, 4, 5, 0, locMST)
}
+113
View File
@@ -0,0 +1,113 @@
package archivetest
import (
"archive/tar"
"archive/zip"
"bytes"
_ "embed"
"io"
"testing"
"time"
"github.com/stretchr/testify/require"
"golang.org/x/xerrors"
)
//go:embed testdata/test.tar
var testTarFileBytes []byte
//go:embed testdata/test.zip
var testZipFileBytes []byte
// TestTarFileBytes returns the content of testdata/test.tar
func TestTarFileBytes() []byte {
return append([]byte{}, testTarFileBytes...)
}
// TestZipFileBytes returns the content of testdata/test.zip
func TestZipFileBytes() []byte {
return append([]byte{}, testZipFileBytes...)
}
// AssertSampleTarfile compares the content of tarBytes against testdata/test.tar.
func AssertSampleTarFile(t *testing.T, tarBytes []byte) {
t.Helper()
tr := tar.NewReader(bytes.NewReader(tarBytes))
for {
hdr, err := tr.Next()
if err != nil {
if err == io.EOF {
return
}
require.NoError(t, err)
}
// Note: ignoring timezones here.
require.Equal(t, ArchiveRefTime(t).UTC(), hdr.ModTime.UTC())
switch hdr.Name {
case "test/":
require.Equal(t, hdr.Typeflag, byte(tar.TypeDir))
case "test/hello.txt":
require.Equal(t, hdr.Typeflag, byte(tar.TypeReg))
bs, err := io.ReadAll(tr)
if err != nil && !xerrors.Is(err, io.EOF) {
require.NoError(t, err)
}
require.Equal(t, "hello", string(bs))
case "test/dir/":
require.Equal(t, hdr.Typeflag, byte(tar.TypeDir))
case "test/dir/world.txt":
require.Equal(t, hdr.Typeflag, byte(tar.TypeReg))
bs, err := io.ReadAll(tr)
if err != nil && !xerrors.Is(err, io.EOF) {
require.NoError(t, err)
}
require.Equal(t, "world", string(bs))
default:
require.Failf(t, "unexpected file in tar", hdr.Name)
}
}
}
// AssertSampleZipFile compares the content of zipBytes against testdata/test.zip.
func AssertSampleZipFile(t *testing.T, zipBytes []byte) {
t.Helper()
zr, err := zip.NewReader(bytes.NewReader(zipBytes), int64(len(zipBytes)))
require.NoError(t, err)
for _, f := range zr.File {
// Note: ignoring timezones here.
require.Equal(t, ArchiveRefTime(t).UTC(), f.Modified.UTC())
switch f.Name {
case "test/", "test/dir/":
// directory
case "test/hello.txt":
rc, err := f.Open()
require.NoError(t, err)
bs, err := io.ReadAll(rc)
_ = rc.Close()
require.NoError(t, err)
require.Equal(t, "hello", string(bs))
case "test/dir/world.txt":
rc, err := f.Open()
require.NoError(t, err)
bs, err := io.ReadAll(rc)
_ = rc.Close()
require.NoError(t, err)
require.Equal(t, "world", string(bs))
default:
require.Failf(t, "unexpected file in zip", f.Name)
}
}
}
// archiveRefTime is the Go reference time. The contents of the sample tar and zip files
// in testdata/ all have their modtimes set to the below in some timezone.
func ArchiveRefTime(t *testing.T) time.Time {
locMST, err := time.LoadLocation("MST")
require.NoError(t, err, "failed to load MST timezone")
return time.Date(2006, 1, 2, 3, 4, 5, 0, locMST)
}
+8
View File
@@ -24,6 +24,9 @@ var (
// Updated by buildinfo_slim.go on start.
slim bool
// Updated by buildinfo_site.go on start.
site bool
// Injected with ldflags at build, see scripts/build_go.sh
tag string
agpl string // either "true" or "false", ldflags does not support bools
@@ -95,6 +98,11 @@ func IsSlim() bool {
return slim
}
// HasSite returns true if the frontend is embedded in the build.
func HasSite() bool {
return site
}
// IsAGPL returns true if this is an AGPL build.
func IsAGPL() bool {
return strings.Contains(agpl, "t")
+7
View File
@@ -0,0 +1,7 @@
//go:build embed
package buildinfo
func init() {
site = true
}
+25 -41
View File
@@ -12,7 +12,6 @@ import (
"runtime"
"strconv"
"strings"
"sync"
"time"
"cloud.google.com/go/compute/metadata"
@@ -26,10 +25,11 @@ import (
"cdr.dev/slog/sloggers/slogjson"
"cdr.dev/slog/sloggers/slogstackdriver"
"github.com/coder/coder/v2/agent"
"github.com/coder/coder/v2/agent/agentproc"
"github.com/coder/coder/v2/agent/agentexec"
"github.com/coder/coder/v2/agent/agentssh"
"github.com/coder/coder/v2/agent/reaper"
"github.com/coder/coder/v2/buildinfo"
"github.com/coder/coder/v2/cli/clilog"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/codersdk/agentsdk"
"github.com/coder/serpent"
@@ -110,7 +110,7 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
// Spawn a reaper so that we don't accumulate a ton
// of zombie processes.
if reaper.IsInitProcess() && !noReap && isLinux {
logWriter := &lumberjackWriteCloseFixer{w: &lumberjack.Logger{
logWriter := &clilog.LumberjackWriteCloseFixer{Writer: &lumberjack.Logger{
Filename: filepath.Join(logDir, "coder-agent-init.log"),
MaxSize: 5, // MB
// Without this, rotated logs will never be deleted.
@@ -153,7 +153,7 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
// reaper.
go DumpHandler(ctx, "agent")
logWriter := &lumberjackWriteCloseFixer{w: &lumberjack.Logger{
logWriter := &clilog.LumberjackWriteCloseFixer{Writer: &lumberjack.Logger{
Filename: filepath.Join(logDir, "coder-agent.log"),
MaxSize: 5, // MB
// Per customer incident on November 17th, 2023, its helpful
@@ -171,6 +171,7 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
slog.F("auth", auth),
slog.F("version", version),
)
client := agentsdk.New(r.agentURL)
client.SDK.SetLogger(logger)
// Set a reasonable timeout so requests can't hang forever!
@@ -292,11 +293,25 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
environmentVariables := map[string]string{
"GIT_ASKPASS": executablePath,
}
if v, ok := os.LookupEnv(agent.EnvProcPrioMgmt); ok {
environmentVariables[agent.EnvProcPrioMgmt] = v
enabled := os.Getenv(agentexec.EnvProcPrioMgmt)
if enabled != "" && runtime.GOOS == "linux" {
logger.Info(ctx, "process priority management enabled",
slog.F("env_var", agentexec.EnvProcPrioMgmt),
slog.F("enabled", enabled),
slog.F("os", runtime.GOOS),
)
} else {
logger.Info(ctx, "process priority management not enabled (linux-only) ",
slog.F("env_var", agentexec.EnvProcPrioMgmt),
slog.F("enabled", enabled),
slog.F("os", runtime.GOOS),
)
}
if v, ok := os.LookupEnv(agent.EnvProcOOMScore); ok {
environmentVariables[agent.EnvProcOOMScore] = v
execer, err := agentexec.NewExecer()
if err != nil {
return xerrors.Errorf("create agent execer: %w", err)
}
agnt := agent.New(agent.Options{
@@ -322,12 +337,8 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
Subsystems: subsystems,
PrometheusRegistry: prometheusRegistry,
Syscaller: agentproc.NewSyscaller(),
// Intentionally set this to nil. It's mainly used
// for testing.
ModifiedProcesses: nil,
BlockFileTransfer: blockFileTransfer,
BlockFileTransfer: blockFileTransfer,
Execer: execer,
})
promHandler := agent.PrometheusMetricsHandler(prometheusRegistry, logger)
@@ -478,33 +489,6 @@ func ServeHandler(ctx context.Context, logger slog.Logger, handler http.Handler,
}
}
// lumberjackWriteCloseFixer is a wrapper around an io.WriteCloser that
// prevents writes after Close. This is necessary because lumberjack
// re-opens the file on Write.
type lumberjackWriteCloseFixer struct {
w io.WriteCloser
mu sync.Mutex // Protects following.
closed bool
}
func (c *lumberjackWriteCloseFixer) Close() error {
c.mu.Lock()
defer c.mu.Unlock()
c.closed = true
return c.w.Close()
}
func (c *lumberjackWriteCloseFixer) Write(p []byte) (int, error) {
c.mu.Lock()
defer c.mu.Unlock()
if c.closed {
return 0, io.ErrClosedPipe
}
return c.w.Write(p)
}
// extractPort handles different url strings.
// - localhost:6060
// - http://localhost:6060
+76 -26
View File
@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"runtime"
@@ -18,6 +17,7 @@ import (
"github.com/coder/coder/v2/agent"
"github.com/coder/coder/v2/cli/clitest"
"github.com/coder/coder/v2/coderd"
"github.com/coder/coder/v2/coderd/coderdtest"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/dbfake"
@@ -35,7 +35,7 @@ func TestWorkspaceAgent(t *testing.T) {
client, db := coderdtest.NewWithDatabase(t, nil)
user := coderdtest.CreateFirstUser(t, client)
r := dbfake.WorkspaceBuild(t, db, database.Workspace{
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
OrganizationID: user.OrganizationID,
OwnerID: user.UserID,
}).
@@ -71,7 +71,7 @@ func TestWorkspaceAgent(t *testing.T) {
AzureCertificates: certificates,
})
user := coderdtest.CreateFirstUser(t, client)
r := dbfake.WorkspaceBuild(t, db, database.Workspace{
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
OrganizationID: user.OrganizationID,
OwnerID: user.UserID,
}).WithAgent(func(agents []*proto.Agent) []*proto.Agent {
@@ -110,7 +110,7 @@ func TestWorkspaceAgent(t *testing.T) {
AWSCertificates: certificates,
})
user := coderdtest.CreateFirstUser(t, client)
r := dbfake.WorkspaceBuild(t, db, database.Workspace{
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
OrganizationID: user.OrganizationID,
OwnerID: user.UserID,
}).WithAgent(func(agents []*proto.Agent) []*proto.Agent {
@@ -151,7 +151,7 @@ func TestWorkspaceAgent(t *testing.T) {
})
owner := coderdtest.CreateFirstUser(t, client)
member, memberUser := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
r := dbfake.WorkspaceBuild(t, db, database.Workspace{
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
OrganizationID: owner.OrganizationID,
OwnerID: memberUser.ID,
}).WithAgent(func(agents []*proto.Agent) []*proto.Agent {
@@ -205,7 +205,7 @@ func TestWorkspaceAgent(t *testing.T) {
client, db := coderdtest.NewWithDatabase(t, nil)
user := coderdtest.CreateFirstUser(t, client)
r := dbfake.WorkspaceBuild(t, db, database.Workspace{
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
OrganizationID: user.OrganizationID,
OwnerID: user.UserID,
}).WithAgent().Do()
@@ -232,42 +232,92 @@ func TestWorkspaceAgent(t *testing.T) {
require.Equal(t, codersdk.AgentSubsystemEnvbox, resources[0].Agents[0].Subsystems[0])
require.Equal(t, codersdk.AgentSubsystemExectrace, resources[0].Agents[0].Subsystems[1])
})
t.Run("Header", func(t *testing.T) {
t.Run("Headers&DERPHeaders", func(t *testing.T) {
t.Parallel()
var url string
var called int64
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, "wow", r.Header.Get("X-Testing"))
assert.Equal(t, "Ethan was Here!", r.Header.Get("Cool-Header"))
assert.Equal(t, "very-wow-"+url, r.Header.Get("X-Process-Testing"))
assert.Equal(t, "more-wow", r.Header.Get("X-Process-Testing2"))
atomic.AddInt64(&called, 1)
w.WriteHeader(http.StatusGone)
// Create a coderd API instance the hard way since we need to change the
// handler to inject our custom /derp handler.
dv := coderdtest.DeploymentValues(t)
dv.DERP.Config.BlockDirect = true
setHandler, cancelFunc, serverURL, newOptions := coderdtest.NewOptions(t, &coderdtest.Options{
DeploymentValues: dv,
})
// We set the handler after server creation for the access URL.
coderAPI := coderd.New(newOptions)
setHandler(coderAPI.RootHandler)
provisionerCloser := coderdtest.NewProvisionerDaemon(t, coderAPI)
t.Cleanup(func() {
_ = provisionerCloser.Close()
})
client := codersdk.New(serverURL)
t.Cleanup(func() {
cancelFunc()
_ = provisionerCloser.Close()
_ = coderAPI.Close()
client.HTTPClient.CloseIdleConnections()
})
var (
admin = coderdtest.CreateFirstUser(t, client)
member, memberUser = coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
called int64
derpCalled int64
)
setHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// Ignore client requests
if r.Header.Get("X-Testing") == "agent" {
assert.Equal(t, "Ethan was Here!", r.Header.Get("Cool-Header"))
assert.Equal(t, "very-wow-"+client.URL.String(), r.Header.Get("X-Process-Testing"))
assert.Equal(t, "more-wow", r.Header.Get("X-Process-Testing2"))
if strings.HasPrefix(r.URL.Path, "/derp") {
atomic.AddInt64(&derpCalled, 1)
} else {
atomic.AddInt64(&called, 1)
}
}
coderAPI.RootHandler.ServeHTTP(w, r)
}))
defer srv.Close()
url = srv.URL
r := dbfake.WorkspaceBuild(t, coderAPI.Database, database.WorkspaceTable{
OrganizationID: memberUser.OrganizationIDs[0],
OwnerID: memberUser.ID,
}).WithAgent().Do()
coderURLEnv := "$CODER_URL"
if runtime.GOOS == "windows" {
coderURLEnv = "%CODER_URL%"
}
logDir := t.TempDir()
inv, _ := clitest.New(t,
agentInv, _ := clitest.New(t,
"agent",
"--auth", "token",
"--agent-token", "fake-token",
"--agent-url", srv.URL,
"--agent-token", r.AgentToken,
"--agent-url", client.URL.String(),
"--log-dir", logDir,
"--agent-header", "X-Testing=wow",
"--agent-header", "X-Testing=agent",
"--agent-header", "Cool-Header=Ethan was Here!",
"--agent-header-command", "printf X-Process-Testing=very-wow-"+coderURLEnv+"'\\r\\n'X-Process-Testing2=more-wow",
)
clitest.Start(t, agentInv)
coderdtest.NewWorkspaceAgentWaiter(t, client, r.Workspace.ID).
MatchResources(matchAgentWithVersion).Wait()
clitest.Start(t, inv)
require.Eventually(t, func() bool {
return atomic.LoadInt64(&called) > 0
}, testutil.WaitShort, testutil.IntervalFast)
ctx := testutil.Context(t, testutil.WaitLong)
clientInv, root := clitest.New(t,
"-v",
"--no-feature-warning",
"--no-version-warning",
"ping", r.Workspace.Name,
"-n", "1",
)
clitest.SetupConfig(t, member, root)
err := clientInv.WithContext(ctx).Run()
require.NoError(t, err)
require.Greater(t, atomic.LoadInt64(&called), int64(0), "expected coderd to be reached with custom headers")
require.Greater(t, atomic.LoadInt64(&derpCalled), int64(0), "expected /derp to be called with custom headers")
})
}
+37 -8
View File
@@ -4,11 +4,12 @@ import (
"context"
"fmt"
"io"
"os"
"regexp"
"strings"
"sync"
"golang.org/x/xerrors"
"gopkg.in/natefinch/lumberjack.v2"
"cdr.dev/slog"
"cdr.dev/slog/sloggers/sloghuman"
@@ -104,7 +105,6 @@ func (b *Builder) Build(inv *serpent.Invocation) (log slog.Logger, closeLog func
addSinkIfProvided := func(sinkFn func(io.Writer) slog.Sink, loc string) error {
switch loc {
case "":
case "/dev/stdout":
sinks = append(sinks, sinkFn(inv.Stdout))
@@ -112,12 +112,14 @@ func (b *Builder) Build(inv *serpent.Invocation) (log slog.Logger, closeLog func
sinks = append(sinks, sinkFn(inv.Stderr))
default:
fi, err := os.OpenFile(loc, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0o644)
if err != nil {
return xerrors.Errorf("open log file %q: %w", loc, err)
}
closers = append(closers, fi.Close)
sinks = append(sinks, sinkFn(fi))
logWriter := &LumberjackWriteCloseFixer{Writer: &lumberjack.Logger{
Filename: loc,
MaxSize: 5, // MB
// Without this, rotated logs will never be deleted.
MaxBackups: 1,
}}
closers = append(closers, logWriter.Close)
sinks = append(sinks, sinkFn(logWriter))
}
return nil
}
@@ -209,3 +211,30 @@ func (f *debugFilterSink) Sync() {
sink.Sync()
}
}
// LumberjackWriteCloseFixer is a wrapper around an io.WriteCloser that
// prevents writes after Close. This is necessary because lumberjack
// re-opens the file on Write.
type LumberjackWriteCloseFixer struct {
Writer io.WriteCloser
mu sync.Mutex // Protects following.
closed bool
}
func (c *LumberjackWriteCloseFixer) Close() error {
c.mu.Lock()
defer c.mu.Unlock()
c.closed = true
return c.Writer.Close()
}
func (c *LumberjackWriteCloseFixer) Write(p []byte) (int, error) {
c.mu.Lock()
defer c.mu.Unlock()
if c.closed {
return 0, io.ErrClosedPipe
}
return c.Writer.Write(p)
}
-25
View File
@@ -2,7 +2,6 @@ package clilog_test
import (
"encoding/json"
"io/fs"
"os"
"path/filepath"
"strings"
@@ -145,30 +144,6 @@ func TestBuilder(t *testing.T) {
assertLogsJSON(t, tempJSON, info, infoLog, warn, warnLog)
})
})
t.Run("NotFound", func(t *testing.T) {
t.Parallel()
tempFile := filepath.Join(t.TempDir(), "doesnotexist", "test.log")
cmd := &serpent.Command{
Use: "test",
Handler: func(inv *serpent.Invocation) error {
logger, closeLog, err := clilog.New(
clilog.WithFilter("foo", "baz"),
clilog.WithHuman(tempFile),
clilog.WithVerbose(),
).Build(inv)
if err != nil {
return err
}
defer closeLog()
logger.Error(inv.Context(), "you will never see this")
return nil
},
}
err := cmd.Invoke().Run()
require.ErrorIs(t, err, fs.ErrNotExist)
})
}
var (
+12
View File
@@ -12,6 +12,7 @@ import (
const (
procMounts = "/proc/mounts"
procOneCgroup = "/proc/1/cgroup"
sysCgroupType = "/sys/fs/cgroup/cgroup.type"
kubernetesDefaultServiceAccountToken = "/var/run/secrets/kubernetes.io/serviceaccount/token" //nolint:gosec
)
@@ -65,6 +66,17 @@ func IsContainerized(fs afero.Fs) (ok bool, err error) {
}
}
// Adapted from https://github.com/systemd/systemd/blob/88bbf187a9b2ebe0732caa1e886616ae5f8186da/src/basic/virt.c#L603-L605
// The file `/sys/fs/cgroup/cgroup.type` does not exist on the root cgroup.
// If this file exists we can be sure we're in a container.
cgTypeExists, err := afero.Exists(fs, sysCgroupType)
if err != nil {
return false, xerrors.Errorf("check file exists %s: %w", sysCgroupType, err)
}
if cgTypeExists {
return true, nil
}
// If we get here, we are _probably_ not running in a container.
return false, nil
}
+12
View File
@@ -309,6 +309,12 @@ func TestIsContainerized(t *testing.T) {
Expected: true,
Error: "",
},
{
Name: "Docker (Cgroupns=private)",
FS: fsContainerCgroupV2PrivateCgroupns,
Expected: true,
Error: "",
},
} {
tt := tt
t.Run(tt.Name, func(t *testing.T) {
@@ -374,6 +380,12 @@ proc /proc/sys proc ro,nosuid,nodev,noexec,relatime 0 0`,
cgroupV2MemoryUsageBytes: "536870912",
cgroupV2MemoryStat: "inactive_file 268435456",
}
fsContainerCgroupV2PrivateCgroupns = map[string]string{
procOneCgroup: "0::/",
procMounts: `overlay / overlay rw,relatime,lowerdir=/some/path:/some/path,upperdir=/some/path:/some/path,workdir=/some/path:/some/path 0 0
proc /proc/sys proc ro,nosuid,nodev,noexec,relatime 0 0`,
sysCgroupType: "domain",
}
fsContainerCgroupV1 = map[string]string{
procOneCgroup: "0::/docker/aa86ac98959eeedeae0ecb6e0c9ddd8ae8b97a9d0fdccccf7ea7a474f4e0bb1f",
procMounts: `overlay / overlay rw,relatime,lowerdir=/some/path:/some/path,upperdir=/some/path:/some/path,workdir=/some/path:/some/path 0 0
+2 -1
View File
@@ -8,10 +8,11 @@ import (
"github.com/coder/coder/v2/cli/clitest"
"github.com/coder/coder/v2/coderd/coderdtest"
"github.com/coder/coder/v2/pty/ptytest"
"github.com/coder/coder/v2/testutil"
)
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
goleak.VerifyTestMain(m, testutil.GoleakOptions...)
}
func TestCli(t *testing.T) {
+25 -15
View File
@@ -128,7 +128,7 @@ func TestGoldenFile(t *testing.T, fileName string, actual []byte, replacements m
// equality check.
func normalizeGoldenFile(t *testing.T, byt []byte) []byte {
// Replace any timestamps with a placeholder.
byt = timestampRegex.ReplaceAll(byt, []byte("[timestamp]"))
byt = timestampRegex.ReplaceAll(byt, []byte(pad("[timestamp]", 20)))
homeDir, err := os.UserHomeDir()
require.NoError(t, err)
@@ -202,21 +202,31 @@ func prepareTestData(t *testing.T) (*codersdk.Client, map[string]string) {
workspaceBuild := coderdtest.AwaitWorkspaceBuildJobCompleted(t, rootClient, workspace.LatestBuild.ID)
replacements := map[string]string{
firstUser.UserID.String(): "[first user ID]",
secondUser.ID.String(): "[second user ID]",
firstUser.OrganizationID.String(): "[first org ID]",
version.ID.String(): "[version ID]",
version.Name: "[version name]",
version.Job.ID.String(): "[version job ID]",
version.Job.FileID.String(): "[version file ID]",
version.Job.WorkerID.String(): "[version worker ID]",
template.ID.String(): "[template ID]",
workspace.ID.String(): "[workspace ID]",
workspaceBuild.ID.String(): "[workspace build ID]",
workspaceBuild.Job.ID.String(): "[workspace build job ID]",
workspaceBuild.Job.FileID.String(): "[workspace build file ID]",
workspaceBuild.Job.WorkerID.String(): "[workspace build worker ID]",
firstUser.UserID.String(): pad("[first user ID]", 36),
secondUser.ID.String(): pad("[second user ID]", 36),
firstUser.OrganizationID.String(): pad("[first org ID]", 36),
version.ID.String(): pad("[version ID]", 36),
version.Name: pad("[version name]", 36),
version.Job.ID.String(): pad("[version job ID]", 36),
version.Job.FileID.String(): pad("[version file ID]", 36),
version.Job.WorkerID.String(): pad("[version worker ID]", 36),
template.ID.String(): pad("[template ID]", 36),
workspace.ID.String(): pad("[workspace ID]", 36),
workspaceBuild.ID.String(): pad("[workspace build ID]", 36),
workspaceBuild.Job.ID.String(): pad("[workspace build job ID]", 36),
workspaceBuild.Job.FileID.String(): pad("[workspace build file ID]", 36),
workspaceBuild.Job.WorkerID.String(): pad("[workspace build worker ID]", 36),
}
return rootClient, replacements
}
func pad(s string, n int) string {
if len(s) >= n {
return s
}
n -= len(s)
pre := n / 2
post := n - pre
return strings.Repeat("=", pre) + s + strings.Repeat("=", post)
}
+6 -5
View File
@@ -120,7 +120,7 @@ func Agent(ctx context.Context, writer io.Writer, agentID uuid.UUID, opts AgentO
if agent.Status == codersdk.WorkspaceAgentTimeout {
now := time.Now()
sw.Log(now, codersdk.LogLevelInfo, "The workspace agent is having trouble connecting, wait for it to connect or restart your workspace.")
sw.Log(now, codersdk.LogLevelInfo, troubleshootingMessage(agent, fmt.Sprintf("%s/templates#agent-connection-issues", opts.DocsURL)))
sw.Log(now, codersdk.LogLevelInfo, troubleshootingMessage(agent, fmt.Sprintf("%s/admin/templates/troubleshooting#agent-connection-issues", opts.DocsURL)))
for agent.Status == codersdk.WorkspaceAgentTimeout {
if agent, err = fetch(); err != nil {
return xerrors.Errorf("fetch: %w", err)
@@ -225,13 +225,13 @@ func Agent(ctx context.Context, writer io.Writer, agentID uuid.UUID, opts AgentO
sw.Fail(stage, safeDuration(sw, agent.ReadyAt, agent.StartedAt))
// Use zero time (omitted) to separate these from the startup logs.
sw.Log(time.Time{}, codersdk.LogLevelWarn, "Warning: A startup script exited with an error and your workspace may be incomplete.")
sw.Log(time.Time{}, codersdk.LogLevelWarn, troubleshootingMessage(agent, fmt.Sprintf("%s/templates#startup-script-exited-with-an-error", opts.DocsURL)))
sw.Log(time.Time{}, codersdk.LogLevelWarn, troubleshootingMessage(agent, fmt.Sprintf("%s/admin/templates/troubleshooting#startup-script-exited-with-an-error", opts.DocsURL)))
default:
switch {
case agent.LifecycleState.Starting():
// Use zero time (omitted) to separate these from the startup logs.
sw.Log(time.Time{}, codersdk.LogLevelWarn, "Notice: The startup scripts are still running and your workspace may be incomplete.")
sw.Log(time.Time{}, codersdk.LogLevelWarn, troubleshootingMessage(agent, fmt.Sprintf("%s/templates#your-workspace-may-be-incomplete", opts.DocsURL)))
sw.Log(time.Time{}, codersdk.LogLevelWarn, troubleshootingMessage(agent, fmt.Sprintf("%s/admin/templates/troubleshooting#your-workspace-may-be-incomplete", opts.DocsURL)))
// Note: We don't complete or fail the stage here, it's
// intentionally left open to indicate this stage didn't
// complete.
@@ -253,7 +253,7 @@ func Agent(ctx context.Context, writer io.Writer, agentID uuid.UUID, opts AgentO
stage := "The workspace agent lost connection"
sw.Start(stage)
sw.Log(time.Now(), codersdk.LogLevelWarn, "Wait for it to reconnect or restart your workspace.")
sw.Log(time.Now(), codersdk.LogLevelWarn, troubleshootingMessage(agent, fmt.Sprintf("%s/templates#agent-connection-issues", opts.DocsURL)))
sw.Log(time.Now(), codersdk.LogLevelWarn, troubleshootingMessage(agent, fmt.Sprintf("%s/admin/templates/troubleshooting#agent-connection-issues", opts.DocsURL)))
disconnectedAt := agent.DisconnectedAt
for agent.Status == codersdk.WorkspaceAgentDisconnected {
@@ -411,7 +411,8 @@ func (d ConnDiags) splitDiagnostics() (general, client, agent []string) {
}
if d.DisableDirect {
general = append(general, "❗ Direct connections are disabled locally, by `--disable-direct` or `CODER_DISABLE_DIRECT`")
general = append(general, "❗ Direct connections are disabled locally, by `--disable-direct-connections` or `CODER_DISABLE_DIRECT_CONNECTIONS`.\n"+
" They may still be established over a private network.")
if !d.Verbose {
return general, client, agent
}
+31 -6
View File
@@ -1,10 +1,10 @@
package cliui
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io"
"os"
"os/signal"
"strings"
@@ -96,14 +96,13 @@ func Prompt(inv *serpent.Invocation, opts PromptOptions) (string, error) {
signal.Notify(interrupt, os.Interrupt)
defer signal.Stop(interrupt)
reader := bufio.NewReader(inv.Stdin)
line, err = reader.ReadString('\n')
line, err = readUntil(inv.Stdin, '\n')
// Check if the first line beings with JSON object or array chars.
// This enables multiline JSON to be pasted into an input, and have
// it parse properly.
if err == nil && (strings.HasPrefix(line, "{") || strings.HasPrefix(line, "[")) {
line, err = promptJSON(reader, line)
line, err = promptJSON(inv.Stdin, line)
}
}
if err != nil {
@@ -144,7 +143,7 @@ func Prompt(inv *serpent.Invocation, opts PromptOptions) (string, error) {
}
}
func promptJSON(reader *bufio.Reader, line string) (string, error) {
func promptJSON(reader io.Reader, line string) (string, error) {
var data bytes.Buffer
for {
_, _ = data.WriteString(line)
@@ -162,7 +161,7 @@ func promptJSON(reader *bufio.Reader, line string) (string, error) {
// Read line-by-line. We can't use a JSON decoder
// here because it doesn't work by newline, so
// reads will block.
line, err = reader.ReadString('\n')
line, err = readUntil(reader, '\n')
if err != nil {
break
}
@@ -179,3 +178,29 @@ func promptJSON(reader *bufio.Reader, line string) (string, error) {
}
return line, nil
}
// readUntil the first occurrence of delim in the input, returning a string containing the data up
// to and including the delimiter. Unlike `bufio`, it only reads until the delimiter and no further
// bytes. If readUntil encounters an error before finding a delimiter, it returns the data read
// before the error and the error itself (often io.EOF). readUntil returns err != nil if and only if
// the returned data does not end in delim.
func readUntil(r io.Reader, delim byte) (string, error) {
var (
have []byte
b = make([]byte, 1)
)
for {
n, err := r.Read(b)
if n > 0 {
have = append(have, b[0])
if b[0] == delim {
// match `bufio` in that we only return non-nil if we didn't find the delimiter,
// regardless of whether we also erred.
return string(have), nil
}
}
if err != nil {
return string(have), err
}
}
}
+53 -15
View File
@@ -10,6 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/cli/cliui"
"github.com/coder/coder/v2/pty"
@@ -22,10 +23,11 @@ func TestPrompt(t *testing.T) {
t.Parallel()
t.Run("Success", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ptty := ptytest.New(t)
msgChan := make(chan string)
go func() {
resp, err := newPrompt(ptty, cliui.PromptOptions{
resp, err := newPrompt(ctx, ptty, cliui.PromptOptions{
Text: "Example",
}, nil)
assert.NoError(t, err)
@@ -33,15 +35,17 @@ func TestPrompt(t *testing.T) {
}()
ptty.ExpectMatch("Example")
ptty.WriteLine("hello")
require.Equal(t, "hello", <-msgChan)
resp := testutil.RequireRecvCtx(ctx, t, msgChan)
require.Equal(t, "hello", resp)
})
t.Run("Confirm", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ptty := ptytest.New(t)
doneChan := make(chan string)
go func() {
resp, err := newPrompt(ptty, cliui.PromptOptions{
resp, err := newPrompt(ctx, ptty, cliui.PromptOptions{
Text: "Example",
IsConfirm: true,
}, nil)
@@ -50,18 +54,20 @@ func TestPrompt(t *testing.T) {
}()
ptty.ExpectMatch("Example")
ptty.WriteLine("yes")
require.Equal(t, "yes", <-doneChan)
resp := testutil.RequireRecvCtx(ctx, t, doneChan)
require.Equal(t, "yes", resp)
})
t.Run("Skip", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ptty := ptytest.New(t)
var buf bytes.Buffer
// Copy all data written out to a buffer. When we close the ptty, we can
// no longer read from the ptty.Output(), but we can read what was
// written to the buffer.
dataRead, doneReading := context.WithTimeout(context.Background(), testutil.WaitShort)
dataRead, doneReading := context.WithCancel(ctx)
go func() {
// This will throw an error sometimes. The underlying ptty
// has its own cleanup routines in t.Cleanup. Instead of
@@ -74,7 +80,7 @@ func TestPrompt(t *testing.T) {
doneChan := make(chan string)
go func() {
resp, err := newPrompt(ptty, cliui.PromptOptions{
resp, err := newPrompt(ctx, ptty, cliui.PromptOptions{
Text: "ShouldNotSeeThis",
IsConfirm: true,
}, func(inv *serpent.Invocation) {
@@ -85,7 +91,8 @@ func TestPrompt(t *testing.T) {
doneChan <- resp
}()
require.Equal(t, "yes", <-doneChan)
resp := testutil.RequireRecvCtx(ctx, t, doneChan)
require.Equal(t, "yes", resp)
// Close the reader to end the io.Copy
require.NoError(t, ptty.Close(), "close eof reader")
// Wait for the IO copy to finish
@@ -96,10 +103,11 @@ func TestPrompt(t *testing.T) {
})
t.Run("JSON", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ptty := ptytest.New(t)
doneChan := make(chan string)
go func() {
resp, err := newPrompt(ptty, cliui.PromptOptions{
resp, err := newPrompt(ctx, ptty, cliui.PromptOptions{
Text: "Example",
}, nil)
assert.NoError(t, err)
@@ -107,15 +115,17 @@ func TestPrompt(t *testing.T) {
}()
ptty.ExpectMatch("Example")
ptty.WriteLine("{}")
require.Equal(t, "{}", <-doneChan)
resp := testutil.RequireRecvCtx(ctx, t, doneChan)
require.Equal(t, "{}", resp)
})
t.Run("BadJSON", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ptty := ptytest.New(t)
doneChan := make(chan string)
go func() {
resp, err := newPrompt(ptty, cliui.PromptOptions{
resp, err := newPrompt(ctx, ptty, cliui.PromptOptions{
Text: "Example",
}, nil)
assert.NoError(t, err)
@@ -123,15 +133,17 @@ func TestPrompt(t *testing.T) {
}()
ptty.ExpectMatch("Example")
ptty.WriteLine("{a")
require.Equal(t, "{a", <-doneChan)
resp := testutil.RequireRecvCtx(ctx, t, doneChan)
require.Equal(t, "{a", resp)
})
t.Run("MultilineJSON", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ptty := ptytest.New(t)
doneChan := make(chan string)
go func() {
resp, err := newPrompt(ptty, cliui.PromptOptions{
resp, err := newPrompt(ctx, ptty, cliui.PromptOptions{
Text: "Example",
}, nil)
assert.NoError(t, err)
@@ -141,11 +153,37 @@ func TestPrompt(t *testing.T) {
ptty.WriteLine(`{
"test": "wow"
}`)
require.Equal(t, `{"test":"wow"}`, <-doneChan)
resp := testutil.RequireRecvCtx(ctx, t, doneChan)
require.Equal(t, `{"test":"wow"}`, resp)
})
t.Run("InvalidValid", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ptty := ptytest.New(t)
doneChan := make(chan string)
go func() {
resp, err := newPrompt(ctx, ptty, cliui.PromptOptions{
Text: "Example",
Validate: func(s string) error {
t.Logf("validate: %q", s)
if s != "valid" {
return xerrors.New("invalid")
}
return nil
},
}, nil)
assert.NoError(t, err)
doneChan <- resp
}()
ptty.ExpectMatch("Example")
ptty.WriteLine("foo\nbar\nbaz\n\n\nvalid\n")
resp := testutil.RequireRecvCtx(ctx, t, doneChan)
require.Equal(t, "valid", resp)
})
}
func newPrompt(ptty *ptytest.PTY, opts cliui.PromptOptions, invOpt func(inv *serpent.Invocation)) (string, error) {
func newPrompt(ctx context.Context, ptty *ptytest.PTY, opts cliui.PromptOptions, invOpt func(inv *serpent.Invocation)) (string, error) {
value := ""
cmd := &serpent.Command{
Handler: func(inv *serpent.Invocation) error {
@@ -163,7 +201,7 @@ func newPrompt(ptty *ptytest.PTY, opts cliui.PromptOptions, invOpt func(inv *ser
inv.Stdout = ptty.Output()
inv.Stderr = ptty.Output()
inv.Stdin = ptty.Input()
return value, inv.WithContext(context.Background()).Run()
return value, inv.WithContext(ctx).Run()
}
func TestPasswordTerminalState(t *testing.T) {
+132 -17
View File
@@ -300,9 +300,10 @@ func (m selectModel) filteredOptions() []string {
}
type MultiSelectOptions struct {
Message string
Options []string
Defaults []string
Message string
Options []string
Defaults []string
EnableCustomInput bool
}
func MultiSelect(inv *serpent.Invocation, opts MultiSelectOptions) ([]string, error) {
@@ -328,9 +329,10 @@ func MultiSelect(inv *serpent.Invocation, opts MultiSelectOptions) ([]string, er
}
initialModel := multiSelectModel{
search: textinput.New(),
options: options,
message: opts.Message,
search: textinput.New(),
options: options,
message: opts.Message,
enableCustomInput: opts.EnableCustomInput,
}
initialModel.search.Prompt = ""
@@ -370,12 +372,15 @@ type multiSelectOption struct {
}
type multiSelectModel struct {
search textinput.Model
options []*multiSelectOption
cursor int
message string
canceled bool
selected bool
search textinput.Model
options []*multiSelectOption
cursor int
message string
canceled bool
selected bool
isCustomInputMode bool // track if we're adding a custom option
customInput string // store custom input
enableCustomInput bool // control whether custom input is allowed
}
func (multiSelectModel) Init() tea.Cmd {
@@ -386,6 +391,10 @@ func (multiSelectModel) Init() tea.Cmd {
func (m multiSelectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd
if m.isCustomInputMode {
return m.handleCustomInputMode(msg)
}
switch msg := msg.(type) {
case terminateMsg:
m.canceled = true
@@ -398,6 +407,11 @@ func (m multiSelectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, tea.Quit
case tea.KeyEnter:
// Switch to custom input mode if we're on the "+ Add custom value:" option
if m.enableCustomInput && m.cursor == len(m.filteredOptions()) {
m.isCustomInputMode = true
return m, nil
}
if len(m.options) != 0 {
m.selected = true
return m, tea.Quit
@@ -413,16 +427,16 @@ func (m multiSelectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, nil
case tea.KeyUp:
options := m.filteredOptions()
maxIndex := m.getMaxIndex()
if m.cursor > 0 {
m.cursor--
} else {
m.cursor = len(options) - 1
m.cursor = maxIndex
}
case tea.KeyDown:
options := m.filteredOptions()
if m.cursor < len(options)-1 {
maxIndex := m.getMaxIndex()
if m.cursor < maxIndex {
m.cursor++
} else {
m.cursor = 0
@@ -457,6 +471,91 @@ func (m multiSelectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, cmd
}
func (m multiSelectModel) getMaxIndex() int {
options := m.filteredOptions()
if m.enableCustomInput {
// Include the "+ Add custom value" entry
return len(options)
}
// Includes only the actual options
return len(options) - 1
}
// handleCustomInputMode manages keyboard interactions when in custom input mode
func (m *multiSelectModel) handleCustomInputMode(msg tea.Msg) (tea.Model, tea.Cmd) {
keyMsg, ok := msg.(tea.KeyMsg)
if !ok {
return m, nil
}
switch keyMsg.Type {
case tea.KeyEnter:
return m.handleCustomInputSubmission()
case tea.KeyCtrlC:
m.canceled = true
return m, tea.Quit
case tea.KeyBackspace:
return m.handleCustomInputBackspace()
default:
m.customInput += keyMsg.String()
return m, nil
}
}
// handleCustomInputSubmission processes the submission of custom input
func (m *multiSelectModel) handleCustomInputSubmission() (tea.Model, tea.Cmd) {
if m.customInput == "" {
m.isCustomInputMode = false
return m, nil
}
// Clear search to ensure option is visible and cursor points to the new option
m.search.SetValue("")
// Check for duplicates
for i, opt := range m.options {
if opt.option == m.customInput {
// If the option exists but isn't chosen, select it
if !opt.chosen {
opt.chosen = true
}
// Point cursor to the new option
m.cursor = i
// Reset custom input mode to disabled
m.isCustomInputMode = false
m.customInput = ""
return m, nil
}
}
// Add new unique option
m.options = append(m.options, &multiSelectOption{
option: m.customInput,
chosen: true,
})
// Point cursor to the newly added option
m.cursor = len(m.options) - 1
// Reset custom input mode to disabled
m.customInput = ""
m.isCustomInputMode = false
return m, nil
}
// handleCustomInputBackspace handles backspace in custom input mode
func (m *multiSelectModel) handleCustomInputBackspace() (tea.Model, tea.Cmd) {
if len(m.customInput) > 0 {
m.customInput = m.customInput[:len(m.customInput)-1]
}
return m, nil
}
func (m multiSelectModel) View() string {
var s strings.Builder
@@ -469,13 +568,19 @@ func (m multiSelectModel) View() string {
return s.String()
}
if m.isCustomInputMode {
_, _ = s.WriteString(fmt.Sprintf("%s\nEnter custom value: %s\n", msg, m.customInput))
return s.String()
}
_, _ = s.WriteString(fmt.Sprintf(
"%s %s[Use arrows to move, space to select, <right> to all, <left> to none, type to filter]\n",
msg,
m.search.View(),
))
for i, option := range m.filteredOptions() {
options := m.filteredOptions()
for i, option := range options {
cursor := " "
chosen := "[ ]"
o := option.option
@@ -498,6 +603,16 @@ func (m multiSelectModel) View() string {
))
}
if m.enableCustomInput {
// Add the "+ Add custom value" option at the bottom
cursor := " "
text := " + Add custom value"
if m.cursor == len(options) {
cursor = pretty.Sprint(DefaultStyles.Keyword, "> ")
text = pretty.Sprint(DefaultStyles.Keyword, text)
}
_, _ = s.WriteString(fmt.Sprintf("%s%s\n", cursor, text))
}
return s.String()
}
+33
View File
@@ -101,6 +101,39 @@ func TestMultiSelect(t *testing.T) {
}()
require.Equal(t, items, <-msgChan)
})
t.Run("MultiSelectWithCustomInput", func(t *testing.T) {
t.Parallel()
items := []string{"Code", "Chairs", "Whale", "Diamond", "Carrot"}
ptty := ptytest.New(t)
msgChan := make(chan []string)
go func() {
resp, err := newMultiSelectWithCustomInput(ptty, items)
assert.NoError(t, err)
msgChan <- resp
}()
require.Equal(t, items, <-msgChan)
})
}
func newMultiSelectWithCustomInput(ptty *ptytest.PTY, items []string) ([]string, error) {
var values []string
cmd := &serpent.Command{
Handler: func(inv *serpent.Invocation) error {
selectedItems, err := cliui.MultiSelect(inv, cliui.MultiSelectOptions{
Options: items,
Defaults: items,
EnableCustomInput: true,
})
if err == nil {
values = selectedItems
}
return err
},
}
inv := cmd.Invoke()
ptty.Attach(inv)
return values, inv.Run()
}
func newMultiSelect(ptty *ptytest.PTY, items []string) ([]string, error) {
+30 -1
View File
@@ -9,6 +9,8 @@ import (
"github.com/fatih/structtag"
"github.com/jedib0t/go-pretty/v6/table"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/codersdk"
)
// Table creates a new table with standardized styles.
@@ -195,6 +197,16 @@ func renderTable(out any, sort string, headers table.Row, filterColumns []string
if val != nil {
v = val.Format(time.RFC3339)
}
case codersdk.NullTime:
if val.Valid {
v = val.Time.Format(time.RFC3339)
} else {
v = nil
}
case *string:
if val != nil {
v = *val
}
case *int64:
if val != nil {
v = *val
@@ -204,8 +216,13 @@ func renderTable(out any, sort string, headers table.Row, filterColumns []string
v = val.String()
}
case fmt.Stringer:
if val != nil {
// Protect against typed nils since fmt.Stringer is an interface.
vv := reflect.ValueOf(v)
nilPtr := vv.Kind() == reflect.Ptr && vv.IsNil()
if val != nil && !nilPtr {
v = val.String()
} else if nilPtr {
v = nil
}
}
@@ -227,6 +244,18 @@ func renderTable(out any, sort string, headers table.Row, filterColumns []string
}
}
// Last resort, just get the interface value to avoid printing
// pointer values. For example, if we have a `*MyType("value")`
// which is defined as `type MyType string`, we want to print
// the string value, not the pointer.
if v != nil {
vv := reflect.ValueOf(v)
for vv.Kind() == reflect.Ptr && !vv.IsNil() {
vv = vv.Elem()
}
v = vv.Interface()
}
rowSlice[i] = v
}

Some files were not shown because too many files have changed in this diff Show More