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
S3 InvalidKeyError when S3 prefix for an Expectation Store is at the top level for the prefix #3054
Comments
I've done some investigation, but only have suggestions on a fix. How to reproduceYour expectations store and validations store in s3 with the same prefix (in code config snippet)
What happens
Finally, The other bug here is that the second key doesn't refer to an expectations suite, but a validation. Possible Fixes
I'm new to the tool and code base, so I'm reluctant to take this further without guidance. Full code to reproduceSome paths and bucket names will need to be updated to match your environment. Code is derived from #2993 but uses the file store from the tutorial:
|
Hi @donaldheppner - thank you so much for this in-depth investigation and thorough explanation! I will bring your three suggestions to our triage meeting next week and discuss them with the team. Then one of us will get back to you, and we can work together on implementing a solution. |
Hi @donaldheppner! Apologies for delays here. After some internal review, we've come to the conclusion that Option 2, from your proposed options, would be the right solution. Option 1 is appealing due its speed, but would break encapsulation (currently we evaluate the Stores separately, and Option 1 would require comparing them). Option 3 seems more roundabout, but I also might not be fully understanding it. Would you be up for making a contribution for this? I'm happy to offer guidance by way of PR review, and also answering questions about our codebase. Please let me know what would work best for you. Thanks! |
Thanks Tal, agreed re: Option 2 -- I'll give it a shot and appreciate the support! |
…tions suite by pulling it from the provided parameters instead
Hi @talagluck, I've implemented option 2 and have existing tests passing; I could use some guidance on where to add new tests (if necessary) as the bug concerns a conflict between stores. Further details are in the commit log. I took the opportunity to introduce some types along the way. Link: https://github.com/donaldheppner/great_expectations/tree/feature/bug_fix_3054 |
… is available instead of discovering keys (listing keys) in existing sources. (#3377) * BUGFIX #3054: Removed the file scan for the expectations suite by pulling it from the provided parameters instead * Updated call to DataContext.store_evaluation_parameters, it was being called with the incorrect arguments * Got unit tests passing defined at data_context/store/test_valuation_parameter_store.py, that rely on a store.list_keys() to pass (this may be another bug, as no files are identified as test fixtures) * Updated changelog * Fixed linting issues from PR * Added unit test to test_store_backends * Test passes * Linted * Lilnted merge Co-authored-by: talagluck <tal@superconductive.com>
Describe the bug
This is describing the bug found in #2993 . With the following error
If you specify the prefix of an ExpectationStore as purely the top level prefix, without a delimiter and another name afterward, this causes a failure, e.g.:
This is the case whether the DataContext is being instantiated from a YAML or from an in-memory config. This may require S3 stores for Validations and DataDocs as well, though when these other stores lack the final word after the delimiter, this error does not occur.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should not be substitution happening between "." and "/" which appears to be causing an error.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: