Skip to content

Commit

Permalink
fix comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
1maple1 committed Nov 22, 2024
1 parent 6bfc402 commit 0898cc3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions brewtils/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ def get_system_matching_version(self, require, **kwargs):

if valid_versions:
system_candidates = [
system for system in systems if system.version in valid_versions
system
for system in systems
if str(Version(system.version)) in valid_versions
]
system = system_candidates[0]
for system_candidate in system_candidates:
Expand All @@ -530,9 +532,9 @@ def get_system_dependency(self, require, timeout=300):
require, filter_running=True, local=True
)
if system:
self.logger.debug(f"Found system: {system}")
self._logger.debug(f"Found system: {system}")
return system
self.logger.error(
self._logger.error(
f"Waiting {wait_time:.1f} seconds before next attempt for {self._system} "
f"dependency for {require}"
)
Expand All @@ -547,7 +549,7 @@ def get_system_dependency(self, require, timeout=300):
def await_dependencies(self, requires, config):
for req in requires:
system = self.get_system_dependency(req, config.requires_timeout)
self.logger.debug(
self._logger.debug(
f"Resolved system {system} for {req}: {config.name} {config.instance_name}"
)

Expand Down
2 changes: 2 additions & 0 deletions test/plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,8 @@ class TestDependencies(object):
("1.0.0rc1", ["1.0.0rc1", "0.2.1rc1"]),
("1.0", ["1.0", "0.2.1"]),
("1.0.0", ["1.0.0rc1", "1.0.0"]),
("3.0.0.dev0", ["3.0.0.dev0", "3.0.0.dev"]),
("3.0.0.dev", ["3.0.0.dev", "2.0.0"]),
],
)
def test_determine_latest(client, bg_system, versions, latest):
Expand Down

0 comments on commit 0898cc3

Please sign in to comment.