Skip to content

Commit

Permalink
Try to fix retrieval of the configuration schemas from the actors.
Browse files Browse the repository at this point in the history
Depends-On: 870
  • Loading branch information
abadger committed Sep 12, 2024
1 parent fd99333 commit ebc845c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion commands/upgrade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def upgrade(args, breadcrumbs):

# Read the Actor Config and validate it against the schemas saved in the
# configuration.
actor_config_schemas = repositories.get_config_schemas()
actor_config_schemas = tuple(actor.config_schemas for actor in repositories.actors)
actor_config_schemas = actor_config.normalize_schemas(actor_config_schemas)
actor_config_path = cfg.get('actor_config', 'path')
# Note: actor_config.load() stores the loaded actor config into a global
# variable which can then be accessed by functions in that file. Is this
Expand Down
12 changes: 8 additions & 4 deletions repos/system_upgrade/common/configs/rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
from leapp.actors.configs import Config


### Nested containers?
### Duplication of default value in type_ and Config. If we eliminate that, we need to extract default from the type_ for the documentation.
### We probably want to allow dicts in Config. But IIRC, dicts were specifically excluded for model fields. Do we need something that restricts where fields are valid?
### Test that type validation is strict. For instance, giving an integer like 644 to a field.String() is an error.
# * Nested containers?
# * Duplication of default value in type_ and Config. If we eliminate that, we need to extract
# default from the type_ for the documentation.
# * We probably want to allow dicts in Config. But IIRC, dicts were
# specifically excluded for model fields. Do we need something that restricts
# where fields are valid?
# * Test that type validation is strict. For instance, giving an integer like 644 to
# a field.String() is an error.
class Transaction_ToInstall(Config):
section = "transaction"
name = "to_install"
Expand Down

0 comments on commit ebc845c

Please sign in to comment.