Skip to content

Conversation

@mkalcok
Copy link
Contributor

@mkalcok mkalcok commented May 8, 2025

Backport of: #679

This PR depends on #682 which fixes the linting issue. I'll leave this in draft and rebase once it gets merged.

Copy link
Contributor

@sabaini sabaini left a comment

Choose a reason for hiding this comment

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

lgtm, pending testing

mkalcok added 3 commits May 8, 2025 15:02
Direct calls to setup.py have been deprecated [0] and
they recently started to cause functional test to fail with
error:

NotImplementedError: Support for egg-based install has been removed.

This change removes explicit setup.py calls from tox commands, as it
shouldn't be necessary to explicitly install local project into the
tox virtual environment anyway.

[0] https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

(cherry picked from commit a1c8130)
Signed-off-by: Martin Kalcok <martin.kalcok@canonical.com>
Per deprecation notice from setuptools, multi-word keys that
use dashes to separate words are deprecated and will stop working
by 2026-Mar-03. The dashes should be replaced with underscores [0].

[0] https://setuptools.pypa.io/en/latest/userguide/declarative_config.html

(cherry picked from commit 3bce1a7)
Signed-off-by: Martin Kalcok <martin.kalcok@canonical.com>
Few places in the code made assumption that for subordinate charms,
the 'subordinate-to' list would contain only principal charms. However
that is not the case. If a suboridnate charm is related to other
subordinate charms, they show up in each other's 'subordinate-to' lists.

This was especially problematic in the 'get_machines_for_application'
function which would end up in an infinite loop.

(cherry picked from commit a361300)
Signed-off-by: Martin Kalcok <martin.kalcok@canonical.com>
@mkalcok mkalcok force-pushed the caracal-get-machine-recursion branch from b7f0277 to 00d2f96 Compare May 8, 2025 13:02
@mkalcok
Copy link
Contributor Author

mkalcok commented May 8, 2025

Thanks for the review @sabaini. Tests are passing after the rebase, so I'm merging this.

@mkalcok mkalcok marked this pull request as ready for review May 8, 2025 13:23
@mkalcok mkalcok merged commit 4b786cb into openstack-charmers:stable/caracal May 8, 2025
9 checks passed
@mkalcok mkalcok changed the title juju_utils: fix assumptions about 'subordinate-to' [caracal] [stable/caracal] juju_utils: fix assumptions about 'subordinate-to' May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants