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

DM-40395: Allow datastore record inserts to use ensure or replace #880

Merged
merged 9 commits into from Aug 18, 2023

Conversation

timj
Copy link
Member

@timj timj commented Aug 16, 2023

This doesn't solve the real problem of the files being overwritten without us knowing whether the datastore records are allowed to be modified but it does give the option.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Patch coverage: 82.41% and project coverage change: -0.01% ⚠️

Comparison is base (3fdd9d0) 87.71% compared to head (93ab5d6) 87.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #880      +/-   ##
==========================================
- Coverage   87.71%   87.70%   -0.01%     
==========================================
  Files         274      274              
  Lines       36117    36195      +78     
  Branches     7553     7575      +22     
==========================================
+ Hits        31680    31746      +66     
- Misses       3264     3272       +8     
- Partials     1173     1177       +4     
Files Changed Coverage Δ
python/lsst/daf/butler/_butler.py 78.86% <0.00%> (-0.22%) ⬇️
python/lsst/daf/butler/tests/_dummyRegistry.py 84.11% <55.55%> (-3.67%) ⬇️
python/lsst/daf/butler/registry/opaque.py 97.22% <75.00%> (-1.31%) ⬇️
python/lsst/daf/butler/datastores/fileDatastore.py 82.24% <80.00%> (-0.17%) ⬇️
...hon/lsst/daf/butler/datastores/genericDatastore.py 94.82% <100.00%> (+0.28%) ⬆️
...on/lsst/daf/butler/datastores/inMemoryDatastore.py 91.75% <100.00%> (+0.04%) ⬆️
...ython/lsst/daf/butler/registry/bridge/ephemeral.py 88.63% <100.00%> (+0.54%) ⬆️
...thon/lsst/daf/butler/registry/bridge/monolithic.py 91.08% <100.00%> (+0.18%) ⬆️
...hon/lsst/daf/butler/registry/interfaces/_bridge.py 89.70% <100.00%> (+0.31%) ⬆️
...n/lsst/daf/butler/registry/interfaces/_database.py 89.80% <100.00%> (+0.20%) ⬆️
... and 3 more

... and 1 file with indirect coverage changes

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

Copy link
Contributor

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Looks good, a couple of minor questions.

python/lsst/daf/butler/datastores/fileDatastore.py Outdated Show resolved Hide resolved
python/lsst/daf/butler/datastores/fileDatastore.py Outdated Show resolved Hide resolved
python/lsst/daf/butler/datastores/fileDatastore.py Outdated Show resolved Hide resolved
tests/test_datastore.py Outdated Show resolved Hide resolved
@timj timj force-pushed the tickets/DM-40395 branch 3 times, most recently from 120c7a2 to c26b00b Compare August 18, 2023 21:05
This should have been done when we removed the support for ingesting
unresolved refs.
…uations

Until we have a coherent way of handling record clashes, for ingest
assume that if UUIDv5 IDs are being used and the file is not
going to be transferred into the datastore, then replacing
existing records is allowable.
This is a questionable change and needs some further thought,
but it is more consistent with what is actually happening and
the chances of a disassembled composite and an assembled
composite clashing are low.
@timj timj merged commit 60b7293 into main Aug 18, 2023
14 of 16 checks passed
@timj timj deleted the tickets/DM-40395 branch August 18, 2023 23:15
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.

None yet

2 participants