Skip to content

Commit

Permalink
Fix missing kwargs in some methods (#236)
Browse files Browse the repository at this point in the history
## Issue
There are some inconsistencies with shared files with mysql-router vm
(see [PR
143](canonical/mysql-router-operator#143)

## Solution
Fix inconsistencies
  • Loading branch information
shayancanonical authored Apr 30, 2024
1 parent 7aba973 commit 0318021
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/kubernetes_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def determine_partition() -> int:
def authorized(self) -> bool:
raise Exception("Not supported on Kubernetes")

def upgrade_unit(self, *, workload_: workload.Workload, tls: bool) -> None:
def upgrade_unit(self, *, event, workload_: workload.Workload, tls: bool) -> None:
raise Exception("Not supported on Kubernetes")


Expand Down
2 changes: 1 addition & 1 deletion src/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def authorized(self) -> bool:
"""

@abc.abstractmethod
def upgrade_unit(self, *, workload_: workload.Workload, tls: bool) -> None:
def upgrade_unit(self, *, event, workload_: workload.Workload, tls: bool) -> None:
"""Upgrade this unit.
Only applies to machine charm
Expand Down
2 changes: 1 addition & 1 deletion src/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def upgrade(
if enabled:
logger.debug("Disabling MySQL Router service before upgrade")
self._disable_router()
super().upgrade(unit=unit, tls=tls, exporter_config=exporter_config)
super().upgrade(event=event, unit=unit, tls=tls, exporter_config=exporter_config)
if enabled:
logger.debug("Re-enabling MySQL Router service after upgrade")
self._enable_router(event=event, tls=tls, unit_name=unit.name)
Expand Down

0 comments on commit 0318021

Please sign in to comment.