Skip to content

testing: sort force-automated hosts#6756

Merged
francislavoie merged 1 commit into
masterfrom
stable-adapt
Dec 30, 2024
Merged

testing: sort force-automated hosts#6756
francislavoie merged 1 commit into
masterfrom
stable-adapt

Conversation

@mohammed90

Copy link
Copy Markdown
Member

The forcedAutomatedNames variable is a map, which is not guaranteed to be ordered in Go. By mere chance., the CI run on the PR #6712 was successful. The CI run on master after merge (https://github.com/caddyserver/caddy/actions/runs/12483804029/job/34840195488) failed with this diff showing the expected vs actual:

 - 					"automated1.example.com",
 - 					"automated2.example.com"
 + 					"automated2.example.com",
 + 					"automated1.example.com"

Sorted strings would have automated1 first, so sorting the slice before marshalling ensures stable output.

@mohammed90 mohammed90 added the under review 🧐 Review is pending before merging label Dec 30, 2024
@mohammed90 mohammed90 added this to the v2.9.0 milestone Dec 30, 2024

@francislavoie francislavoie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@francislavoie francislavoie merged commit f2c17d1 into master Dec 30, 2024
@francislavoie francislavoie deleted the stable-adapt branch December 30, 2024 10:38
mohammed90 added a commit to cedricziel/caddy that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

under review 🧐 Review is pending before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants