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-37703: Deprecate unresolved refs #821

Merged
merged 12 commits into from Apr 19, 2023
Merged

DM-37703: Deprecate unresolved refs #821

merged 12 commits into from Apr 19, 2023

Conversation

timj
Copy link
Member

@timj timj commented Apr 14, 2023

Warnings do come from tests -- the test code is testing unresolved refs for a reason. I have not gone through every test to decide if something can be replaced with a resolved ref. I have changed the DatasetRef constructor so that it now creates an id if called with just a run.

Checklist

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

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Patch coverage: 93.69% and no project coverage change.

Comparison is base (0d47789) 87.76% compared to head (08f06b3) 87.77%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #821   +/-   ##
=======================================
  Coverage   87.76%   87.77%           
=======================================
  Files         268      268           
  Lines       34975    35007   +32     
  Branches     7355     7368   +13     
=======================================
+ Hits        30696    30727   +31     
+ Misses       3125     3122    -3     
- Partials     1154     1158    +4     
Impacted Files Coverage Δ
python/lsst/daf/butler/registries/remote.py 80.30% <ø> (-0.10%) ⬇️
python/lsst/daf/butler/registry/__init__.py 100.00% <ø> (ø)
python/lsst/daf/butler/registry/_registry.py 94.40% <ø> (-0.04%) ⬇️
python/lsst/daf/butler/tests/_datasetsHelper.py 88.52% <ø> (-0.37%) ⬇️
tests/test_server.py 96.15% <ø> (-0.05%) ⬇️
python/lsst/daf/butler/core/datasets/ref.py 84.93% <89.39%> (+0.49%) ⬆️
python/lsst/daf/butler/__init__.py 100.00% <100.00%> (ø)
python/lsst/daf/butler/_butler.py 77.82% <100.00%> (+0.16%) ⬆️
python/lsst/daf/butler/registries/sql.py 84.29% <100.00%> (ø)
.../butler/registry/datasets/byDimensions/_manager.py 93.65% <100.00%> (ø)
... and 11 more

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

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, few minor questions.

doc/changes/DM-37703.api.md Outdated Show resolved Hide resolved
python/lsst/daf/butler/_butler.py Outdated Show resolved Hide resolved
python/lsst/daf/butler/core/datasets/ref.py Outdated Show resolved Hide resolved
python/lsst/daf/butler/core/datasets/ref.py Outdated Show resolved Hide resolved
"Support for creating unresolved refs will soon be removed. Please contact the "
"middleware team for advice on modifying your code to use resolved refs.",
category=UnresolvedRefWarning,
stacklevel=2, # _find_outside_stacklevel(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I'm supposed to remove the "2". I used the 2 for testing daf_butler so I could see whether things were coming from but failed to put it back to use the right code to find the outside level -- that explains why my ci_hsc_gen3 testing is full of reports about using ref.py and I was surprised it wasn't telling me the real calling location outside of butler.

@timj timj force-pushed the tickets/DM-37703 branch 3 times, most recently from 6863f53 to d94f706 Compare April 19, 2023 17:18
timj added 11 commits April 19, 2023 14:28
They did not need to use unresolved refs so easier to fix
them and get rid of the warning.
Sometimes the warnings are ignored, and in some places
we use a resolved ref.
We now require UUID dataset IDs and registry no longer needs
to be the source of truth. We would like to be able to
create IDs as part of DatasetRef construction and circular
dependencies suggest that it's easier to move the code
out of registry.
We want to ensure that when butler issues an unresolved ref
warning that it looks like it comes from user code and
not butler internals.
@timj timj merged commit 634aed3 into main Apr 19, 2023
13 checks passed
@timj timj deleted the tickets/DM-37703 branch April 19, 2023 22:33
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