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-34884: Disable checks of schema checksums #686

Merged
merged 1 commit into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
Expand Down
9 changes: 1 addition & 8 deletions python/lsst/daf/butler/registry/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
OpaqueTableStorageManager,
StaticTablesContext,
)
from .versions import ButlerVersionsManager, DigestMismatchError
from .versions import ButlerVersionsManager

_Attributes = TypeVar("_Attributes")
_Dimensions = TypeVar("_Dimensions")
Expand Down Expand Up @@ -202,13 +202,6 @@ def loadRepo(self, database: Database) -> RegistryManagerInstances:
# verify that configured versions are compatible with schema
versions.checkManagersConfig()
versions.checkManagersVersions(database.isWriteable())
try:
versions.checkManagersDigests()
except DigestMismatchError as exc:
# potentially digest mismatch is a serious error but during
# development it could be benign, treat this as warning for
# now.
_LOG.warning(f"Registry schema digest mismatch: {exc}")
# Load content from database that we try to keep in-memory.
instances.refresh()
return instances
Expand Down
8 changes: 8 additions & 0 deletions python/lsst/daf/butler/registry/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import logging
from typing import TYPE_CHECKING, Any, Mapping, MutableMapping, Optional

from deprecated.sphinx import deprecated

from .interfaces import VersionedExtension, VersionTuple

if TYPE_CHECKING:
Expand Down Expand Up @@ -316,13 +318,19 @@ def checkManagersVersions(self, writeable: bool) -> None:
f"{storedVersion} for extension {extension.extensionName()}"
)

@deprecated(reason="Schema checksums are ignored", category=FutureWarning, version="v24.0")
def checkManagersDigests(self) -> None:
"""Compare current schema digests with digests stored in database.

Raises
------
DigestMismatchError
Raised if digests are not equal.

Notes
-----
This method is not used currently and will probably disappear in the
future as we remove schema checksums.
"""
if self._attributesEmpty:
return
Expand Down