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-41165: Inconsistent handling of expanded datasetRefs #895

Merged
merged 2 commits into from
Oct 18, 2023

Commits on Oct 18, 2023

  1. Document Registry._importDatasets at appropriate level of abstraction.

    The previous documentation implied that _importDatasets requires
    expanded data IDs in a specific context, when implementations can and
    do assume expanded IDs for a variety of reasons. In particular, the
    introduction of optional ObsCore makes Registry a tagged class, so two
    instances of the same Registry implementation can now behave
    very differently.
    
    Removing the misleading context will prevent developers from trying to
    make implementation- or instance-dependent optimizations when calling
    the Registry interface, improving the stability of future code.
    kfindeisen committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    254389c View commit details
    Browse the repository at this point in the history
  2. Allow non-expanded datasetRefs in DirectButler.transfer_from.

    Previously, transfer_from did not impose requirements on dataset refs,
    but set a flag on _importDatasets that (per its docs) should only have
    been set if the caller could guarantee expanded datasetRefs.
    
    This commit keeps the open-ended precondition on transfer_from, and
    allows internal expansion instead. This should be a no-op if the input
    datasetRefs are already expanded. The expand flag is left at its
    default instead of being explicitly set to True to give _importDatasets
    ultimate control over expansion (e.g., in case it no longer requires
    expanded IDs in the future).
    kfindeisen committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    2eae16f View commit details
    Browse the repository at this point in the history