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

Feat: Fixed db migration issues from v3.2.0 to 3.3.0 #287

Merged
merged 17 commits into from
Sep 25, 2024

Conversation

alithethird
Copy link
Contributor

@alithethird alithethird commented Sep 10, 2024

When migrating from v3.2.0 to v3.3.0 we had to drop some triggers by hand. This PR makes it so that the triggers are dropped automagically.

DROP TRIGGER IF EXISTS invites_user_id_readonly ON invites;

DROP TRIGGER IF EXISTS invites_redeemed_at_readonly ON invites;

DROP TRIGGER IF EXISTS user_api_keys_scopes_readonly ON user_api_keys;

Overview

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

@alithethird alithethird self-assigned this Sep 10, 2024
@alithethird alithethird marked this pull request as ready for review September 10, 2024 06:42
@alithethird alithethird requested a review from a team as a code owner September 10, 2024 06:42
arturo-seijas
arturo-seijas previously approved these changes Sep 10, 2024
@alithethird alithethird marked this pull request as draft September 20, 2024 14:11
tests/integration/test_charm.py Outdated Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
tests/integration/test_db_migration.py Show resolved Hide resolved
tests/integration/test_db_migration.py Outdated Show resolved Hide resolved
tests/integration/test_db_migration.py Outdated Show resolved Hide resolved
tests/integration/test_db_migration.py Outdated Show resolved Hide resolved
testing_database/creating-the-testing-database.md Outdated Show resolved Hide resolved
tests/integration/test_db_migration.py Show resolved Hide resolved
tests/integration/test_db_migration.py Show resolved Hide resolved
@alithethird alithethird marked this pull request as ready for review September 24, 2024 13:26
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, thx!

Copy link
Contributor

Test coverage for f26f811

Name              Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------
src/charm.py        373     41     94     15    88%   184, 192-193, 205, 337->345, 378->383, 395, 583-585, 590-591, 603-605, 610-611, 623-625, 648-650, 692->exit, 702->exit, 751-754, 764-765, 789-790, 802-803, 830-832, 834->839, 836-837, 879-880, 896-897, 907->exit, 921
src/database.py      29      1      8      1    95%   56
-------------------------------------------------------------
TOTAL               402     42    102     16    88%

Static code analysis report

Run started:2024-09-24 13:37:14.111560

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 2458
  Total lines skipped (#nosec): 2
  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

@merkata merkata left a comment

Choose a reason for hiding this comment

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

to the moon 🚀

@alithethird alithethird merged commit 6fb3640 into main Sep 25, 2024
20 checks passed
@alithethird alithethird deleted the fix-3.3-db-migration branch September 25, 2024 11:09
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.

5 participants