patch(integration_test_charm.yaml): Display status and logs from multiple models #194
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
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 #193.