Skip to content

Fix AWS AMI lookup matching wrong Ubuntu version#178

Merged
larsewi merged 1 commit intocfengine:masterfrom
larsewi:fix-ubuntu-ami-pattern
Apr 28, 2026
Merged

Fix AWS AMI lookup matching wrong Ubuntu version#178
larsewi merged 1 commit intocfengine:masterfrom
larsewi:fix-ubuntu-ami-pattern

Conversation

@larsewi
Copy link
Copy Markdown
Contributor

@larsewi larsewi commented Apr 27, 2026

The generic ubuntu AMI name_pattern formatted to ubuntu-*-20*, which also matched newer releases via their 20XX build-date suffix (e.g. ubuntu-jammy-22.04-...-20231201). _get_ami() picks the newest by creation date, so --platform ubuntu-20 was spawning Ubuntu 22.

Anchor the version on the dot ({version}.*) so ubuntu-20 only matches ubuntu-*-20.04-*, etc. Same fix applied to the ubuntu-24 entry for consistency.

🤖 Generated with Claude Code

The generic ubuntu name_pattern formatted to `ubuntu-*-20*`, which also
matched newer releases via their 20XX build-date suffix (e.g.
`ubuntu-jammy-22.04-...-20231201`). The newest by creation date won, so
`--platform ubuntu-20` spawned Ubuntu 22. Anchor on the version dot so
only matching releases are returned.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@larsewi larsewi merged commit 94947a7 into cfengine:master Apr 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants