Skip to content

TD-015: Replace fragile raw-JSON workaround for CloudServer ID extraction #45

@aru-amedeo

Description

@aru-amedeo

Summary

cmd/compute.cloudserver.go manually unmarshals response.RawBody into map[string]interface{} to extract the resource ID because the SDK's typed response struct does not expose it. This breaks silently if the API response shape changes.

Fix

Either update the SDK to expose the ID in its typed response, or — if the SDK cannot be changed — add a test that fails if the JSON structure changes unexpectedly.

Severity

Medium — should be fixed in the near term.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: mediumShould be fixed in the near termtech-debtTechnical debt / refactoring backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions