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-38210: Make butler.get act like getDirect and deprecate getDirect #797
Conversation
@TallJimbo can you take a quick look at this to see if it matches your expectations? Obviously a lot of the checks for |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #797 +/- ##
==========================================
+ Coverage 87.64% 87.69% +0.04%
==========================================
Files 267 267
Lines 34706 34700 -6
Branches 7294 7299 +5
==========================================
+ Hits 30417 30429 +12
+ Misses 3136 3117 -19
- Partials 1153 1154 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in terms of behavior, but I'd like to handle the signatures in LimitedButler
slightly differently.
datasetExistsDirect
should probably also go away, and the getURI[s]
are probably worth a look to see if they need modifications (my recollection is that they already have behavior consistent with the new get
behavior, but I'm not sure).
This begs the question of whether we are "fixing" I assume |
👍 to removing What to do about So I think our best bet is to give the |
01a7aaa
to
18c5c46
Compare
38e9196
to
aa7e0f1
Compare
d5f484e
to
f97bad1
Compare
returned by this method. By default the returned type matches | ||
the dataset type definition for this dataset. Specifying a | ||
read `StorageClass` can force a different type to be returned. | ||
This type must be compatible with the original type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not have a storageClass
argument here, since the caller can override the registry storage class via ref.datasetType.storageClass
already and I think that makes it more confusing than convenient (especially since right now LimitedButler
mostly exists just for task execution and that doesn't use this parameter at all). I think that argument is even more applicable to Datastore.get
, since that really isn't in need of convenience functionality since only butler should call it, but that may be out of scope for this ticket.
To be clear, I do think it's worth having a storageClass
parameter to full Butler.get
, since there it's very convenient when not passing a DatasetRef
, and then since it'll present anyway it might as well further override what's in the ref when a DatasetRef
is passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main argument for keeping it is that it's forwarded directly to datastore and datastore will use it and treat it as the priority. It seems odd to declare that the base class can't support the parameter even when it can.
We now want a resolved DatasetRef to work with butler.get without doing registry lookup. Also change the LimitedButler to add a .get(). .getDirect and deferred form are now deprecated.
Now that registry is not checked by default with _findDatasetRef.
Butler.get is allowed to define more flexible interface that is consistent with the base class, but the base class no longer has to support registry queries.
This has long been replaced with removeRuns and removeCollection and we should have deleted it in DM-37534.
Co-authored-by: Jim Bosch <jbosch@astro.princeton.edu>
We now want a resolved DatasetRef to work with butler.get without doing registry lookup. Also change the LimitedButler to add a .get(). .getDirect and deferred form are now deprecated.
Checklist
doc/changes