canonical / wordpress-k8s-operator

wordpress-k8s-operator - charm repository.
Apache License 2.0
13 stars 7 forks source link

Fix storage mount ownership update process during charm upgrades #200

Closed weiiwang01 closed 7 months ago

weiiwang01 commented 8 months ago

Currently, when updating the storage mount ownership during the upgrade-charm event, the WordPress charm does not account for situations where pebble is not ready. This means that if the upgrade-charm event is fired before wordpress-pebble-ready, it will cause an error. To avoid this problem, update the process for updating storage ownership.

github-actions[bot] commented 8 months ago

Test coverage for df7430c2237d7c3ad3fcd25fba13cd34ce669181

Name                Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------
src/charm.py          540     35    184     33    91%   162, 203-206, 370, 429->433, 582, 613, 619, 636-640, 670, 705-706, 764, 773, 877->890, 889, 891, 896-897, 957, 975, 982, 1072, 1081, 1093, 1114, 1123, 1142, 1146, 1175, 1228, 1360, 1382, 1389->1391, 1434->exit, 1446, 1456, 1494
src/cos.py             21      0      0      0   100%
src/exceptions.py      17      1      2      1    89%   41
src/state.py           34      0      4      0   100%
src/types_.py          16      0      0      0   100%
---------------------------------------------------------------
TOTAL                 628     36    190     34    91%

Static code analysis report

Run started:2024-03-15 15:50:25.311447

Test results:
    No issues identified.

Code scanned:
    Total lines of code: 4584
    Total lines skipped (#nosec): 1
    Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
    Total issues (by severity):
        Undefined: 0
        Low: 0
        Medium: 0
        High: 0
    Total issues (by confidence):
        Undefined: 0
        Low: 0
        Medium: 0
        High: 0
Files skipped (0):