-
Notifications
You must be signed in to change notification settings - Fork 167
Replace old Spark Jar integration tests with an acceptance test #5191
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
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
26 changes: 26 additions & 0 deletions
26
acceptance/bundle/deploy/spark-jar-task/databricks.yml.tmpl
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| bundle: | ||
| name: spark-jar-task-$UNIQUE_NAME | ||
|
|
||
| artifacts: | ||
| my_java_code: | ||
| path: ./myjar | ||
| build: "javac PrintArgs.java && jar cvfm PrintArgs.jar META-INF/MANIFEST.MF PrintArgs.class" | ||
| files: | ||
| - source: ./myjar/PrintArgs.jar | ||
|
|
||
| resources: | ||
| jobs: | ||
| jar_job: | ||
| name: "[${bundle.target}] Test Spark Jar Job $UNIQUE_NAME" | ||
| tasks: | ||
| - task_key: TestSparkJarTask | ||
| new_cluster: | ||
| num_workers: 1 | ||
| spark_version: 16.4.x-scala2.12 | ||
| node_type_id: $NODE_TYPE_ID | ||
| instance_pool_id: $TEST_INSTANCE_POOL_ID | ||
| data_security_mode: NONE | ||
| spark_jar_task: | ||
| main_class_name: PrintArgs | ||
| libraries: | ||
| - jar: ./myjar/PrintArgs.jar | ||
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
|
|
||
| >>> [CLI] bundle deploy | ||
| Building my_java_code... | ||
| Uploading myjar/PrintArgs.jar... | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/spark-jar-task-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| >>> [CLI] bundle run jar_job | ||
| Run URL: [DATABRICKS_URL]/?o=[NUMID]#job/[NUMID]/run/[NUMID] | ||
|
|
||
| [TIMESTAMP] "[default] Test Spark Jar Job [UNIQUE_NAME]" RUNNING | ||
| [TIMESTAMP] "[default] Test Spark Jar Job [UNIQUE_NAME]" TERMINATED SUCCESS | ||
| Hello from Jar! | ||
| [] | ||
| >>> [CLI] bundle destroy --auto-approve | ||
| The following resources will be deleted: | ||
| delete resources.jobs.jar_job | ||
|
|
||
| All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/spark-jar-task-[UNIQUE_NAME]/default | ||
|
|
||
| Deleting files... | ||
| Destroy complete! |
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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| envsubst < databricks.yml.tmpl > databricks.yml | ||
| trap "errcode trace '$CLI' bundle destroy --auto-approve" EXIT | ||
| trace $CLI bundle deploy | ||
| trace $CLI bundle run jar_job |
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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| Local = true | ||
| Cloud = true | ||
| EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] | ||
|
|
||
| Ignore = [ | ||
| 'myjar/PrintArgs.jar', | ||
| 'myjar/PrintArgs.class', | ||
| ] | ||
|
|
||
| [[Server]] | ||
| Pattern = "GET /api/2.2/jobs/runs/get-output" | ||
| Response.Body = ''' | ||
| { | ||
| "run_id": 1234567890, | ||
| "logs": "Hello from Jar!\n[]" | ||
| } | ||
| ''' |
33 changes: 0 additions & 33 deletions
33
integration/bundle/bundles/spark_jar_task/databricks_template_schema.json
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
integration/bundle/bundles/spark_jar_task/template/databricks.yml.tmpl
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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.
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.
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.
question - do we specifically want to test javac there or can we add a jar directly and then remove JDK requirement from our test suite and github workflows?
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.
We want to make sure here that building with artifacts section actually works, that it produce the artifacts which we can later correctly reference on