Skip to content

Test generate --bind after deploying jobs and pipelines - #7227

Open
shreyas-goenka wants to merge 3 commits into
mainfrom
shreyas-goenka_data/shreyas/generate-bind-acceptance
Open

shreyas-goenka wants to merge 3 commits into
mainfrom
shreyas-goenka_data/shreyas/generate-bind-acceptance

Conversation

@shreyas-goenka

@shreyas-goenka shreyas-goenka commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Extend the existing auto-bind test to generate and bind both a job and a pipeline using the same notebook fixture, then deploy, unbind, and regenerate both. Only the auto-bind script and its snapshot change.

Stacked on #7219.

Tests

Previously we did not have coverage for generate --bind AFTER a deployment. This PR adds that coverage. Came up here: #7219 (review)

@github-actions github-actions Bot added the DABs DABs related issues label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 5e7a8cab7 | Workflow run

Regression test report

Selected 1 changed tests (limit=20, 0 not selected)

2 tests: regression=0 unreleased=1 coverage=1 failing=0

test branch main (c48c09c) latest (v1.22.1)
TestAccept/bundle/generate/auto-bind/DMS= ✅ ✅ ✅
TestAccept/bundle/generate/auto-bind/DMS=true ✅ ✅ ❌
TestAccept/bundle/generate/auto-bind/DMS=true: branch ✅ | main (c48c09c) ✅ | latest (v1.22.1) ❌

latest (v1.22.1):

acceptance_test.go:1341: Diff:
        --- bundle/generate/auto-bind/output.txt
        +++ /tmp/TestAcceptbundlegenerateauto-bindDMS=true770620821/002/output.txt
        @@ -13,69 +13,12 @@
         >>> [CLI] bundle generate job --key test_job --existing-job-id [JOB_ID] --config-dir resources --source-dir src --bind
         File successfully saved to src/test.py
         Job configuration successfully saved to resources/test_job.job.yml
        -Successfully bound job with an id '[JOB_ID]'
        +Error: bind is not supported for a bundle target that records deployment history
         
        ->>> [CLI] bundle generate pipeline --key test_pipeline --existing-pipeline-id [PIPELINE_ID] --config-dir resources --source-dir src --bind --force
        -File successfully saved to src/test.py
        -Pipeline configuration successfully saved to resources/test_pipeline.pipeline.yml
        -Successfully bound pipeline with an id '[PIPELINE_ID]'
         
        ->>> ls src/
        -test.py
        -
        ->>> cat resources/test_job.job.yml
        -      name: auto-bind-job-[UNIQUE_NAME]
        -
        ->>> cat resources/test_pipeline.pipeline.yml
        -      name: auto-bind-pipeline-[UNIQUE_NAME]
        -
        -=== Deploy the bound resources:
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/auto-bind-test-[UNIQUE_NAME]/files...
        -Updated jobs.test_job
        -Updated pipelines.test_pipeline
        -Files: 6 uploaded, 0 deleted
        -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged
        -
        -=== Regenerate and bind the deployed resources:
        ->>> [CLI] bundle deployment unbind test_job
        -
        ->>> [CLI] bundle generate job --key test_job --existing-job-id [JOB_ID] --config-dir resources --source-dir src --bind --force
        -File successfully saved to src/test.py
        -Job configuration successfully saved to resources/test_job.job.yml
        -Successfully bound job with an id '[JOB_ID]'
        -
        ->>> [CLI] bundle deployment unbind test_pipeline
        -
        ->>> [CLI] bundle generate pipeline --key test_pipeline --existing-pipeline-id [PIPELINE_ID] --config-dir resources --source-dir src --bind --force
        -File successfully saved to src/test.py
        -Pipeline configuration successfully saved to resources/test_pipeline.pipeline.yml
        -Successfully bound pipeline with an id '[PIPELINE_ID]'
        -
        -=== Destroy the bundle:
        ->>> [CLI] bundle destroy --auto-approve
        -The following resources will be deleted:
        -  delete resources.jobs.test_job
        -  delete resources.pipelines.test_pipeline
        -
        -This action will result in the deletion of the following Lakeflow Spark Declarative Pipelines along with the
        -Streaming Tables (STs) and Materialized Views (MVs) managed by them. Set 'cascade_on_destroy: false' on a pipeline to retain datasets on pipeline deletion:
        -  delete resources.pipelines.test_pipeline
        -
        -All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/auto-bind-test-[UNIQUE_NAME]
        -
        -Destroy: 2 deleted
        -
        -=== Check that resources are bound and do not exist after bundle is destroyed:
        ->>> errcode [CLI] jobs get [JOB_ID] --output json
        -Error: Job [JOB_ID] does not exist.
        -
        -Exit code: 1
        -
        ->>> musterr [CLI] pipelines get [PIPELINE_ID] --output json
        -Error: The specified pipeline [PIPELINE_ID] was not found.
        -
         === Delete the tmp folder:
         >>> [CLI] workspace delete /Workspace/Users/[USERNAME]/python-[UNIQUE_NAME]/test
         
         >>> [CLI] workspace delete /Workspace/Users/[USERNAME]/python-[UNIQUE_NAME]
        +
        +Exit code: 1
        
FAIL

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 5e7a8ca

Run: 40737202863

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 284 15 5:30
✅​ aws-windows-latest-4core-16gb 286 13 4:16
✅​ azure linux-2core-8gb 283 15 5:18
✅​ azure-windows-latest-4core-16gb 285 13 4:24
✅​ gcp linux-2core-8gb 284 15 5:29
✅​ gcp-windows-latest-4core-16gb 286 13 4:51
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:42 gcp-windows-latest-4core-16gb TestAccept
3:36 aws linux-2core-8gb TestAccept
3:32 gcp linux-2core-8gb TestAccept
3:26 azure-windows-latest-4core-16gb TestAccept
3:25 azure linux-2core-8gb TestAccept
3:25 aws-windows-latest-4core-16gb TestAccept

@shreyas-goenka
shreyas-goenka marked this pull request as ready for review October 28, 2026 17:21
@shreyas-goenka
shreyas-goenka requested review from a team as code owners October 28, 2026 17:21
Base automatically changed from shreyas-goenka_data/shreyas/generate-omit-deployment-metadata to main October 28, 2026 17:31
@shreyas-goenka
shreyas-goenka force-pushed the shreyas-goenka_data/shreyas/generate-bind-acceptance branch from 7be13ee to 5e7a8ca Compare October 28, 2026 17:31

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants