Investigate empty name in code generation with client-only schemas for Juju 3.1.0 #1161
Labels
area/schema-changes
Updates the Juju API schema
hint/3.x
going on main branch
kind/bug
indicates a bug in the project
priority/normal
normal priority
Description
#1160 will introduce a small change to codegen in
facade.py
, skipping items with an empty name. This is only an issue when using client-only schemas for older Juju versions like 3.1.0. Newer versions don't have the problem. Juju 3.1.0 full (not client-only) schema doesn't have this problem. It would be worthwhile to investigate why this happens.See: #1160 (comment)
There don't appear to be any missing facades, so it's not that a facade isn't being populated properly. There don't seem to be any empty entries in the schema json either. So it appears to be a bug in codegen itself, maybe getting a key that isn't there and leaving a template filled with default values?
Investigating this could be a good opportunity to type annotate facade.py if that's helpful when tracing the flow of execution for code generation.
Urgency
Casually reporting
Python-libjuju version
main
Juju version
3.1.0 schema (client-only)
Reproduce / Test
# Look for `if not name` in `facade.py`. You can remove this check and run with client-only 3.1.0 schema to get a crash when it tries to make a class without a name, or catch the bad case here for further investigation.
The text was updated successfully, but these errors were encountered: