Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPE-2994] No more relational databag usage #164

Conversation

juditnovak
Copy link
Contributor

Overview

This PR is addressing issue #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.

@weiiwang01
Copy link
Collaborator

/canonical/self-hosted-runners/run-workflows e2a1c83

Copy link
Contributor

Test coverage for e2a1c83

Name                Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------
src/charm.py          533     41    172     31    89%   184-187, 379-380, 580, 611, 617, 662, 697-698, 749-756, 761, 863->868, 867, 869, 874-875, 935, 953, 960, 1050, 1059, 1071, 1092, 1101, 1120, 1124, 1153, 1206, 1338, 1360, 1367->1369, 1412->exit, 1424, 1440, 1477, 1486-1487
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                 581     42    174     32    90%

Static code analysis report

Run started:2023-11-14 14:15:17.157053

Test results:
  No issues identified.

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

@juditnovak juditnovak marked this pull request as ready for review November 16, 2023 08:00
@juditnovak juditnovak requested a review from a team as a code owner November 16, 2023 08:00
Copy link
Collaborator

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@juditnovak juditnovak marked this pull request as draft November 16, 2023 10:35
@juditnovak
Copy link
Contributor Author

The PR was merged on the base repository directly

@juditnovak juditnovak closed this Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants