canonical / wordpress-k8s-operator

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

[DPE-3009] No more relational databag usage #166

Closed juditnovak closed 12 months ago

juditnovak commented 1 year ago

Overview This PR is addressing issue https://github.com/canonical/wordpress-k8s-operator/issues/163

Rationale The Relational Databag is not to be addressed directly but only via interface functions. Part of the relational data is now "hiding" in Juju Secrets and are not exposed on the databag anymore. The data_platform_libs/data_interfaces DatabaseRequires and DatabaseProvies interfaces ensure transparent and safe access to all relational data. Outside of these functions, no access/manipulation of this data can be guaranteed in the future.

Module Changes Relational Databag usage is replaced with DatabaseRequires interface calls.

github-actions[bot] commented 12 months ago

Test coverage for 73d5df38ee398d9671e8efa65058ef867a22a029

Name                Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------
src/charm.py          530     41    172     31    89%   189-192, 356-357, 557, 588, 594, 639, 674-675, 726-733, 738, 840->845, 844, 846, 851-852, 912, 930, 937, 1027, 1036, 1048, 1069, 1078, 1097, 1101, 1130, 1183, 1315, 1337, 1344->1346, 1389->exit, 1401, 1417, 1454, 1463-1464
src/cos.py             15      0      0      0   100%
src/exceptions.py      17      1      2      1    89%   41
src/types_.py          16      0      0      0   100%
---------------------------------------------------------------
TOTAL                 578     42    174     32    90%

Static code analysis report

Run started:2023-11-16 15:42:34.051995

Test results:
    No issues identified.

Code scanned:
    Total lines of code: 4296
    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):