fix(compute): allow unlisted template IDs - #888
Open
natalie-o-perret wants to merge 15 commits into
Open
Conversation
natalie-o-perret
changed the base branch from
master
to
fix/template-disk-size-default
August 4, 2026 17:21
2 tasks
natalie-o-perret
marked this pull request as draft
August 4, 2026 17:29
Contributor
Author
|
[SC-191635] |
…into fix/unlisted-template-ids # Conflicts: # cmd/compute/instance/instance_create.go # cmd/compute/instance_pool/instance_pool_create.go
…into fix/unlisted-template-ids # Conflicts: # cmd/compute/instance/instance_create.go # cmd/compute/instance_pool/instance_pool_create.go
…into fix/unlisted-template-ids # Conflicts: # CHANGELOG.md
…into fix/unlisted-template-ids # Conflicts: # CHANGELOG.md # cmd/compute/instance/instance_create.go # cmd/compute/instance_pool/instance_pool_create.go
…te-ids # Conflicts: # CHANGELOG.md # cmd/compute/instance/instance_create.go # cmd/compute/instance_pool/instance_pool_create.go
natalie-o-perret
marked this pull request as ready for review
August 10, 2026 13:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some valid public template IDs, including templates used by A1, are intentionally omitted from
ListTemplates. Compute commands currently treat that list as an existence check and reject those IDs before the authoritative API sees them.This change passes UUID template references directly to the create and update APIs while retaining list lookup for template names. It covers instance create/reset and instance pool create/update.
It preserves #882's template-size handling by trying
GetTemplatefor UUID metadata while treating lookup failure as unavailable metadata, not proof that the UUID is invalid.Checklist
(For exoscale contributors)
CHANGELOG.md)Testing
After merging current
master,go fmt ./...andgo mod tidyplusgo mod vendorleft the tree unchanged.make lint,go vet ./...,golangci-lint run --timeout 4m,make build,make test-verbose, API-freego test -vfromtests/e2e, andgovulncheck ./...passed.govulncheckreported zero reachable vulnerabilities.Local fake: valid unlisted UUID
Before: merged master rejects the UUID
A local fake API omitted fixture template
aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaafromListTemplateswhile allowing direct metadata lookup and instance creation with that UUID. The build from mergedmasteratf9f3ec55rejected it before calling the create API:After: PR head creates the instance
The build from this PR at
0045d794completed the same command and sent the UUID to the create API:The fake recorded only
GET /template?visibility=publicbefore the failure onmaster. At PR head it recordedGET /template/aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaafollowed byPOST /instancewith that template ID. No cloud resources were created.Actual API: nonexistent UUID
Both builds were also run against actual infrastructure in
ch-gva-2with the same nonexistent UUID and a temporary SSH key.Merged
masterrejected the UUID during list lookup:PR head passed the UUID to the actual create API, which remained authoritative and rejected it:
No instance was created. The temporary SSH key was deleted, and the final instance, instance-pool, and SSH-key lists were empty. This live check verifies that UUID validation moves to the authoritative API; it is not a live A1 success case because no real unlisted A1 template UUID was available.
Note
AI assistance: conflict resolution, test scaffolding, PR description.