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

Fix editing a locked db #258

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Fix editing a locked db #258

merged 2 commits into from
Aug 22, 2023

Conversation

PiispaH
Copy link
Collaborator

@PiispaH PiispaH commented Aug 17, 2023

In a locked db if existing values are updated, the changes are stored in the cache and can be committed when the db is no longer locked. Removing items also works the same way. Adding items to a locked db is denied and will result in an error. If trying to commit changes in the db while it is locked an error telling the commit failed pops up. When the lock is resolved the changes can again be committed.

Re spine-tools/Spine-Toolbox#2201

Checklist before merging

  • Documentation (also in Toolbox repo) is up-to-date
  • Release notes in Toolbox repo have been updated
  • Unit tests have been added/updated accordingly
  • Code has been formatted by black
  • Unit tests pass

In a locked db if existing values are updated, the changes
are stored in the cache and can be committed when the db is
no longer locked. Removing items also works the same way.
Adding items to a locked db is denied and will result in
an error. If trying to commit changes in the db while it
is locked an error telling the commit failed pops up. When
the lock is resolved the changes can again be committed.

Re spine-tools/Spine-Toolbox#2201
@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2023

Codecov Report

Patch coverage: 44.82% and project coverage change: -0.09% ⚠️

Comparison is base (bd337e8) 75.43% compared to head (189eac0) 75.34%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #258      +/-   ##
==========================================
- Coverage   75.43%   75.34%   -0.09%     
==========================================
  Files          76       76              
  Lines       10921    10941      +20     
  Branches     2378     2378              
==========================================
+ Hits         8238     8244       +6     
- Misses       2243     2257      +14     
  Partials      440      440              
Files Changed Coverage Δ
spinedb_api/db_mapping_add_mixin.py 77.35% <27.27%> (-1.58%) ⬇️
spinedb_api/db_mapping_remove_mixin.py 95.53% <50.00%> (-1.07%) ⬇️
spinedb_api/db_mapping_commit_mixin.py 69.23% <55.55%> (-4.11%) ⬇️
spinedb_api/db_mapping_update_mixin.py 78.60% <60.00%> (-0.61%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# Conflicts:
#	spinedb_api/db_mapping_remove_mixin.py
@soininen soininen merged commit 382a2ec into master Aug 22, 2023
@soininen soininen deleted the issue_2201_editing_locked_db branch August 22, 2023 10:47
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.

3 participants