Skip to content

Commit

Permalink
tests/RedpandaInstaller.install handle version = _head_version
Browse files Browse the repository at this point in the history
  • Loading branch information
andijcr committed Mar 10, 2023
1 parent 27b2dc7 commit cf0cbbe
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions tests/rptest/services/redpanda_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,20 @@ def install(self, nodes, version: typing.Union[str, tuple[int, int],
self.start()

# version can be HEAD, a specific release, or a release_line. first two will go through, last one will be converted to a specific release
install_target = version
actual_version = version if version != RedpandaInstaller.HEAD else self._head_version
# requested a line, find the most recent release
if version != RedpandaInstaller.HEAD and len(version) == 2:
actual_version, is_head = self.latest_for_line(install_target)
# update install_target only if is not head. later code handles HEAD as a special case
install_target = actual_version if not is_head else RedpandaInstaller.HEAD
if version == RedpandaInstaller.HEAD:
actual_version = self._head_version
install_target = RedpandaInstaller.HEAD
elif len(version) == 2:
# requested a line, find the most recent release
actual_version, _ = self.latest_for_line(version)
install_target = actual_version
else:
actual_version = version
install_target = version

# later code handles HEAD as a special case, so convert _head_version to it
if install_target == self._head_version:
install_target = RedpandaInstaller.HEAD

self._redpanda.logger.info(
f"got {version=} will install {actual_version=}")
Expand Down

0 comments on commit cf0cbbe

Please sign in to comment.