Skip to content

fix: sort provisioner key tags in cli output - #14875

Merged
spikecurtis merged 1 commit into
mainfrom
spike/flake-provisioner-keys-tags
Oct 1, 2024
Merged

spikecurtis merged 1 commit into
mainfrom
spike/flake-provisioner-keys-tags

Conversation

@spikecurtis

@spikecurtis spikecurtis commented Sep 30, 2024 •

Copy link
Copy Markdown
Contributor

I'm seeing flakes like

    provisionerkeys_test.go:68: 2024-09-30 05:58:44.686: cmd: matched newline = "CREATED AT            NAME          TAGS            "
    provisionerkeys_test.go:72: 2024-09-30 05:58:44.686: cmd: matched newline = "2024-09-30T05:58:44Z  dont-test-me  my=way foo=bar  "
    provisionerkeys_test.go:74: 
        	Error Trace:	/Users/runner/work/coder/coder/enterprise/cli/provisionerkeys_test.go:74
        	Error:      	"2024-09-30T05:58:44Z  dont-test-me  my=way foo=bar  " does not contain "foo=bar my=way"
        	Test:       	TestProvisionerKeys/CRUD

e.g. https://github.com/coder/coder/actions/runs/11100237276/job/30835714478?pr=14855

Since the tags are a map, we weren't outputting them in a consistent order on the CLI, leading to flakes.

This sorts the tags by key when converting to a string, for a consistent, canonical output.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @spikecurtis and the rest of your teammates on Graphite Graphite

@spikecurtis
spikecurtis requested a review from f0ssel September 30, 2024 12:56
@spikecurtis
spikecurtis marked this pull request as ready for review September 30, 2024 12:57

spikecurtis commented Oct 1, 2024 •

Copy link
Copy Markdown
Contributor Author

Merge activity

@spikecurtis
spikecurtis merged commit d6766f7 into main Oct 1, 2024
@spikecurtis
spikecurtis deleted the spike/flake-provisioner-keys-tags branch October 1, 2024 05:11
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 1, 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.

2 participants