-
Notifications
You must be signed in to change notification settings - Fork 37
Extend Support for Dependency Management #1512
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: feature/synapse-cred-configuration
Are you sure you want to change the base?
Extend Support for Dependency Management #1512
Conversation
❌ 13/15 passed, 2 failed, 1 skipped, 51s total ❌ test_run_python_dep_failure_pipeline: assert 'Script execution failed' in "Failed to install dependencies: ERROR: Invalid requirement: 'databricks_labs_ucx=0.1.0': Expected end or semicolon (after name and no valid version specifier)\n databricks_labs_ucx=0.1.0\n ^\nHint: = is not a valid operator. Did you mean == ?\n" (13.035s)
❌ test_run_pipeline: AssertionError: Step usage_2 failed with status SKIPPED (22.897s)
Running from acceptance #570 |
@@ -60,6 +71,12 @@ def test_run_python_failure_pipeline(extractor, python_failure_config, get_logge | |||
pipeline.execute() | |||
|
|||
|
|||
def test_run_python_dep_failure_pipeline(extractor, pipeline_dep_failure_config, get_logger): |
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 think it makes sense to fail the entire Step if one of the dependencies cannot be installed. Out of curiosity, do you think that this should fail the entire Pipeline execution run too?
@@ -26,3 +26,6 @@ steps: | |||
mode: overwrite | |||
frequency: daily | |||
flag: active | |||
dependencies: | |||
- pandas | |||
- duckdb |
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.
Maybe we can add a test for a dependency with a version specified as well?
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 me check.
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.
PR looks great! I really like this design a lot. Added a few comments around runtime exceptions and also I think you may have left a debugging statement in. Other than that, I think this PR is ready to ship.
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.
Looking good, I've left a few comments for consideration.
One thing I considered was whether we should skip the virtual environment if there aren't any dependencies, but it turns out that this also avoids a quirk prior to this PR where you don't know exactly what python
refers to when executing a step. (And now we do.)
except json.JSONDecodeError: | ||
logging.info(f"Python script output: {result.stdout}") | ||
|
||
except CalledProcessError as e: |
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.
It looks like upon failure we drop anything that was written to stdout. Do you think it's useful to log that?
@@ -22,6 +22,17 @@ def pipeline_config(): | |||
return config | |||
|
|||
|
|||
@pytest.fixture(scope="module") |
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'm curious about why this is needed?
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.
you mean the scope variable?
…o feature/pipeline_extensions
Extend Support for Dependency Management while executing pipeline with python file.