-
Notifications
You must be signed in to change notification settings - Fork 72
Fix deploy reconcile jobs #2039
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
Merged
+68
−38
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7bdcf78
fix link
m-abulazm c70e43a
fix package name in recon job deployments
m-abulazm bca62f1
improve parsing of package name
m-abulazm 5adbe66
remove validation
m-abulazm f97b442
fmt
m-abulazm 410acff
Merge branch 'main' into bug/recon/fix-runner
m-abulazm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ def test_deploy_new_job(oracle_recon_config): | |
product_info = ProductInfo.from_class(LakebridgeConfiguration) | ||
name = "Recon Job" | ||
job_deployer = JobDeployment(workspace_client, installation, install_state, product_info) | ||
job_deployer.deploy_recon_job(name, oracle_recon_config, "remorph-x.y.z-py3-none-any.whl") | ||
job_deployer.deploy_recon_job(name, oracle_recon_config, "lakebridge-x.y.z-py3-none-any.whl") | ||
workspace_client.jobs.create.assert_called_once() | ||
assert install_state.jobs[name] == str(job.job_id) | ||
|
||
|
@@ -80,7 +80,7 @@ def test_deploy_existing_job(snowflake_recon_config): | |
install_state = InstallState.from_installation(installation) | ||
product_info = ProductInfo.for_testing(LakebridgeConfiguration) | ||
job_deployer = JobDeployment(workspace_client, installation, install_state, product_info) | ||
job_deployer.deploy_recon_job(name, snowflake_recon_config, "remorph-x.y.z-py3-none-any.whl") | ||
job_deployer.deploy_recon_job(name, snowflake_recon_config, "lakebridge-x.y.z-py3-none-any.whl") | ||
workspace_client.jobs.reset.assert_called_once() | ||
assert install_state.jobs[name] == str(job.job_id) | ||
|
||
|
@@ -96,6 +96,27 @@ def test_deploy_missing_job(snowflake_recon_config): | |
install_state = InstallState.from_installation(installation) | ||
product_info = ProductInfo.for_testing(LakebridgeConfiguration) | ||
job_deployer = JobDeployment(workspace_client, installation, install_state, product_info) | ||
job_deployer.deploy_recon_job(name, snowflake_recon_config, "remorph-x.y.z-py3-none-any.whl") | ||
job_deployer.deploy_recon_job(name, snowflake_recon_config, "lakebridge-x.y.z-py3-none-any.whl") | ||
workspace_client.jobs.create.assert_called_once() | ||
assert install_state.jobs[name] == str(job.job_id) | ||
|
||
|
||
def test_parse_package_name(): | ||
m-abulazm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
workspace_client = create_autospec(WorkspaceClient) | ||
installation = MockInstallation(is_global=False) | ||
install_state = InstallState.from_installation(installation) | ||
product_info = ProductInfo.from_class(LakebridgeConfiguration) | ||
job_deployer = JobDeployment(workspace_client, installation, install_state, product_info) | ||
|
||
assert job_deployer.parse_package_name("lakebridge-1.2.3-py3-none-any.whl") == "lakebridge" | ||
assert job_deployer.parse_package_name("remorph-1.2.3-py3-none-any.whl") == "databricks_labs_lakebridge" | ||
assert ( | ||
job_deployer.parse_package_name("databricks_labs_lakebridge-1.2.3-py3-none-any.whl") | ||
== "databricks_labs_lakebridge" | ||
) | ||
assert ( | ||
job_deployer.parse_package_name( | ||
"/Workspace/Users/[email protected]/.lakebridge/wheels/databricks_labs_lakebridge-0.10.7-py3-none-any.whl" | ||
) | ||
== "databricks_labs_lakebridge" | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.