8000 feat: support `order` property of `coder_agent` by mtojek · Pull Request #12121 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: support order property of coder_agent #12121

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 19 commits into from
Feb 15, 2024
Prev Previous commit
Next Next commit
resources
  • Loading branch information
mtojek committed Feb 14, 2024
commit f03aeb1bdbe17d64ef30a7030a7facc5d3e897ad
1 change: 1 addition & 0 deletions coderd/provisionerdserver/provisionerdserver.go
8000
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,7 @@ func InsertWorkspaceResource(ctx context.Context, db database.Store, jobID uuid.
DisplayApps: convertDisplayApps(prAgent.GetDisplayApps()),
InstanceMetadata: pqtype.NullRawMessage{},
ResourceMetadata: pqtype.NullRawMessage{},
DisplayOrder: int32(prAgent.Order),
})
if err != nil {
return xerrors.Errorf("insert agent: %w", err)
Expand Down
2 changes: 2 additions & 0 deletions provisioner/terraform/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ type agentAttributes struct {
MOTDFile string `mapstructure:"motd_file"`
Metadata []agentMetadata `mapstructure:"metadata"`
DisplayApps []agentDisplayAppsAttributes `mapstructure:"display_apps"`
Order int64 `mapstructure:"order"`
}

type agentDisplayAppsAttributes struct {
Expand Down Expand Up @@ -241,6 +242,7 @@ func ConvertState(modules []*tfjson.StateModule, rawGraph string) (*State, error
MotdFile: attrs.MOTDFile,
Metadata: metadata,
DisplayApps: displayApps,
Order: attrs.Order,
}
// Support the legacy script attributes in the agent!
if attrs.StartupScript != "" {
Expand Down
0