Skip to content

Conversation

pull[bot]
Copy link

@pull pull bot commented Aug 20, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

DanielleMaywood and others added 11 commits August 20, 2025 10:00
Fixes coder/internal#907

We convert `workspacesdk.AgentConn` to an interface and generate a mock
for it. This allows writing `coderd` tests that rely on the agent's HTTP
api to not have to set up an entire tailnet networking stack.
… id (#19279)

Closes #18356.

This change finds and selects a matching preset if one was not chosen
during workspace creation. This solidifies the relationship between
presets and parameters.

When a workspace is created without in explicitly chosen preset, it will
now still be eligible to claim a prebuilt workspace if one is available.
## Description

This PR ensures that activity-based deadline extensions ("activity
bumping") are not applied to prebuilt workspaces. Prebuilds are managed
by the reconciliation loop and must not have `deadline` or
`max_deadline` values set or extended, as they are not part of the
regular lifecycle executor path.

## Changes

- Update `ActivityBumpWorkspace` SQL query to discard prebuilt
workspaces
- Update application layer to avoid calling activity bump logic on
prebuilt workspaces

Related with: 
* Issue: #18898
* PR: #19252
Fixes #18350

I attempted the route of relying on just the session env vars, in hopes
that this issue was fixed in Toolbox and the process name matching was
no longer need, but it was not a fruitful endeavor and it seems to be
using the same connection logic as it did in gateway, just with new
binary and flag names.
Wires up the usage collector and publisher to coderd.

Relates to coder/internal#814
The `createWorkspace` function was updated to use an injected Clock,
which makes it possible to mock time in tests:
https://github.com/coder/coder/pull/19264/files#diff-46f90baab52ea3ad914acbde30d656dbc8e46f5918d19bc056c445a1dc502482R1130
For database operations, however, it is recommended to use `dbtime.Time`
since it rounds to the microsecond, the smallest unit of precision
supported by Postgres.
Related to coder/internal#869

---------

Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
Co-authored-by: Steven Masley <stevenmasley@gmail.com>
Initial language that gives us something to point to if needed.
@pull pull bot locked and limited conversation to collaborators Aug 20, 2025
@pull pull bot added the ⤵️ pull label Aug 20, 2025
@pull pull bot merged commit a19dfa9 into Klomgor:main Aug 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants