3 Commits
Author SHA1 Message Date
Ethan 86ea5d4c4e ci: bump paralleltestctx to detect timeout contexts used through closures (#31039)
#31011 fixed a flake where a closure in `TestProjectSkillQueries` used
the parent test's `testutil.Context` from parallel subtests. Once that
deadline passed, the closure's `require.NoError` called `FailNow` on the
parent `t`, which panics and takes down the whole `coderd/database`
package. `paralleltestctx` only checked direct references to the
context, so it missed this. coder/paralleltestctx#6 now follows calls to
local closures too.

This pins `paralleltestctx` to the current `main` commit, as there's no
tag yet. That commit also brings in the outer variable reassignment
check from coder/paralleltestctx#4 and the `x/tools` bump from
coder/paralleltestctx#5. The closure check flagged the `loadPrompt`
helper in `TestMediaToolResultRoundTrip`, so it now makes its own
context from the subtest's `t`. The `TestGraph` and `TestRuntimeAudit`
fixes for the outer variable check are the same as in #30288, so that PR
only needs to repin.
2026-10-20 15:41:25 +11:00
Cian JohnstonandCopilot 25a0c807cb chore(coderd/database/dbfake): add support for provisioner job timestamp control (#21944)
Relates to https://github.com/coder/coder/pull/21922 /
https://github.com/coder/internal/issues/1259

* Adds `dbfake.BuilderOption func(*WorkspaceBuildBuilder)`
* Adds `BuilderOption` methods for setting various provisioner job
related fields on `WorkspaceBuildBuilder`.
* Migrates a number of existing tests that previously dependeded on
provisioner job timing to use these updated methods in the following
packages:
  * `coderd/jobreaper`
  * `coderd/notifications/reports`
  * `enterprise/coderd/schedule`
  * `enterprise/coderd/prebuilds`
  * `scripts/workspace-runtime-audit` 

🤖 Created using Mux (Opus 4.5)

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 09:44:40 +00:00
Steven Masley 1b03202e90 chore: add script to calculate workspace 'on' hours in a given time window (#21505)
Calculates how long each workspace has been "on" during a given time
window defined by "start/stop".
2026-01-21 14:35:37 +00:00