-
Notifications
You must be signed in to change notification settings - Fork 113
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
Invoke validations from import executor #1141
base: master
Are you sure you want to change the base?
Conversation
70e507b
to
bc84404
Compare
# Invoke validations before upload. | ||
invoke_import_validation: bool = True | ||
# Import validation config file. | ||
validation_config_file: str = 'tools/validation/config.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we call this validation_config.json?
There are a lot of config.json files in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
mcf_path) + '.old' | ||
differ_results_path = os.path.join(absolute_import_dir, 'results') | ||
config_file_path = os.path.join(absolute_import_dir, | ||
self.config.validation_config_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be an import specific validation config declared in the manifest.json and default to config.validation_config_file if not declared?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I have added a conditional assignment to check for it in the import spec first, else use the default value from the config
previous_data_path, | ||
'--output_location=' + | ||
differ_results_path) | ||
process = _run_user_script( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call the differ module directly instead of a process?
) | ||
else: | ||
# Run import script locally. | ||
script_interpreter = _get_script_interpreter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls retain this as the interpreter path changes for imports using shell scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is not removed..it's just refactored out into a separate function
@@ -111,6 +111,12 @@ class ExecutorConfig: | |||
user_script_args: List[str] = () | |||
# Environment variables for the user script | |||
user_script_env: dict = None | |||
# Skip uploading the data to GCS (for local testing). | |||
skip_gcs_upload: bool = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we turn this to False in the config_overrides.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed this flag from this PR
# Skip uploading the data to GCS (for local testing). | ||
skip_gcs_upload: bool = True | ||
# Invoke validations before upload. | ||
invoke_import_validation: bool = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep this as False until we add call to dc-import so the previous version of MCF is stored in GCS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
No description provided.