Skip to content

Commit 8a51702

Browse files
refactor: use healthy enum option instead of normal
1 parent e667dad commit 8a51702

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4942,7 +4942,7 @@ func (s *MethodTestSuite) TestPrebuilds() {
49424942
},
49434943
InvalidateAfterSecs: preset.InvalidateAfterSecs,
49444944
OrganizationID: org.ID,
4945-
PrebuildStatus: database.PrebuildStatusNormal,
4945+
PrebuildStatus: database.PrebuildStatusHealthy,
49464946
})
49474947
}))
49484948
s.Run("UpdatePrebuildStatus", s.Subtest(func(db database.Store, check *expects) {
@@ -4965,7 +4965,7 @@ func (s *MethodTestSuite) TestPrebuilds() {
49654965
})
49664966
req := database.UpdatePrebuildStatusParams{
49674967
PresetID: preset.ID,
4968-
Status: database.PrebuildStatusNormal,
4968+
Status: database.PrebuildStatusHealthy,
49694969
}
49704970
check.Args(req).
49714971
Asserts(rbac.ResourceTemplate.WithID(template.ID).InOrg(org.ID), policy.ActionUpdate)

coderd/database/dbmem/dbmem.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9049,7 +9049,7 @@ func (q *FakeQuerier) InsertPreset(_ context.Context, arg database.InsertPresetP
90499049
Int32: 0,
90509050
Valid: true,
90519051
},
9052-
PrebuildStatus: database.PrebuildStatusNormal,
9052+
PrebuildStatus: database.PrebuildStatusHealthy,
90539053
}
90549054
q.presets = append(q.presets, preset)
90559055
return preset, nil

coderd/database/dump.sql

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CREATE TYPE prebuild_status AS ENUM (
2-
'normal', -- Prebuilds are working as expected; this is the default, healthy state.
2+
'healthy', -- Prebuilds are working as expected; this is the default, healthy state.
33
'hard_limited', -- Prebuilds have failed repeatedly and hit the configured hard failure limit; won't be retried anymore.
44
'validation_failed' -- Prebuilds failed due to a non-retryable validation error (e.g. template misconfiguration); won't be retried.
55
);
66

7-
ALTER TABLE template_version_presets ADD COLUMN prebuild_status prebuild_status NOT NULL DEFAULT 'normal'::prebuild_status;
7+
ALTER TABLE template_version_presets ADD COLUMN prebuild_status prebuild_status NOT NULL DEFAULT 'healthy'::prebuild_status;

coderd/database/models.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)