-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add log with OS app string representation to Analysis._populate #368
Conversation
With this, we can collect info about application during Analysis._populate, like this the log will contain the app string representation before planning. log message example: ```bash found OpenStack application: app-name: model_name: <model-name> ... ```
cou/steps/analyze.py
Outdated
for name, app in juju_applications.items(): | ||
if os_app := AppFactory.create(app): | ||
apps.add(os_app) | ||
logger.info("found OpenStack application:\n%s", os_app) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.info("found OpenStack application:\n%s", os_app) | |
logger.info("Found OpenStack application:\n%s", os_app) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor things
|
||
# remove non-supported charms that return None on AppFactory.create | ||
apps.discard(None) | ||
# mypy complains that apps can have None, but we already removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to remove this comment too
} | ||
other_o7k_apps = apps - apps_to_upgrade_in_order | ||
sorted_apps_to_upgrade_in_order = sorted( | ||
apps_to_upgrade_in_order, | ||
key=lambda app: UPGRADE_ORDER.index(app.charm), # type: ignore | ||
key=lambda app: UPGRADE_ORDER.index(app.charm), | ||
) | ||
# order by charm name to have a predictable upgrade sequence of others o7k charms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# order by charm name to have a predictable upgrade sequence of others o7k charms. | |
# order by charm name to have a predictable upgrade sequence of other o7k charms. |
superseded by #371 |
With this, we can collect info about application during Analysis._populate, like this the log will contain the app string representation before planning. log message example: ``` found OpenStack application: app-name: model_name: <model-name> ... ``` This PR supersedes #368
With this, we can collect info about application during Analysis._populate, like this the log will contain the app string representation before planning.
log message example: