For integration tests like the one for async replication, it would be helpful to have status and logs from multiple models.
Solution
In .github/workflows/integration_test_charm.yaml:
Loop over the existing models (except the controller model) and run the juju status and juju debug-log (or convert-logsink-to-debug-log for LXD clouds) commands for each model, appending the output to the status and the log files, respectively.
For the logs, write the model name before writing the logs to the logs file.
In python/cli/data_platform_workflows_cli/convert_logsink_to_debug_log.py:
Get the first model from the juju show-model command output because a second model has a name different from the test (example: test-other in the PostgreSQL charms async replication integration tests).
Append the logs to the already existing log file to support logs from multiple models.
Issue
For integration tests like the one for async replication, it would be helpful to have status and logs from multiple models.
Solution
In
.github/workflows/integration_test_charm.yaml
:Loop over the existing models (except the
controller
model) and run thejuju status
andjuju debug-log
(orconvert-logsink-to-debug-log
for LXD clouds) commands for each model, appending the output to the status and the log files, respectively.For the logs, write the model name before writing the logs to the logs file.
In
python/cli/data_platform_workflows_cli/convert_logsink_to_debug_log.py
:Get the first model from the
juju show-model
command output because a second model has a name different from the test (example:test-other
in the PostgreSQL charms async replication integration tests).Append the logs to the already existing log file to support logs from multiple models.
Fixes https://github.com/canonical/data-platform-workflows/issues/193.