Skip to content

Commit

Permalink
cmd(preupgrade): load actor config
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Hecko committed Oct 6, 2024
1 parent a8f1372 commit 13508f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions commands/preupgrade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import uuid

from leapp.actors import config as actor_config
from leapp.cli.commands import command_utils
from leapp.cli.commands.config import get_config
from leapp.cli.commands.upgrade import breadcrumbs, util
Expand Down Expand Up @@ -60,6 +61,13 @@ def preupgrade(args, breadcrumbs):
raise CommandError(exc.message)

workflow = repositories.lookup_workflow('IPUWorkflow')()

# Read the Actor Config and validate it against the schemas saved in the configuration.
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')
actor_config.load(actor_config_path, actor_config_schemas)

util.warn_if_unsupported(configuration)
util.process_whitelist_experimental(repositories, workflow, configuration, logger)
with beautify_actor_exception():
Expand Down

0 comments on commit 13508f6

Please sign in to comment.