Skip to content

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Feb 8, 2024

Fixes: #8487

This PR modifies the logic responsible for sorting agent metadata items to consider custom ordering, not just keys.

@mtojek mtojek self-assigned this Feb 8, 2024
@mtojek mtojek requested a review from johnstcn February 8, 2024 15:14
@mtojek mtojek marked this pull request as ready for review February 8, 2024 15:14
@@ -94,6 +94,7 @@ message Agent {
string script = 3;
int64 interval = 4;
int64 timeout = 5;
int64 order = 6;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunate that it generates an int64 here for an int32 :\

Copy link
Member Author

@mtojek mtojek Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is unfortunate. It is aligned with coder_parameter display order type though.

@mtojek mtojek marked this pull request as draft February 8, 2024 15:41
@mtojek
Copy link
Member Author

mtojek commented Feb 8, 2024

Taking back to draft, as I can't update the workspace after removing order property from the template:

Terraform 1.7.1-dev
coder_agent.main: Plan to update
docker_container.workspace[0]: Plan to replace
docker_container.workspace[0]: Destroying... [id=a8736e982bf07b30de62933b4fcc332b60cab345da4b329778ffa6c39920f404]
docker_container.workspace[0]: Destruction complete after 1s
coder_agent.main: Modifying... [id=6cf9db01-93be-4b6a-af76-194a82f64dde]
coder_agent.main: Modifications errored after 0s
Error: doesn't support update
on main.tf line 408, in resource "coder_agent" "main":
  408: resource "coder_agent" "main" {
Cleaning Up

@mtojek mtojek marked this pull request as ready for review February 8, 2024 16:20
@mtojek mtojek merged commit c0e169e into main Feb 8, 2024
@mtojek mtojek deleted the 8487-metadata-order-coder branch February 8, 2024 16:29
@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add order to coder_agent's metadata fields
2 participants