chore: convert agent stats to use a table (#6374)

* chore: convert workspace agent stats from json to table

* chore: convert agent stats to use a table

Backwards compatibility becomes hard when all agent stats are in a JSON blob.
We also want to query this table for new agents that are failing health checks
so we can display it in the UI.

* Fix migration using default values
This commit is contained in:
Kyle Carberry
2023-02-28 13:33:33 -06:00
committed by GitHub
parent 7cf1e20aac
commit 05e449943d
22 changed files with 306 additions and 234 deletions

View File

@ -128,7 +128,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
_ = dbgen.WorkspaceResourceMetadatums(s.T(), db, database.WorkspaceResourceMetadatum{})
check.Args(time.Now()).Asserts()
}))
s.Run("DeleteOldAgentStats", s.Subtest(func(db database.Store, check *expects) {
s.Run("DeleteOldWorkspaceAgentStats", s.Subtest(func(db database.Store, check *expects) {
check.Args().Asserts()
}))
s.Run("GetParameterSchemasCreatedAfter", s.Subtest(func(db database.Store, check *expects) {