Skip to content

fix: make GetWorkspacesEligibleForTransition return even less false positives #15594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
78d9bef
fix: begin impl of reducing autostart false-positive rate
DanielleMaywood Nov 18, 2024
dea0c20
chore: update dbmem.go
DanielleMaywood Nov 18, 2024
d0f1851
fix: dbmem.go impl
DanielleMaywood Nov 19, 2024
077439c
test: refactor test slightly
DanielleMaywood Nov 19, 2024
3b41985
fix: update golden files
DanielleMaywood Nov 19, 2024
1a66a14
fix: dbmem.go convertToWorkspaceRowsNoLock
DanielleMaywood Nov 19, 2024
9725ec7
fix: pass currentTick to GetWorkspacesEligibleForTransition
DanielleMaywood Nov 20, 2024
5e9b806
revert: query change
DanielleMaywood Nov 21, 2024
b2a037b
fix: ensure times are converted back to UTC
DanielleMaywood Nov 21, 2024
997c902
Merge branch 'main' into dm-experiment-autostart
DanielleMaywood Nov 21, 2024
dd05558
test: next start at is only a valid value
DanielleMaywood Nov 22, 2024
8bddfdf
fix: appease linter
DanielleMaywood Nov 22, 2024
66a01a3
chore: add an index for next_start_at
DanielleMaywood Nov 22, 2024
b7434c0
fix: run 'make gen'
DanielleMaywood Nov 22, 2024
100f54c
chore: begin impl of tests
DanielleMaywood Nov 25, 2024
d201025
Merge branch 'main' into dm-experiment-autostart
DanielleMaywood Nov 25, 2024
eac63b7
test: fix tests
DanielleMaywood Nov 25, 2024
1b31cbb
fix: use american english
DanielleMaywood Nov 25, 2024
eaf32ee
fix: make NextAllowedAutostart look up to 7 days into the future
DanielleMaywood Nov 26, 2024
1599b2a
fix: TestExecutorAutostartBlocked test
DanielleMaywood Nov 26, 2024
142e335
fix: make enterprise template schedule store use quartz.clock
DanielleMaywood Nov 26, 2024
3f17e46
fix: infinite loop
DanielleMaywood Nov 26, 2024
e993643
refactor: give template schedule store a quartz.clock
DanielleMaywood Nov 26, 2024
d349c56
fix: ensure tests give template schedule store a clock
DanielleMaywood Nov 26, 2024
a48fb99
fix: nullify next_start_at on schedule update
DanielleMaywood Nov 27, 2024
cc93075
fix: tests
DanielleMaywood Nov 27, 2024
45350d1
chore: remove clock from test
DanielleMaywood Nov 27, 2024
c1648ae
Merge branch 'main' into dm-experiment-autostart
DanielleMaywood Nov 27, 2024
03d0b7f
chore: relocate test
DanielleMaywood Nov 27, 2024
23b2ec9
chore: nits
DanielleMaywood Nov 28, 2024
18f3c8a
Merge branch 'main' into dm-experiment-autostart
DanielleMaywood Nov 28, 2024
8b1b6d9
chore: bump migration number
DanielleMaywood Nov 28, 2024
2d239a6
fix: stop query returning dormant workspaces
DanielleMaywood Nov 28, 2024
2e2f13a
Merge branch 'main' into dm-experiment-autostart
DanielleMaywood Nov 28, 2024
df74e6f
Merge branch 'main' into dm-experiment-autostart
DanielleMaywood Dec 2, 2024
dec3d6c
chore: add index to template_id on workspaces
DanielleMaywood Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: add index to template_id on workspaces
  • Loading branch information
DanielleMaywood committed Dec 2, 2024
commit dec3d6cf85e0ec06878b9bf668f7316ab3c13b8f
2 changes: 2 additions & 0 deletions coderd/database/dump.sql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DROP FUNCTION IF EXISTS nullify_next_start_at_on_template_autostart_modification
DROP TRIGGER IF EXISTS trigger_nullify_next_start_at_on_workspace_autostart_modification ON workspaces;
DROP FUNCTION IF EXISTS nullify_next_start_at_on_workspace_autostart_modification;

DROP INDEX workspace_template_id_idx;
DROP INDEX workspace_next_start_at_idx;

ALTER TABLE ONLY workspaces DROP COLUMN IF EXISTS next_start_at;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ALTER TABLE ONLY workspaces ADD COLUMN IF NOT EXISTS next_start_at TIMESTAMPTZ DEFAULT NULL;

CREATE INDEX workspace_next_start_at_idx ON workspaces USING btree (next_start_at) WHERE (deleted=false);
CREATE INDEX workspace_template_id_idx ON workspaces USING btree (template_id) WHERE (deleted=false);

CREATE FUNCTION nullify_next_start_at_on_workspace_autostart_modification() RETURNS trigger
LANGUAGE plpgsql
Expand Down
Loading