juju_utils: fix assumptions about 'subordinate-to'#679
Merged
fnordahl merged 3 commits intoopenstack-charmers:masterfrom Apr 30, 2025
Merged
juju_utils: fix assumptions about 'subordinate-to'#679fnordahl merged 3 commits intoopenstack-charmers:masterfrom
fnordahl merged 3 commits intoopenstack-charmers:masterfrom
Conversation
0d491ab to
6a7667d
Compare
Contributor
Author
|
I found one more place ( |
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 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 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. Signed-off-by: Martin Kalcok <martin.kalcok@canonical.com>
6a7667d to
a361300
Compare
Contributor
Author
|
Functional test dependency installation randomly broke since last week, so tox file got updated as well. |
fnordahl
approved these changes
Apr 30, 2025
Collaborator
fnordahl
left a comment
There was a problem hiding this comment.
LGTM, and thank you for the code gardening, leaving the tree in a better shape than when you found it!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.