Some post_import messages should not be errors #4234
Merged
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.
The problem we're trying to solve:
The user might see a lot of errors during post-processing, for resources which don't have data dictionaries.
It's totally OK for resources to not have data dictionaries associated with them, so it should not be an error. However, it should show up in an import log and the import status dashboard because this still might be unexpected... The user might think the resource should have a data dictionary.
Our solution:
ResourceDoesNotHaveDictionary
. This is thrown whenDictionaryEnforcer
can't find a dictionary for the given resource. This allows us to handle this situation differently than a genericException
.PostImportResourceProcessor
now handles theResourceDoesNotHaveDictionary
exception as a special case, so it can tell the user that it couldn't find a dictionary for that resource.QA:
Helpful script:
You should see messages like this:
You should then also see a message like this in the dataset import status dashboard: