canonical / mysql-router-k8s-operator

Mysql router operator charm for kubernetes
https://charmhub.io/mysql-router-k8s
Apache License 2.0
2 stars 7 forks source link

[DPE-4739] Avoid using time.sleep in rollback integration tests #298

Closed shayancanonical closed 3 months ago

shayancanonical commented 3 months ago

Issue

  1. We use time.sleep instead of a deterministic way to determine when to send resume-upgrade after rolling back. This sometimes leads to this error when resume-upgrade is run too early
    Resume upgrade event failed: Highest number unit is unhealthy. Upgrade will not resume.
  2. We are using prime in charmcraft which is deprecated in charmcraft 3.1.1

Solution

  1. Use a more deterministic approach - check that all units are active and idle (one will have rolled back while the other two will not)
  2. Use parts to prime version files and the dump plugin to prime scripts/ directory