Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vish-cs
Copy link
Contributor

@vish-cs vish-cs commented Dec 16, 2024

No description provided.

@vish-cs vish-cs assigned vish-cs and unassigned n-h-diaz Dec 16, 2024
@vish-cs vish-cs marked this pull request as draft December 16, 2024 08:58
@vish-cs vish-cs force-pushed the executor branch 3 times, most recently from 70e507b to bc84404 Compare December 16, 2024 14:26
@vish-cs vish-cs marked this pull request as ready for review January 2, 2025 13:51
# Invoke validations before upload.
invoke_import_validation: bool = True
# Import validation config file.
validation_config_file: str = 'tools/validation/config.json'
Copy link
Contributor

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.

Copy link
Contributor Author

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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(
Copy link
Contributor

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(
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants