Skip to content

CLI table/JSON output shows empty fields for templates, definitions, and logs #38

@omattsson

Description

@omattsson

Summary

Several stackctl commands display empty or zero values for fields that the API returns correctly. The data is there server-side, but the CLI fails to map response fields to the display structs.

Affected commands

stackctl template list

  • PUBLISHED always shows false
  • CHARTS always shows 0

stackctl template get <id> -o json

  • Top-level fields are empty (id, name, version, published, owner) even though charts[] is fully populated

stackctl template instantiate <id> --name <name>

  • Table output shows all blank fields (ID, Name, Status, Owner, Branch, etc.)

stackctl definition list

  • CHARTS column always shows 0

stackctl definition import --file <file> -o json

  • id field is empty in JSON output (but definition is created successfully)

stackctl stack logs <id>

  • All fields blank (Log ID, Action, Status, Output) even when deploy log exists in DB

stackctl stack deploy <id>

  • log ID is always empty in the "Deploying stack ... (log ID: )" message

Root cause (likely)

The CLI response structs probably have JSON tags that don't match the API response field names. For example, the API may return "is_published" but the CLI struct expects "published", or the charts count isn't computed from the nested array.

Steps to reproduce

# Seed data
./scripts/seed-dev-data.sh http://localhost:8081

# Observe empty fields
stackctl template list
stackctl template get <any-template-id> -o json
stackctl stack logs <any-deployed-stack-id>

Expected behavior

All fields populated correctly, matching what the API returns via curl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions