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

Use the new database interface for the postgresql relation #79

Merged
merged 32 commits into from
Jul 31, 2023

Conversation

nrobinaubertin
Copy link
Collaborator

@nrobinaubertin nrobinaubertin commented Jul 11, 2023

I created a database.py module alongside the charm.
It uses the new postgresql_client interface.

src/charm.py Outdated Show resolved Hide resolved
metadata.yaml Outdated Show resolved Hide resolved
@nrobinaubertin nrobinaubertin changed the title (DNR) Use the new database interface for the postgresql relation Use the new database interface for the postgresql relation Jul 24, 2023
@nrobinaubertin nrobinaubertin marked this pull request as ready for review July 24, 2023 22:56
@nrobinaubertin nrobinaubertin requested a review from a team as a code owner July 24, 2023 22:56
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/database.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
amandahla
amandahla previously approved these changes Jul 28, 2023
Copy link
Contributor

@amandahla amandahla left a comment

Choose a reason for hiding this comment

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

LGTM

src/database.py Outdated Show resolved Hide resolved
Copy link
Contributor

@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.

Looks great! Minor nitpicks as comments, would it be correct to assume that the stylistic issues are pretty hard to overcome at this stage of the charm?

requirements.txt Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/database.py Show resolved Hide resolved
tests/unit/test_charm.py Show resolved Hide resolved
@github-actions
Copy link
Contributor

Test coverage for 92ed5be

Name              Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------
src/charm.py        242     16     68      7    93%   126, 135, 143, 420-421, 462-464, 507-509, 512->exit, 522->exit, 557-563, 589->exit, 603-604
src/database.py      30      1      8      1    95%   56
-------------------------------------------------------------
TOTAL               272     17     76      8    93%

Static code analysis report

Run started:2023-07-28 13:50:42.417790

Test results:
  No issues identified.

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

Copy link
Contributor

@mthaddon mthaddon left a comment

Choose a reason for hiding this comment

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

LGTM - we'll want to update the docs to direct people to use this new relation and charm, but that can happen as a later step.

Copy link
Contributor

@amandahla amandahla left a comment

Choose a reason for hiding this comment

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

LGTM

@nrobinaubertin nrobinaubertin merged commit a7070c6 into main Jul 31, 2023
20 checks passed
@nrobinaubertin nrobinaubertin deleted the db-interface branch July 31, 2023 14:00
@javierdelapuente javierdelapuente mentioned this pull request Apr 10, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants