Commit Graph

9829 Commits

Author SHA1 Message Date
58adc629fa chore: add prebuild docs (#17580)
Partially addresses https://github.com/coder/internal/issues/593
2025-05-09 07:26:35 +00:00
a9f1a6b2a2 fix: revert fix: persist terraform modules during template import (#17665) (#17734)
This reverts commit ae3d90b057.
2025-05-08 22:03:08 -04:00
ae3d90b057 fix: persist terraform modules during template import (#17665) 2025-05-08 16:13:46 -06:00
9a052e2a4c fix: use file filter in weekly-docs github action (#17729)
otherwise it ignores the instruction to only check docs/ when a file
changes in that dir

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-05-08 16:30:43 -04:00
d5360a6da0 chore: fetch workspaces by username with organization permissions (#17707)
Closes https://github.com/coder/coder/issues/17691

`ExtractOrganizationMembersParam` will allow fetching a user with only
organization permissions. If the user belongs to 0 orgs, then the user "does not exist" 
from an org perspective. But if you are a site-wide admin, then the user does exist.
2025-05-08 14:41:17 -05:00
d93a9cfde2 feat: add TagInput component for dynamic parameters (#17719)
resolves coder/preview#50

This uses the existing MultiTextField component as the tag-select
component for Dynamic parameters.

The intention is not to completely re-write the MultiTextField but to
make some design improvements to match the updated design patterns. This
should still work with the existing non-experimental
CreateWorkspacePage.

Before
<img width="556" alt="Screenshot 2025-05-08 at 12 58 31"
src="https://github.com/user-attachments/assets/9bf5bbf8-e26d-4523-8b5f-e4234e83d192"
/>


After
<img width="548" alt="Screenshot 2025-05-08 at 12 43 28"
src="https://github.com/user-attachments/assets/9fa90795-b2a9-4c07-b90e-938219202799"
/>
2025-05-08 12:59:33 -04:00
0b141c47cb chore: add DynamicParameter stories (#17710)
resolves coder/preview#112

- Add stories for DynamicParameter component
- fix bug with displaying immutable badge and required asterisk
2025-05-08 10:12:05 -04:00
c5c3a54fca fix: create ssh directory if it doesn't already exist when running coder config-ssh (#17711)
Closes
[coder/internal#623](https://github.com/coder/internal/issues/623)

> [!WARNING]  
> PR co-authored by Claude Code
2025-05-08 10:10:52 -04:00
1bb96b8528 fix: resolve flake test on manager (#17702)
Fixes coder/internal#544

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2025-05-08 16:49:57 +03:00
857587b35d fix: do not share token with http app urls (#17720)
It's a security issue to share the API token, and the protocols that we
actually want to share it with are not HTTP and handled locally on the
same machine.
 
Security issue introduced by https://github.com/coder/coder/pull/17708
2025-05-08 09:51:10 -03:00
4341403346 chore: simplify workspaces data fetching (#17703)
We've been using an abstraction that was not necessary to fetch
workspaces data. I also took sometime to use the new useWorkspaceUpdate
hook in the update workspace tooltip that was missing some important
steps like confirmation.
2025-05-08 09:42:39 -03:00
2695f4e950 chore: improve variable names of mocked users (#17701)
Many times I got confused when using MockUser and MockUser2 so I just
decided to better naming them to MockUserOwner and MockUserMember.
2025-05-08 09:32:32 -03:00
c66e80e862 fix: extract checkbox label from dynamic parameter styling prop (#17651)
resolves #17474 

A label will only be shown next to the checkbox If there is a value for
`label` in the styling prop for the dynamic parameter



<img width="457" alt="Screenshot 2025-05-01 at 21 35 32"
src="https://github.com/user-attachments/assets/3b3a8160-65a2-4411-b763-0d07a4eeb699"
/>
2025-05-08 08:02:27 -04:00
b6182fe054 chore: add code-insiders.svg static icon (#17716)
We have `code.svg` but not `code-insiders.svg`
2025-05-08 05:09:16 +00:00
e4c6c10369 chore: fix comment regarding provisioner api version release (#17705)
See
bc609d0056
2025-05-07 15:05:00 -05:00
a02ba6616b fix: fill session token when app is external (#17708)
Fix https://github.com/coder/coder/issues/17704

During the [refactoring of WorkspaceApp response
type](https://github.com/coder/coder/pull/17700/files#diff-a7e67944708c3c914a24a02d515a89ecd414bfe61890468dac08abde55ba8e96R112),
I updated the logic to check if the session token should be injected
causing external apps to not load correctly.

To also avoid future confusions, we are only going to rely on the
`app.external` prop to open apps externally instead of verifying if the
URL does not use the HTTP protocol. I did some research and I didn't
find out a use case where it would be a problem.

I'm going to refactor this code very soon to allow opening apps from the
workspaces page, so I will write the tests to cover this use case there.

**Not included:**
During my next refactoring I'm also going to change the code to support
token injections directly in the HREF instead of making it happen during
the click event.
2025-05-07 19:59:52 +00:00
29bce8d9e6 feat(cli): make MCP server work without user authentication (#17688)
Part of #17649

---

# Allow MCP server to run without authentication

This PR enhances the MCP server to operate without requiring authentication, making it more flexible for environments where authentication isn't available or necessary. Key changes:

- Replaced `InitClient` with `TryInitClient` to allow the MCP server to start without credentials
- Added graceful handling when URL or authentication is missing
- Made authentication status visible in server logs
- Added logic to skip user-dependent tools when no authenticated user is present
- Made the `coder_report_task` tool available with just an agent token (no user token required)
- Added comprehensive tests to verify operation without authentication

These changes allow the MCP server to function in more environments while still using authentication when available, improving flexibility for CI/CD and other automated environments.
2025-05-07 21:53:06 +02:00
6ac1bd807c feat: display builtin apps on workspaces table (#17695)
Related to https://github.com/coder/coder/issues/17311

<img width="1624" alt="Screenshot 2025-05-06 at 16 20 40"
src="https://github.com/user-attachments/assets/932f6034-9f8a-45d7-bf8d-d330dcca683d"
/>
2025-05-07 14:26:21 -03:00
9fe5b71d31 chore!: fix workspace apps response (#17700)
Fix WorkspaceApp response type to better reflect the schema from
https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app.
2025-05-07 10:05:07 -03:00
d146115ca0 chore: update browser list db (#17699) 2025-05-07 09:01:47 -03:00
df0c6eda33 chore: add custom aider icon (#17682)
Created Custom SVG from Aider PNG and upload from module to static site
icons
2025-05-06 09:46:36 -07:00
4fa9d30bf4 refactor: update app buttons to use the new button component (#17684)
Related to https://github.com/coder/coder/issues/17311

- Replaces the MUI Buttons by the new shadcn/ui buttons. This change
allows the reuse of app links, and terminal buttons using the `asChild`
capability from the Radix components
- Uses the new [proposed
design](https://www.figma.com/design/OR75XeUI0Z3ksqt1mHsNQw/Workspace-views?node-id=1014-8242&t=wtUXJRN1SfyZiFKn-0)
- Updates the button styles to support image tags as icons
- Uses the new Tooltip component for the app buttons

**Before:**
<img width="1243" alt="Screenshot 2025-05-05 at 17 55 49"
src="https://github.com/user-attachments/assets/e689e9dc-d8e1-4c9d-ba09-ef1479a501f1"
/>

**After:**
<img width="1264" alt="Screenshot 2025-05-05 at 18 05 38"
src="https://github.com/user-attachments/assets/8fafbe20-f063-46ab-86cf-2e0381bba889"
/>
2025-05-06 13:26:37 -03:00
a7e828593f chore: retry failing tests in CI (#17681)
This PR introduces failing test retries in CI for e2e tests, Go tests
with the in-memory database, Go tests with Postgres, and the CLI tests.
Retries are not enabled for race tests.

The goal is to reduce how often flakes disrupt developers' workflows.
2025-05-06 16:53:26 +02:00
d9b00e4849 feat: add inline actions into workspaces table (#17636)
Related to https://github.com/coder/coder/issues/17311

This PR adds inline actions in the workspaces page. It is a bit
different of the [original
design](https://www.figma.com/design/OR75XeUI0Z3ksqt1mHsNQw/Workspace-views?node-id=656-3979&m=dev)
because I'm splitting the work into three phases that I will explain in
more details in the demo.



https://github.com/user-attachments/assets/6383375e-ed10-45d1-b5d5-b4421e86d158
2025-05-06 11:28:14 -03:00
5f516ed135 feat: improve coder connect tunnel handling on reconnect (#17598)
Closes https://github.com/coder/internal/issues/563

The [Coder Connect
tunnel](https://github.com/coder/coder/blob/main/vpn/tunnel.go) receives
workspace state from the Coder server over a [dRPC
stream.](114ba4593b/tailnet/controllers.go (L1029))
When first connecting to this stream, the current state of the user's
workspaces is received, with subsequent messages being diffs on top of
that state.

However, if the client disconnects from this stream, such as when the
user's device is suspended, and then reconnects later, no mechanism
exists for the tunnel to differentiate that message containing the
entire initial state from another diff, and so that state is incorrectly
applied as a diff.

In practice:
- Tunnel connects, receives a workspace update containing all the
existing workspaces & agents.
- Tunnel loses connection, but isn't completely stopped.
- All the user's workspaces are restarted, producing a new set of
agents.
- Tunnel regains connection, and receives a workspace update containing
all the existing workspaces & agents.
- This initial update is incorrectly applied as a diff, with the
Tunnel's state containing both the old & new agents.

This PR introduces a solution in which tunnelUpdater, when created,
sends a FreshState flag with the WorkspaceUpdate type. This flag is
handled in the vpn tunnel in the following fashion:
- Preserve existing Agents
- Remove current Agents in the tunnel that are not present in the
WorkspaceUpdate
- Remove unreferenced Workspaces
2025-05-06 16:00:16 +02:00
ebad5c3ed0 test(agent): fix channel timeout in TestNewServer_CloseActiveConnections (#17690)
This fixes a test issue where we were waiting on a channel indefinitely
and the test timed out instead of failing due to earlier error.

Updates coder/internal#558
2025-05-06 11:20:28 +00:00
ec003b7cf9 fix: update default value handling for dynamic defaults (#17609)
resolves coder/preview#102
2025-05-06 06:40:31 -04:00
4587082fcf chore: update design of External auth section of CreateWorkspacePage (#17683)
contributes to coder/preview#59

Figma:
https://www.figma.com/design/SMg6H8VKXnPSkE6h9KPoAD/UX-Presets?node-id=2180-2995&t=RL6ICIf6KUL5YUpB-1

This updates the design of the External authentication section of the
create workspace page form for both the existing and the new
experimental create workspace pages.

<img width="819" alt="Screenshot 2025-05-05 at 18 15 28"
src="https://github.com/user-attachments/assets/8bc419dc-e1db-4188-b920-73010bbe626d"
/>
2025-05-05 17:13:39 -04:00
6b4d3f83bc chore: reduce "Upload tests to datadog" times in CI (#17668)
This PR speeds up the "Upload tests to datadog" step by downloading the
`datadog-ci` binary directly from GitHub releases. Most of the time used
to be spent in `npm install`, which consistently timed out on Windows
after a minute. [Now it takes 3
seconds](https://github.com/coder/coder/actions/runs/14834976784/job/41644230049?pr=17668#step:10:1).

I updated it to version v2.48.0 because v2.21.0 didn't have the
artifacts for arm64 macOS.
2025-05-05 18:49:58 +02:00
4369765996 test: fix TestWorkspaceAgentReportStats flake (#17678)
Closes https://github.com/coder/internal/issues/609.

As seen in the below logs, the `last_used_at` time was updating, but just to the same value that it was on creation; `dbtime.Now` was called in quick succession. 

```
 t.go:106: 2025-05-05 12:11:54.166 [info]  coderd.workspace_usage_tracker: updated workspaces last_used_at  count=1  now="2025-05-05T12:11:54.161329Z"
    t.go:106: 2025-05-05 12:11:54.172 [debu]  coderd: GET  host=localhost:50422  path=/api/v2/workspaces/745b7ff3-47f2-4e1a-9452-85ea48ba5c46  proto=HTTP/1.1  remote_addr=127.0.0.1  start="2025-05-05T12:11:54.1669073Z"  workspace_name=peaceful_faraday34  requestor_id=b2cf02ae-2181-480b-bb1f-95dc6acb6497  requestor_name=testuser  requestor_email=""  took=5.2105ms  status_code=200  latency_ms=5  params_workspace=745b7ff3-47f2-4e1a-9452-85ea48ba5c46  request_id=7fd5ea90-af7b-4104-91c5-9ca64bc2d5e6
    workspaceagentsrpc_test.go:70: 
        	Error Trace:	C:/actions-runner/coder/coder/coderd/workspaceagentsrpc_test.go:70
        	Error:      	Should be true
        	Test:       	TestWorkspaceAgentReportStats
        	Messages:   	2025-05-05 12:11:54.161329 +0000 UTC is not after 2025-05-05 12:11:54.161329 +0000 UTC
```

If we change the initial `LastUsedAt` time to be a time in the past, ticking with a `dbtime.Now` will always update it to a later value. If it never updates, the condition will still fail.
2025-05-06 00:15:24 +10:00
93a584b7c2 fix: fix windsurf icon on light theme (#17679) 2025-05-05 11:10:50 -03:00
b8137e7ca4 chore: bump github.com/openai/openai-go from 0.1.0-beta.6 to 0.1.0-beta.10 (#17677)
Bumps [github.com/openai/openai-go](https://github.com/openai/openai-go)
from 0.1.0-beta.6 to 0.1.0-beta.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-go/releases">github.com/openai/openai-go's
releases</a>.</em></p>
<blockquote>
<h2>v0.1.0-beta.10</h2>
<h2>0.1.0-beta.10 (2025-04-14)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-go/compare/v0.1.0-beta.9...v0.1.0-beta.10">v0.1.0-beta.9...v0.1.0-beta.10</a></p>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> expand CI branch coverage (<a
href="https://redirect.github.com/openai/openai-go/issues/369">#369</a>)
(<a
href="258dda8007">258dda8</a>)</li>
<li><strong>internal:</strong> reduce CI branch coverage (<a
href="a2f7c03eb9">a2f7c03</a>)</li>
</ul>
<h2>v0.1.0-beta.9</h2>
<h2>0.1.0-beta.9 (2025-04-09)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-%5Bgo/compare/v0.1.0-beta.8...v0.1.0-beta.9%5D(https://www.golinks.io/compare/v0.1.0-beta.8...v0.1.0-beta.9?trackSource=github)">v0.1.0-beta.8...v0.1.0-beta.9</a></p>
<h3>Chores</h3>
<ul>
<li>workaround build errors (<a
href="https://redirect.github.com/openai/openai-%5Bgo/issues/366%5D(https://www.golinks.io/issues/366?trackSource=github)">#366</a>)
(<a
href="adeb003cab)">adeb003</a>)</li>
</ul>
<h2>v0.1.0-beta.8</h2>
<h2>0.1.0-beta.8 (2025-04-09)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-go/compare/v0.1.0-beta.7...v0.1.0-beta.8">v0.1.0-beta.7...v0.1.0-beta.8</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> Add evalapi to sdk (<a
href="https://redirect.github.com/openai/openai-go/issues/360">#360</a>)
(<a
href="88977d1868">88977d1</a>)</li>
<li><strong>api:</strong> manual updates (<a
href="https://redirect.github.com/openai/openai-go/issues/363">#363</a>)
(<a
href="5d068e0053">5d068e0</a>)</li>
<li><strong>client:</strong> add escape hatch to omit required param
fields (<a
href="https://redirect.github.com/openai/openai-go/issues/354">#354</a>)
(<a
href="9690d6b49f">9690d6b</a>)</li>
<li><strong>client:</strong> support custom http clients (<a
href="https://redirect.github.com/openai/openai-go/issues/357">#357</a>)
(<a
href="b5a624f658">b5a624f</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> readme improvements (<a
href="https://redirect.github.com/openai/openai-go/issues/356">#356</a>)
(<a
href="b2f8539d63">b2f8539</a>)</li>
<li><strong>internal:</strong> fix examples (<a
href="https://redirect.github.com/openai/openai-go/issues/361">#361</a>)
(<a
href="de398b453d">de398b4</a>)</li>
<li><strong>internal:</strong> skip broken test (<a
href="https://redirect.github.com/openai/openai-go/issues/362">#362</a>)
(<a
href="cccead9ba9">cccead9</a>)</li>
<li><strong>tests:</strong> improve enum examples (<a
href="https://redirect.github.com/openai/openai-go/issues/359">#359</a>)
(<a
href="e0b9739920">e0b9739</a>)</li>
</ul>
<h2>v0.1.0-beta.7</h2>
<h2>0.1.0-beta.7 (2025-04-07)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-go/compare/v0.1.0-beta.6...v0.1.0-beta.7">v0.1.0-beta.6...v0.1.0-beta.7</a></p>
<h3>Features</h3>
<ul>
<li><strong>client:</strong> make response union's AsAny method type
safe (<a
href="https://redirect.github.com/openai/openai-go/issues/352">#352</a>)
(<a
href="1252f56c91">1252f56</a>)</li>
</ul>
<h3>Chores</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-go/blob/main/CHANGELOG.md">github.com/openai/openai-go's
changelog</a>.</em></p>
<blockquote>
<h2>0.1.0-beta.10 (2025-04-14)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-go/compare/v0.1.0-beta.9...v0.1.0-beta.10">v0.1.0-beta.9...v0.1.0-beta.10</a></p>
<h3>Chores</h3>
<ul>
<li><strong>internal:</strong> expand CI branch coverage (<a
href="https://redirect.github.com/openai/openai-go/issues/369">#369</a>)
(<a
href="258dda8007">258dda8</a>)</li>
<li><strong>internal:</strong> reduce CI branch coverage (<a
href="a2f7c03eb9">a2f7c03</a>)</li>
</ul>
<h2>0.1.0-beta.9 (2025-04-09)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-go/compare/v0.1.0-beta.8...v0.1.0-beta.9">v0.1.0-beta.8...v0.1.0-beta.9</a></p>
<h3>Chores</h3>
<ul>
<li>workaround build errors (<a
href="https://redirect.github.com/openai/openai-go/issues/366">#366</a>)
(<a
href="adeb003cab">adeb003</a>)</li>
</ul>
<h2>0.1.0-beta.8 (2025-04-09)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-go/compare/v0.1.0-beta.7...v0.1.0-beta.8">v0.1.0-beta.7...v0.1.0-beta.8</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> Add evalapi to sdk (<a
href="https://redirect.github.com/openai/openai-go/issues/360">#360</a>)
(<a
href="88977d1868">88977d1</a>)</li>
<li><strong>api:</strong> manual updates (<a
href="https://redirect.github.com/openai/openai-go/issues/363">#363</a>)
(<a
href="5d068e0053">5d068e0</a>)</li>
<li><strong>client:</strong> add escape hatch to omit required param
fields (<a
href="https://redirect.github.com/openai/openai-go/issues/354">#354</a>)
(<a
href="9690d6b49f">9690d6b</a>)</li>
<li><strong>client:</strong> support custom http clients (<a
href="https://redirect.github.com/openai/openai-go/issues/357">#357</a>)
(<a
href="b5a624f658">b5a624f</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> readme improvements (<a
href="https://redirect.github.com/openai/openai-go/issues/356">#356</a>)
(<a
href="b2f8539d63">b2f8539</a>)</li>
<li><strong>internal:</strong> fix examples (<a
href="https://redirect.github.com/openai/openai-go/issues/361">#361</a>)
(<a
href="de398b453d">de398b4</a>)</li>
<li><strong>internal:</strong> skip broken test (<a
href="https://redirect.github.com/openai/openai-go/issues/362">#362</a>)
(<a
href="cccead9ba9">cccead9</a>)</li>
<li><strong>tests:</strong> improve enum examples (<a
href="https://redirect.github.com/openai/openai-go/issues/359">#359</a>)
(<a
href="e0b9739920">e0b9739</a>)</li>
</ul>
<h2>0.1.0-beta.7 (2025-04-07)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-go/compare/v0.1.0-beta.6...v0.1.0-beta.7">v0.1.0-beta.6...v0.1.0-beta.7</a></p>
<h3>Features</h3>
<ul>
<li><strong>client:</strong> make response union's AsAny method type
safe (<a
href="https://redirect.github.com/openai/openai-go/issues/352">#352</a>)
(<a
href="1252f56c91">1252f56</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>docs:</strong> doc improvements (<a
href="https://redirect.github.com/openai/openai-go/issues/350">#350</a>)
(<a
href="80debc824e">80debc8</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c0414f15a9"><code>c0414f1</code></a>
release: 0.1.0-beta.10</li>
<li><a
href="192ec22bd7"><code>192ec22</code></a>
chore(internal): reduce CI branch coverage</li>
<li><a
href="17cbc6d2c8"><code>17cbc6d</code></a>
chore(internal): expand CI branch coverage (<a
href="https://redirect.github.com/openai/openai-go/issues/369">#369</a>)</li>
<li><a
href="e1d5123160"><code>e1d5123</code></a>
release: 0.1.0-beta.9</li>
<li><a
href="4e42dd39d9"><code>4e42dd3</code></a>
chore: workaround build errors (<a
href="https://redirect.github.com/openai/openai-go/issues/366">#366</a>)</li>
<li><a
href="0ae103de4e"><code>0ae103d</code></a>
release: 0.1.0-beta.8</li>
<li><a
href="68c32a0aec"><code>68c32a0</code></a>
feat(api): manual updates (<a
href="https://redirect.github.com/openai/openai-go/issues/363">#363</a>)</li>
<li><a
href="8599318b87"><code>8599318</code></a>
chore(internal): skip broken test (<a
href="https://redirect.github.com/openai/openai-go/issues/362">#362</a>)</li>
<li><a
href="5e86f0f273"><code>5e86f0f</code></a>
chore(internal): fix examples (<a
href="https://redirect.github.com/openai/openai-go/issues/361">#361</a>)</li>
<li><a
href="4a496a7674"><code>4a496a7</code></a>
feat(api): Add evalapi to sdk (<a
href="https://redirect.github.com/openai/openai-go/issues/360">#360</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/openai/openai-go/compare/v0.1.0-beta.6...v0.1.0-beta.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/openai/openai-go&package-manager=go_modules&previous-version=0.1.0-beta.6&new-version=0.1.0-beta.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>
2025-05-05 12:54:22 +00:00
1f569f71f8 chore: bump google.golang.org/api from 0.230.0 to 0.231.0 (#17671)
Bumps
[google.golang.org/api](https://github.com/googleapis/google-api-go-client)
from 0.230.0 to 0.231.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.231.0</h2>
<h2><a
href="https://github.com/googleapis/google-api-go-client/compare/v0.230.0...v0.231.0">0.231.0</a>
(2025-04-29)</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/3122">#3122</a>)
(<a
href="47cbba61ec">47cbba6</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3124">#3124</a>)
(<a
href="677b602b6f">677b602</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3125">#3125</a>)
(<a
href="8ccf1f0897">8ccf1f0</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3126">#3126</a>)
(<a
href="405935174a">4059351</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3127">#3127</a>)
(<a
href="ae18b2206b">ae18b22</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3129">#3129</a>)
(<a
href="c33e0d153c">c33e0d1</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.230.0...v0.231.0">0.231.0</a>
(2025-04-29)</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/3122">#3122</a>)
(<a
href="47cbba61ec">47cbba6</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3124">#3124</a>)
(<a
href="677b602b6f">677b602</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3125">#3125</a>)
(<a
href="8ccf1f0897">8ccf1f0</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3126">#3126</a>)
(<a
href="405935174a">4059351</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3127">#3127</a>)
(<a
href="ae18b2206b">ae18b22</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3129">#3129</a>)
(<a
href="c33e0d153c">c33e0d1</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="70d3b4f38e"><code>70d3b4f</code></a>
chore(main): release 0.231.0 (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3123">#3123</a>)</li>
<li><a
href="c33e0d153c"><code>c33e0d1</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3129">#3129</a>)</li>
<li><a
href="673da13c2f"><code>673da13</code></a>
chore(all): update all (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3128">#3128</a>)</li>
<li><a
href="ae18b2206b"><code>ae18b22</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3127">#3127</a>)</li>
<li><a
href="405935174a"><code>4059351</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3126">#3126</a>)</li>
<li><a
href="8ccf1f0897"><code>8ccf1f0</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3125">#3125</a>)</li>
<li><a
href="677b602b6f"><code>677b602</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3124">#3124</a>)</li>
<li><a
href="47cbba61ec"><code>47cbba6</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3122">#3122</a>)</li>
<li>See full diff in <a
href="https://github.com/googleapis/google-api-go-client/compare/v0.230.0...v0.231.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.230.0&new-version=0.231.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-05-05 12:37:45 +00:00
dc66dafc7c chore: bump github.com/mark3labs/mcp-go from 0.23.1 to 0.25.0 (#17672)
Bumps [github.com/mark3labs/mcp-go](https://github.com/mark3labs/mcp-go)
from 0.23.1 to 0.25.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mark3labs/mcp-go/releases">github.com/mark3labs/mcp-go's
releases</a>.</em></p>
<blockquote>
<h2>Release v0.25.0</h2>
<h2>What's Changed</h2>
<ul>
<li>update doc comments to match Go conventions by <a
href="https://github.com/yinebebt"><code>@​yinebebt</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/226">mark3labs/mcp-go#226</a></li>
<li>fix: Add Accept Header in StreamableHTTP Client by <a
href="https://github.com/hhxiao"><code>@​hhxiao</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/230">mark3labs/mcp-go#230</a></li>
<li>fix(SSE): only initialize <code>http.Server</code> when not set by
<a href="https://github.com/cryo-zd"><code>@​cryo-zd</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/229">mark3labs/mcp-go#229</a></li>
<li>fix: Prevent panic in parsing functions for null results by <a
href="https://github.com/cocovs"><code>@​cocovs</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/218">mark3labs/mcp-go#218</a></li>
<li>[SSEClient] Add ability to override the http.Client by <a
href="https://github.com/sks"><code>@​sks</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/109">mark3labs/mcp-go#109</a></li>
<li>feat(SSEServer): add WithAppendQueryToMessageEndpoint() by <a
href="https://github.com/liut"><code>@​liut</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/136">mark3labs/mcp-go#136</a></li>
<li>feat: quick return tool-call request, send response via SSE in
goroutine by <a
href="https://github.com/CeerDecy"><code>@​CeerDecy</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/163">mark3labs/mcp-go#163</a></li>
<li>feat(server/sse): Add support for dynamic base paths by <a
href="https://github.com/robert-jackson-glean"><code>@​robert-jackson-glean</code></a>
in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/214">mark3labs/mcp-go#214</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/yinebebt"><code>@​yinebebt</code></a>
made their first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/226">mark3labs/mcp-go#226</a></li>
<li><a href="https://github.com/hhxiao"><code>@​hhxiao</code></a> made
their first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/230">mark3labs/mcp-go#230</a></li>
<li><a href="https://github.com/cocovs"><code>@​cocovs</code></a> made
their first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/218">mark3labs/mcp-go#218</a></li>
<li><a href="https://github.com/sks"><code>@​sks</code></a> made their
first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/109">mark3labs/mcp-go#109</a></li>
<li><a href="https://github.com/liut"><code>@​liut</code></a> made their
first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/136">mark3labs/mcp-go#136</a></li>
<li><a href="https://github.com/CeerDecy"><code>@​CeerDecy</code></a>
made their first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/163">mark3labs/mcp-go#163</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/mark3labs/mcp-go/compare/v0.24.1...v0.25.0">https://github.com/mark3labs/mcp-go/compare/v0.24.1...v0.25.0</a></p>
<h2>Release v0.24.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: marshal <code>ToolInputSchema.Properties</code> to {} when
len=0 by <a href="https://github.com/cryo-zd"><code>@​cryo-zd</code></a>
in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/225">mark3labs/mcp-go#225</a></li>
<li>fix(client/test): verify mock server binary exists after compilation
by <a
href="https://github.com/robert-jackson-glean"><code>@​robert-jackson-glean</code></a>
in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/215">mark3labs/mcp-go#215</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/mark3labs/mcp-go/compare/v0.24.0...v0.24.1">https://github.com/mark3labs/mcp-go/compare/v0.24.0...v0.24.1</a></p>
<h2>Release v0.24.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Use correct name in Go documentation by <a
href="https://github.com/oschwald"><code>@​oschwald</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/202">mark3labs/mcp-go#202</a></li>
<li>fix(client): resource leak in <code>SSEClient.SendRequest()</code>
by <a href="https://github.com/cryo-zd"><code>@​cryo-zd</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/206">mark3labs/mcp-go#206</a></li>
<li>fix(client): risk of resource leak and closing closed channel by <a
href="https://github.com/cryo-zd"><code>@​cryo-zd</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/208">mark3labs/mcp-go#208</a></li>
<li>no need to check empty text by <a
href="https://github.com/graydovee"><code>@​graydovee</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/209">mark3labs/mcp-go#209</a></li>
<li>refactor: Pull out <code>Annotations</code> structure rather than
being an anonymous inner struct by <a
href="https://github.com/rm-hull"><code>@​rm-hull</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/203">mark3labs/mcp-go#203</a></li>
<li>perf: optimize usage of RWMutex in MCPServer for performance by <a
href="https://github.com/cryo-zd"><code>@​cryo-zd</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/181">mark3labs/mcp-go#181</a></li>
<li>feat: Add server hooks:OnRequestInitialization by <a
href="https://github.com/AlexNiny"><code>@​AlexNiny</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/164">mark3labs/mcp-go#164</a></li>
<li>fix: Improve content type handling in streamable_http.go by <a
href="https://github.com/TBXark"><code>@​TBXark</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/210">mark3labs/mcp-go#210</a></li>
<li>Add <code>mcptest</code> package for in-process MCP testing by <a
href="https://github.com/octo"><code>@​octo</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/149">mark3labs/mcp-go#149</a></li>
<li>Manage tools on a per session basis by <a
href="https://github.com/ezynda3"><code>@​ezynda3</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/179">mark3labs/mcp-go#179</a></li>
<li>Fix: fix client sse tcp connection re-use by draining outstanding io
by <a href="https://github.com/bcain99"><code>@​bcain99</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/212">mark3labs/mcp-go#212</a></li>
<li>perf(server): release Mutex early for performance by <a
href="https://github.com/cryo-zd"><code>@​cryo-zd</code></a> in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/213">mark3labs/mcp-go#213</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/oschwald"><code>@​oschwald</code></a>
made their first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/202">mark3labs/mcp-go#202</a></li>
<li><a href="https://github.com/graydovee"><code>@​graydovee</code></a>
made their first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/209">mark3labs/mcp-go#209</a></li>
<li><a href="https://github.com/rm-hull"><code>@​rm-hull</code></a> made
their first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/203">mark3labs/mcp-go#203</a></li>
<li><a href="https://github.com/AlexNiny"><code>@​AlexNiny</code></a>
made their first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/164">mark3labs/mcp-go#164</a></li>
<li><a href="https://github.com/octo"><code>@​octo</code></a> made their
first contribution in <a
href="https://redirect.github.com/mark3labs/mcp-go/pull/149">mark3labs/mcp-go#149</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eadd702351"><code>eadd702</code></a>
Format</li>
<li><a
href="4a1010e73b"><code>4a1010e</code></a>
feat(server/sse): Add support for dynamic base paths (<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/214">#214</a>)</li>
<li><a
href="cfeb0eec85"><code>cfeb0ee</code></a>
feat: quick return tool-call request, send response via SSE in goroutine
(<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/163">#163</a>)</li>
<li><a
href="d352118718"><code>d352118</code></a>
feat(SSEServer): add WithAppendQueryToMessageEndpoint() (<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/136">#136</a>)</li>
<li><a
href="df5f67eeb1"><code>df5f67e</code></a>
[chore][client] Add ability to override the http.Client (<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/109">#109</a>)</li>
<li><a
href="ddb59ddfad"><code>ddb59dd</code></a>
fix: handle nil rawMessage in response parsing functions (<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/218">#218</a>)</li>
<li><a
href="f0a648b91d"><code>f0a648b</code></a>
fix(SSE): only initialize http.Server when not set (<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/229">#229</a>)</li>
<li><a
href="ffc63d90b0"><code>ffc63d9</code></a>
Add Accept header (<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/230">#230</a>)</li>
<li><a
href="ae96a68a47"><code>ae96a68</code></a>
fix: update doc comments to match Go conventions (<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/226">#226</a>)</li>
<li><a
href="df736673ba"><code>df73667</code></a>
fix(client/test): verify mock server binary exists after compilation (<a
href="https://redirect.github.com/mark3labs/mcp-go/issues/215">#215</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mark3labs/mcp-go/compare/v0.23.1...v0.25.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/mark3labs/mcp-go&package-manager=go_modules&previous-version=0.23.1&new-version=0.25.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-05-05 12:37:32 +00:00
87f4535357 chore: optimize CI setup time on Windows (#17666)
This PR focuses on optimizing go-test CI times on Windows. It:

- backs the `$RUNNER_TEMP` directory with a RAM disk. This directory is
used by actions like cache, setup-go, and setup-terraform as a staging
area
- backs `GOCACHE`, `GOMODCACHE`, and `GOPATH` with a RAM disk
- backs `$GITHUB_WORKSPACE` with a RAM disk - that's where the
repository is checked out
- uses preinstalled Go on Windows runners
- starts using the depot Windows runner

From what I've seen, these changes bring test times down to be on par
with Linux and macOS. The biggest improvement comes from backing
frequently accessed paths with RAM disks. The C drive is surprisingly
slow - I ran some performance tests with
[fio](https://fio.readthedocs.io/en/latest/fio_doc.html#) where I tested
IOPS on many small files, and the RAM disk was 100x faster.

Additionally, the depot runners seem to have more consistent performance
than the ones provided by GitHub.
2025-05-05 14:26:30 +02:00
a646478aed fix: move pubsub publishing out of database transactions to avoid conn exhaustion (#17648)
Database transactions hold onto connections, and `pubsub.Publish` tries
to acquire a connection of its own. If the latter is called within a
transaction, this can lead to connection exhaustion.

I plan two follow-ups to this PR:

1. Make connection counts tuneable

https://github.com/coder/coder/blob/main/cli/server.go#L2360-L2376

We will then be able to write tests showing how connection exhaustion
occurs.

2. Write a linter/ruleguard to prevent `pubsub.Publish` from being
called within a transaction.

---------

Signed-off-by: Danny Kopping <dannykopping@gmail.com>
2025-05-05 11:54:18 +02:00
82fdb6a6ae fix: fix size for non-squared app icons (#17663)
**Before:**

![image](https://github.com/user-attachments/assets/e7544b00-24b0-405c-b763-49a9a009c1d2)

**After:**
<img width="192" alt="Screenshot 2025-05-02 at 14 36 19"
src="https://github.com/user-attachments/assets/59cb4531-06fd-44bc-b4b9-4441f2dce79a"
/>
2025-05-02 14:44:13 -03:00
3be6487f02 feat: support GFM alerts in markdown (#17662)
Closes https://github.com/coder/coder/issues/17660

Add support to [GFM
Alerts](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts).

<img width="635" alt="Screenshot 2025-05-02 at 14 26 36"
src="https://github.com/user-attachments/assets/8b785e0f-87f4-4bbd-9107-67858ad5dece"
/>

PS: This was heavily copied from
https://github.com/coder/coder-registry/blob/dev/cmd/main/site/src/components/MarkdownView/MarkdownView.tsx
2025-05-02 14:44:01 -03:00
544259b809 feat: add database tables and API routes for agentic chat feature (#17570)
Backend portion of experimental `AgenticChat` feature:
- Adds database tables for chats and chat messages
- Adds functionality to stream messages from LLM providers using
`kylecarbs/aisdk-go`
- Adds API routes with relevant functionality (list, create, update
chats, insert chat message)
- Adds experiment `codersdk.AgenticChat`

---------

Co-authored-by: Kyle Carberry <kyle@carberry.com>
2025-05-02 17:29:57 +01:00
64b9bc1ca4 fix: update licensing info URL on sign up page (#17657) 2025-05-02 16:07:10 +00:00
e37ddd44d2 chore: improve the design of the create workspace page for dynamic parameters (#17654)
contributes to coder/preview#59

1. Improves the design and layout of the presets dropdown and switch
2. Improves the design for the immutable badge

<img width="537" alt="Screenshot 2025-05-01 at 23 28 11"
src="https://github.com/user-attachments/assets/f0967758-5ea7-4436-b44a-e014c048202c"
/>
<img width="714" alt="Screenshot 2025-05-01 at 23 28 34"
src="https://github.com/user-attachments/assets/0bb091e1-611f-4a58-8f6f-b3bb027c6a10"
/>
2025-05-02 11:14:32 -04:00
912b6aba82 docs: link to eks steps from aws section (#17646)
closes #17634

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-05-02 15:13:42 +00:00
50695b7d76 docs: fix link in tutorials faq to new docker-code-server link (#17655)
<https://github.com/sharkymark/v2-templates/tree/main/src/templates/docker/docker-code-server>

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-05-02 13:44:30 +00:00
c278662218 feat: collect database metrics (#17635)
Currently we don't have a way to get insight into Postgres connections
being exhausted.

By using the prometheus' [`DBStats`
collector](https://github.com/prometheus/client_golang/blob/main/prometheus/collectors/dbstats_collector.go),
we get some insight out-of-the-box.

```
# HELP go_sql_idle_connections The number of idle connections.
# TYPE go_sql_idle_connections gauge
go_sql_idle_connections{db_name="coder"} 1
# HELP go_sql_in_use_connections The number of connections currently in use.
# TYPE go_sql_in_use_connections gauge
go_sql_in_use_connections{db_name="coder"} 2
# HELP go_sql_max_idle_closed_total The total number of connections closed due to SetMaxIdleConns.
# TYPE go_sql_max_idle_closed_total counter
go_sql_max_idle_closed_total{db_name="coder"} 112
# HELP go_sql_max_idle_time_closed_total The total number of connections closed due to SetConnMaxIdleTime.
# TYPE go_sql_max_idle_time_closed_total counter
go_sql_max_idle_time_closed_total{db_name="coder"} 0
# HELP go_sql_max_lifetime_closed_total The total number of connections closed due to SetConnMaxLifetime.
# TYPE go_sql_max_lifetime_closed_total counter
go_sql_max_lifetime_closed_total{db_name="coder"} 0
# HELP go_sql_max_open_connections Maximum number of open connections to the database.
# TYPE go_sql_max_open_connections gauge
go_sql_max_open_connections{db_name="coder"} 10
# HELP go_sql_open_connections The number of established connections both in use and idle.
# TYPE go_sql_open_connections gauge
go_sql_open_connections{db_name="coder"} 3
# HELP go_sql_wait_count_total The total number of connections waited for.
# TYPE go_sql_wait_count_total counter
go_sql_wait_count_total{db_name="coder"} 28
# HELP go_sql_wait_duration_seconds_total The total time blocked waiting for a new connection.
# TYPE go_sql_wait_duration_seconds_total counter
go_sql_wait_duration_seconds_total{db_name="coder"} 0.086936235
```

`go_sql_wait_count_total` is the metric I'm most interested in gaining,
but the others are also very useful.

Changing the prefix is easy (`prometheus.WrapRegistererWithPrefix`), but
getting rid of the `go_` segment is not quite so easy. I've kept the
changeset small for now.

**NOTE:** I imported a library to determine the database name from the
given conn string. It's [not as
simple](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING)
as one might hope. The database name is used for the `db_name` label.

---------

Signed-off-by: Danny Kopping <dannykopping@gmail.com>
2025-05-02 12:17:01 +02:00
e718c3ab2f fix: improve WebSocket error handling in CreateWorkspacePageExperimental (#17647)
Refactor WebSocket error handling to ensure that errors are only set
when the current socket ref matches the active one. This prevents
unnecessary error messages when the WebSocket connection closes
unexpectedly

This solves the problem of showing error messages because of React
Strict mode rendering the page twice and opening 2 websocket
connections.
2025-05-01 19:02:34 -04:00
a226a75b32 docs: add early access dev container docs (#17613)
This change documents the early access dev containers integration and
how to enable it, what features are available and what limitations exist
at the time of writing.

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-05-01 23:45:02 +01:00
ef11d4f769 fix: fix bug with deletion of prebuilt workspaces (#17652)
Don't specify the template version for a delete transition, because the
prebuilt workspace may have been created using an older template
version.
If the template version isn't explicitly set, the builder will
automatically use the version from the last workspace build - which is
the desired behavior.
2025-05-01 17:26:30 -04:00
d9ef6ed8ae chore: replace MoreMenu with DropdownMenu (#17615)
Replace MoreMenu with DropDownMenu component to match update design
patterns.

Note: This was the result of experimentation using Cursor to make the
changes and Claude Code for fixing tests.

One key takeaway is that verbose e2e logging, especially benign
warnings/errors can confuse Claude Code in running playwright and
confirming its work.


<img width="201" alt="Screenshot 2025-05-01 at 00 00 52"
src="https://github.com/user-attachments/assets/4905582e-902e-4b61-adc8-14cab6bd006b"
/>
<img width="257" alt="Screenshot 2025-05-01 at 00 01 07"
src="https://github.com/user-attachments/assets/5befc420-724a-4c57-9a9d-330a39867fae"
/>
<img width="270" alt="Screenshot 2025-05-01 at 00 01 20"
src="https://github.com/user-attachments/assets/9cbf07cb-7d44-4228-ae6f-216e9f2faed0"
/>
<img width="224" alt="Screenshot 2025-05-01 at 00 01 30"
src="https://github.com/user-attachments/assets/9fe95916-3d9d-4600-9b1f-8a620e152a53"
/>
2025-05-01 13:14:11 -04:00
b7e08ba7c9 fix: filter out deleted users when attempting to delete an organization (#17621)
Closes
[coder/internal#601](https://github.com/coder/internal/issues/601)
2025-05-01 13:26:01 -03:00
cae4fa8b45 chore: correct typo in "Logs" page (#17633)
I saw this typo when looking at the docs, quick fix.

https://coder.com/docs/admin/monitoring/logs
2025-05-01 12:14:27 -04:00