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.
Summary
Several
stackctlcommands 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 listPUBLISHEDalways showsfalseCHARTSalways shows0stackctl template get <id> -o jsonid,name,version,published,owner) even thoughcharts[]is fully populatedstackctl template instantiate <id> --name <name>stackctl definition listCHARTScolumn always shows0stackctl definition import --file <file> -o jsonidfield is empty in JSON output (but definition is created successfully)stackctl stack logs <id>stackctl stack deploy <id>log IDis always empty in the "Deploying stack ... (log ID: )" messageRoot 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
Expected behavior
All fields populated correctly, matching what the API returns via
curl.