fix(providers): make exporter de-registration explicit + the invariant robust#304
Merged
Conversation
…t robust Final-verdict polish on the provider-vs-exporter taxonomy (#300): - odps_standard/__init__ escaped auto-registration only BY ACCIDENT (it exposes two BaseProvider subclasses, so the single-subclass fallback skips it). Set __fluid_no_autoregister__ = True explicitly, matching odcs; also set it on odps/__init__ (belt-and-suspenders even though it exposes no subclass) so all three exporter packages opt out the same, robust way. - test_no_exporter_providers.py: broaden the non-deploying-apply markers to also catch a refusal via NotImplementedError / 'not implemented' (so a future exporter can't slip past with different wording), and add a consistency guard asserting every exporter package sets __fluid_no_autoregister__ — VERIFIED it fails if the flag is removed. No behaviour change: live registry still = aws/datamesh_manager/gcp/local/ redshift/snowflake (no exporter), all exporters still importable. 29 passed; ruff + black==24.10.0 clean.
📄 Documentation ReminderThis PR appears to be missing a documentation reference. Our docs live in a separate repo. Please update the PR description with one of:
See the Contributing Guide for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final-verdict polish on the provider-vs-exporter taxonomy (#300). The adversarial review flagged two consistency gaps:
odps_standardescaped auto-registration only by accident — it exposes twoBaseProvidersubclasses, so the single-subclass fallback skips it. Now sets__fluid_no_autoregister__ = Trueexplicitly (matchingodcs); also set onodpsso all three exporter packages opt out the same robust way.NotImplementedError. Broadened the markers to cover that, and added a consistency guard asserting every exporter package sets the opt-out — verified it fails when the flag is removed.No behaviour change: live registry still =
aws/datamesh_manager/gcp/local/redshift/snowflake(no exporter), all exporters still importable. 29 passed; ruff +black==24.10.0clean.