-
Notifications
You must be signed in to change notification settings - Fork 10
Marshalling scenarios #240
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
Open
ericvergnaud
wants to merge
33
commits into
main
Choose a base branch
from
marshalling-scenarios
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
…-scenarios * support-marshalling-of-object-and-any: fix unmarshalling of raw dict fix unmarshalling of raw list
…-scenarios * support-marshalling-of-object-and-any: fix marshalling of None fix marshalling of None # Conflicts: # src/databricks/labs/blueprint/installation.py
✅ 40/40 passed, 2 skipped, 1m55s total Running from acceptance #298 |
…-scenarios * support-marshalling-of-object-and-any: formatting fix incorrect test fix crasher with union type handle invalid conversion # Conflicts: # src/databricks/labs/blueprint/installation.py
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.
@gueniai
The purpose of the PR is to demonstrate that support for weak typing (a fundamental feature of Python!) is a required feature when storing configs, by providing support for real life scenarios. The concern was raise as part of #189
To that end, this PR:
Installation.py
to dynamically support or not support raw typing and weak typingWhen running the
test_marshalling_scenarios.py
locally, you'll notice that:I don't think it's realistic to expect that developers get things right upfront, we should therefore support their progress towards strict typing. That's how these features ended up here in the first place (I couldn't figure out a way to specify a recursive type for JSON), so it's very likely to happen again and again.
More importantly, it is quite likely that we will encounter scenarios where the data to be stored comes from a source we don't control, and it just needs to be passed through, see
test_dynamic_config_data
.Finally, and critically, I also know from experience that as a team we will encounter orphan data, i.e. data that somehow got there, but the how is lost. Support for weak types is key to rapid resolution.
I am yet to see a scenario where supporting this would cause problems in the future, rather the opposite.
Hopefully this is convincing enough to force merge #189 (the PR is already approved, 'force' is only required because some pre-existing code does not pass the 'no-cheat' check, all other checks are green)
@sundarshankar89 FYI