feat: add workspace agent APIVersion (#10419)

Fixes #10339
This commit is contained in:
Spike Curtis
2023-10-31 10:08:43 +04:00
committed by GitHub
parent 90573a6e99
commit a7c671ca07
16 changed files with 47 additions and 3 deletions

View File

@ -6308,6 +6308,7 @@ func (q *FakeQuerier) UpdateWorkspaceAgentStartupByID(_ context.Context, arg dat
}
agent.Version = arg.Version
agent.APIVersion = arg.APIVersion
agent.ExpandedDirectory = arg.ExpandedDirectory
agent.Subsystems = arg.Subsystems
q.workspaceAgents[index] = agent

View File

@ -8039,7 +8039,8 @@ UPDATE
SET
version = $2,
expanded_directory = $3,
subsystems = $4
subsystems = $4,
api_version = $5
WHERE
id = $1
`
@ -8049,6 +8050,7 @@ type UpdateWorkspaceAgentStartupByIDParams struct {
Version string `db:"version" json:"version"`
ExpandedDirectory string `db:"expanded_directory" json:"expanded_directory"`
Subsystems []WorkspaceAgentSubsystem `db:"subsystems" json:"subsystems"`
APIVersion string `db:"api_version" json:"api_version"`
}
func (q *sqlQuerier) UpdateWorkspaceAgentStartupByID(ctx context.Context, arg UpdateWorkspaceAgentStartupByIDParams) error {
@ -8057,6 +8059,7 @@ func (q *sqlQuerier) UpdateWorkspaceAgentStartupByID(ctx context.Context, arg Up
arg.Version,
arg.ExpandedDirectory,
pq.Array(arg.Subsystems),
arg.APIVersion,
)
return err
}

View File

@ -69,7 +69,8 @@ UPDATE
SET
version = $2,
expanded_directory = $3,
subsystems = $4
subsystems = $4,
api_version = $5
WHERE
id = $1;