Skip to content
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

testing: sort force-automated hosts #6756

Merged
merged 1 commit into from
Dec 30, 2024
Merged

testing: sort force-automated hosts #6756

merged 1 commit into from
Dec 30, 2024

Conversation

mohammed90
Copy link
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
Copy link
Member

@francislavoie francislavoie left a comment

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
33 checks passed
@francislavoie francislavoie deleted the stable-adapt branch December 30, 2024 10:38
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