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

Allow referencing local Python wheels without artifacts section defined #703

Merged
merged 3 commits into from
Aug 28, 2023

Conversation

andrewnester
Copy link
Contributor

Changes

Now if the user reference local Python wheel files and do not specify "artifacts" section, this file will be automatically uploaded by CLI.

Fixes #693

Tests

Added unit tests

Ran bundle deploy for this configuration

resources:
  jobs:
    some_other_job:
      name: "[${bundle.environment}] My Wheel Job"
      tasks:
        - task_key: TestTask
          existing_cluster_id: ${var.job_existing_cluster}
          python_wheel_task:
            package_name: "my_test_code"
            entry_point: "run"
          libraries:
          - whl: ./dist/*.whl

Result

andrew.nester@HFW9Y94129 wheel % databricks bundle deploy
artifacts.whl.AutoDetect: Detecting Python wheel project...
artifacts.whl.AutoDetect: No Python wheel project found at bundle root folder
Starting upload of bundle files
Uploaded bundle files at /Users/andrew.nester@databricks.com/.bundle/wheel-task/default/files!

artifacts.Upload(my_test_code-0.0.1-py3-none-any.whl): Uploading...
artifacts.Upload(my_test_code-0.0.1-py3-none-any.whl): Upload succeeded

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

LGTM bar minor things.

bundle/artifacts/whl/from_libraries.go Outdated Show resolved Hide resolved
bundle/artifacts/whl/from_libraries.go Show resolved Hide resolved
@andrewnester andrewnester added this pull request to the merge queue Aug 28, 2023
Merged via the queue into main with commit 5f6289e Aug 28, 2023
4 checks passed
@andrewnester andrewnester deleted the infer-local-python-wheel branch August 28, 2023 16:38
andrewnester added a commit that referenced this pull request Aug 30, 2023
CLI:
 * Fixed --environment flag ([#705](#705)).

Bundles:
 * Support cluster overrides with cluster_key and compute_key ([#696](#696)).
 * Allow referencing local Python wheels without artifacts section defined ([#703](#703)).
 * Correctly identify local paths in libraries section ([#702](#702)).
 * Fixed path joining in FindFilesWithSuffixInPath ([#704](#704)).
 * Added transformation mutator for Python wheel task for them to work on DBR <13.1 ([#635](#635)).

Internal:
 * Add a foundation for built-in templates ([#685](#685)).
@andrewnester andrewnester mentioned this pull request Aug 30, 2023
andrewnester added a commit that referenced this pull request Aug 30, 2023
Bundles:
 * Support cluster overrides with cluster_key and compute_key ([#696](#696)).
 * Allow referencing local Python wheels without artifacts section defined ([#703](#703)).
 * Fixed --environment flag ([#705](#705)).
 * Correctly identify local paths in libraries section ([#702](#702)).
 * Fixed path joining in FindFilesWithSuffixInPath ([#704](#704)).
 *  Added transformation mutator for Python wheel task for them to work on DBR <13.1 ([#635](#635)).

Internal:
 * Add a foundation for built-in templates ([#685](#685)).
 * Test transform when no Python wheel tasks defined ([#714](#714)).
 * Pin Terraform binary version to 1.5.5 ([#715](#715)).
 * Cleanup after "Add a foundation for built-in templates" ([#707](#707)).
 * Filter down to Python wheel tasks only for trampoline ([#712](#712)).
 * Update Terraform provider schema structs from 1.23.0 ([#713](#713)).
@andrewnester andrewnester mentioned this pull request Aug 30, 2023
github-merge-queue bot pushed a commit that referenced this pull request Aug 30, 2023
Bundles:
* Support cluster overrides with cluster_key and compute_key
([#696](#696)).
* Allow referencing local Python wheels without artifacts section
defined ([#703](#703)).
* Fixed --environment flag
([#705](#705)).
* Correctly identify local paths in libraries section
([#702](#702)).
* Fixed path joining in FindFilesWithSuffixInPath
([#704](#704)).
* Added transformation mutator for Python wheel task for them to work on
DBR <13.1 ([#635](#635)).

Internal:
* Add a foundation for built-in templates
([#685](#685)).
* Test transform when no Python wheel tasks defined
([#714](#714)).
* Pin Terraform binary version to 1.5.5
([#715](#715)).
* Cleanup after "Add a foundation for built-in templates"
([#707](#707)).
* Filter down to Python wheel tasks only for trampoline
([#712](#712)).
* Update Terraform provider schema structs from 1.23.0
([#713](#713)).
lennartkats-db pushed a commit that referenced this pull request Sep 1, 2023
…ed (#703)

## Changes
Now if the user reference local Python wheel files and do not specify
"artifacts" section, this file will be automatically uploaded by CLI.

Fixes #693 

## Tests
Added unit tests

Ran bundle deploy for this configuration
```
resources:
  jobs:
    some_other_job:
      name: "[${bundle.environment}] My Wheel Job"
      tasks:
        - task_key: TestTask
          existing_cluster_id: ${var.job_existing_cluster}
          python_wheel_task:
            package_name: "my_test_code"
            entry_point: "run"
          libraries:
          - whl: ./dist/*.whl
 ```
 
 Result
 
 ```
andrew.nester@HFW9Y94129 wheel % databricks bundle deploy
artifacts.whl.AutoDetect: Detecting Python wheel project...
artifacts.whl.AutoDetect: No Python wheel project found at bundle root folder
Starting upload of bundle files
Uploaded bundle files at /Users/andrew.nester@databricks.com/.bundle/wheel-task/default/files!

artifacts.Upload(my_test_code-0.0.1-py3-none-any.whl): Uploading...
artifacts.Upload(my_test_code-0.0.1-py3-none-any.whl): Upload succeeded
 
 ```
lennartkats-db pushed a commit that referenced this pull request Sep 1, 2023
Bundles:
* Support cluster overrides with cluster_key and compute_key
([#696](#696)).
* Allow referencing local Python wheels without artifacts section
defined ([#703](#703)).
* Fixed --environment flag
([#705](#705)).
* Correctly identify local paths in libraries section
([#702](#702)).
* Fixed path joining in FindFilesWithSuffixInPath
([#704](#704)).
* Added transformation mutator for Python wheel task for them to work on
DBR <13.1 ([#635](#635)).

Internal:
* Add a foundation for built-in templates
([#685](#685)).
* Test transform when no Python wheel tasks defined
([#714](#714)).
* Pin Terraform binary version to 1.5.5
([#715](#715)).
* Cleanup after "Add a foundation for built-in templates"
([#707](#707)).
* Filter down to Python wheel tasks only for trampoline
([#712](#712)).
* Update Terraform provider schema structs from 1.23.0
([#713](#713)).
arpitjasa-db pushed a commit to arpitjasa-db/cli that referenced this pull request Sep 7, 2023
…ed (databricks#703)

## Changes
Now if the user reference local Python wheel files and do not specify
"artifacts" section, this file will be automatically uploaded by CLI.

Fixes databricks#693

## Tests
Added unit tests

Ran bundle deploy for this configuration
```
resources:
  jobs:
    some_other_job:
      name: "[${bundle.environment}] My Wheel Job"
      tasks:
        - task_key: TestTask
          existing_cluster_id: ${var.job_existing_cluster}
          python_wheel_task:
            package_name: "my_test_code"
            entry_point: "run"
          libraries:
          - whl: ./dist/*.whl
 ```

 Result

 ```
andrew.nester@HFW9Y94129 wheel % databricks bundle deploy
artifacts.whl.AutoDetect: Detecting Python wheel project...
artifacts.whl.AutoDetect: No Python wheel project found at bundle root folder
Starting upload of bundle files
Uploaded bundle files at /Users/andrew.nester@databricks.com/.bundle/wheel-task/default/files!

artifacts.Upload(my_test_code-0.0.1-py3-none-any.whl): Uploading...
artifacts.Upload(my_test_code-0.0.1-py3-none-any.whl): Upload succeeded

 ```

Signed-off-by: Arpit Jasapara <arpit.jasapara@databricks.com>
arpitjasa-db pushed a commit to arpitjasa-db/cli that referenced this pull request Sep 7, 2023
Bundles:
* Support cluster overrides with cluster_key and compute_key
([databricks#696](databricks#696)).
* Allow referencing local Python wheels without artifacts section
defined ([databricks#703](databricks#703)).
* Fixed --environment flag
([databricks#705](databricks#705)).
* Correctly identify local paths in libraries section
([databricks#702](databricks#702)).
* Fixed path joining in FindFilesWithSuffixInPath
([databricks#704](databricks#704)).
* Added transformation mutator for Python wheel task for them to work on
DBR <13.1 ([databricks#635](databricks#635)).

Internal:
* Add a foundation for built-in templates
([databricks#685](databricks#685)).
* Test transform when no Python wheel tasks defined
([databricks#714](databricks#714)).
* Pin Terraform binary version to 1.5.5
([databricks#715](databricks#715)).
* Cleanup after "Add a foundation for built-in templates"
([databricks#707](databricks#707)).
* Filter down to Python wheel tasks only for trampoline
([databricks#712](databricks#712)).
* Update Terraform provider schema structs from 1.23.0
([databricks#713](databricks#713)).

Signed-off-by: Arpit Jasapara <arpit.jasapara@databricks.com>
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.

Issue uploading wheel artifact with the bundle deploy command.
2 participants