fix: Compute v2_0 specs and minor code cleanup#21
Draft
Koan-Bot wants to merge 1 commit into
Draft
Conversation
Add missing uid: '{server_id}' to both getfromid specs in v2_0.pm —
without this field, setup_api_methods_for_service() dies at load time
for any OpenStack deployment using API version 2.0.
Also: remove duplicate status check in create_vm polling loop,
fix comment typo, initialize $server_is_ready explicitly, and
drop unused YAML::XS import from Routes.pm.
New t/specs-integrity.t validates all spec classes have required
fields for their declared types (prevents future regressions).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7 tasks
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.
What
Fix broken Compute v2.0 API specs and clean up minor code issues.
Why
The v2_0.pm specs were missing the
uidfield on bothgetfromidentries (server_from_uidanddelete_server_from_uid). This causessetup_api_methods_for_service()todieat load time for any deployment using OpenStack Compute API v2.0 — the method setup code requiresuidfor token substitution in routes.Addresses remaining items from #18 (audit findings).
How
uid: '{server_id}'to both getfromid specs, matching the v2_1 counterpart$server_status->{status}check in create_vm polling loop (copy-paste artifact), fixed comment typo, initialized$server_is_readyexplicitlyuse YAML::XSimport (DataAsYaml handles YAML internally)t/specs-integrity.tvalidates all spec classes have required fields for their declared types — catches this class of bug automaticallyTesting
t/specs-integrity.t: 3 subtests (one per spec class), 14+ individual assertionsuidfrom v2_0 causes test failure🤖 Generated with Claude Code
Quality Report
Changes: 4 files changed, 63 insertions(+), 4 deletions(-)
Code scan: clean
Tests: failed (0 Failed, 512 Tests)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline