Constrain mysql charm storage in k8s integration tests - #424
Open
paulomach wants to merge 5 commits into
Open
Conversation
astrojuanlu
approved these changes
Jul 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces Kubernetes integration-test deploy time by explicitly constraining the MySQL charm’s storage volumes to smaller sizes, aiming to speed up dynamic PVC provisioning (especially on slower storage backends and with MySQL 8.4’s multiple volumes).
Changes:
- Add explicit
storage={...}constraints to MySQL deployments across Kubernetes integration tests. - Apply the same constrained storage sizing to HA/self-healing/replication/upgrade scenarios and TLS/roles/relations test suites.
- Use a slightly larger
tempvolume in backup-related tests to accommodate backup/restore workflows.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| kubernetes/tests/integration/release/high_availability/test_upgrade_from_stable.py | Constrains storage sizes for the stable-channel deploy used in refresh/upgrade testing. |
| kubernetes/tests/integration/integration/test_tls.py | Adds constrained storage on deploy for TLS integration coverage. |
| kubernetes/tests/integration/integration/test_tls_private_key.py | Adds constrained storage on deploy for TLS private-key scenario. |
| kubernetes/tests/integration/integration/test_storage.py | Adds constrained storage on deploy for storage-specific integration assertions. |
| kubernetes/tests/integration/integration/test_saturate_max_connections.py | Adds constrained storage on deploy for max-connections saturation test. |
| kubernetes/tests/integration/integration/test_password_validation.py | Adds constrained storage on deploy for password validation tests. |
| kubernetes/tests/integration/integration/test_multi_relations.py | Adds constrained storage on deploy for multi-relation deployment scenario. |
| kubernetes/tests/integration/integration/test_charm.py | Adds constrained storage on deploy for general charm integration coverage. |
| kubernetes/tests/integration/integration/test_backup_gcp.py | Constrains storage (with larger temp) for GCP backup/restore tests. |
| kubernetes/tests/integration/integration/test_backup_ceph.py | Constrains storage (with larger temp) for Ceph backup/restore tests. |
| kubernetes/tests/integration/integration/test_backup_aws.py | Constrains storage (with larger temp) for AWS backup/restore tests. |
| kubernetes/tests/integration/integration/test_architecture.py | Adds constrained storage on deploy for cross-architecture deployment checks. |
| kubernetes/tests/integration/integration/roles/test_instance_roles.py | Adds constrained storage on deploy for instance roles tests. |
| kubernetes/tests/integration/integration/roles/test_instance_dba_role.py | Adds constrained storage on deploy for instance DBA role tests. |
| kubernetes/tests/integration/integration/roles/test_database_dba_role.py | Adds constrained storage on deploy for database DBA role tests. |
| kubernetes/tests/integration/integration/relations/test_database.py | Adds constrained storage on deploy for database relation integration tests. |
| kubernetes/tests/integration/integration/high_availability/test_upgrade.py | Adds constrained storage on deploy for HA upgrade testing. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_stop_primary.py | Adds constrained storage on deploy for self-healing “stop primary” scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_stop_all.py | Adds constrained storage on deploy for self-healing “stop all” scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_setup_crash.py | Adds constrained storage on deploy for self-healing “setup crash” scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_safe_recover_quorum.py | Adds constrained storage on deploy for quorum-safe recovery scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_restart_graceful.py | Adds constrained storage on deploy for graceful restart scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_process_killed.py | Adds constrained storage on deploy for “process killed” self-healing scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_process_frozen.py | Adds constrained storage on deploy for “process frozen” self-healing scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_pod.py | Adds constrained storage on deploy for pod-replacement self-healing scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_node_drain.py | Adds constrained storage on deploy for node drain resilience scenario. |
| kubernetes/tests/integration/integration/high_availability/test_self_healing_network_cut.py | Adds constrained storage on deploy for network partition/cut scenario. |
| kubernetes/tests/integration/integration/high_availability/test_replication_variables.py | Adds constrained storage on deploy for replication variable validation. |
| kubernetes/tests/integration/integration/high_availability/test_replication_unit_endpoints.py | Adds constrained storage on deploy for unit endpoint replication scenarios. |
| kubernetes/tests/integration/integration/high_availability/test_replication_scaling.py | Adds constrained storage on deploy for replication scaling behavior. |
| kubernetes/tests/integration/integration/high_availability/test_replication_reelection.py | Adds constrained storage on deploy for reelection behavior verification. |
| kubernetes/tests/integration/integration/high_availability/test_replication_logs_rotation.py | Adds constrained storage on deploy for replication log rotation behavior. |
| kubernetes/tests/integration/integration/high_availability/test_replication_data_isolation.py | Adds constrained storage on deploy for data isolation behavior. |
| kubernetes/tests/integration/integration/high_availability/test_replication_data_consistency.py | Adds constrained storage on deploy for data consistency checks. |
| kubernetes/tests/integration/integration/high_availability/test_primary_switchover.py | Adds constrained storage on deploy for primary switchover scenario. |
| kubernetes/tests/integration/integration/high_availability/test_async_replication.py | Adds constrained storage on deploy for multi-model async replication deploys. |
| kubernetes/tests/integration/integration/high_availability/test_async_replication_upgrade.py | Adds constrained storage on deploy for async replication upgrade deploys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Issue
Observed timeout in tests at deploy step. A candidate is the slower storage provision time (1) slower on canonical k8s compared to microk8s, and (2) 4 volumes in mysql-8.4, compared to 1 in mysql-8.0.
Solution
Add storage directive to have smaller than default (1G) volumes, speed up provision time.