Skip to content
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

Closed
wants to merge 5 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cou/steps/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ async def _populate(cls, model: juju_utils.Model) -> list[OpenStackApplication]:
:rtype: List[OpenStackApplication]
"""
juju_applications = await model.get_applications()
apps = {AppFactory.create(app) for app in juju_applications.values()}
apps = set()
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
logger.info("found OpenStack application:\n%s", os_app)
logger.info("Found OpenStack application:\n%s", os_app)


# remove non-supported charms that return None on AppFactory.create
apps.discard(None)
# mypy complains that apps can have None, but we already removed.
Copy link
Contributor

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

apps_to_upgrade_in_order = {
app for app in apps if app.charm in UPGRADE_ORDER # type: ignore
Expand Down
Loading