Skip to content

acceptance: replace TestGenerateFromExistingJobAndDeploy#5190

Merged
andrewnester merged 4 commits into
mainfrom
add-generate-job-deploy-acceptance
May 11, 2026
Merged

acceptance: replace TestGenerateFromExistingJobAndDeploy#5190
andrewnester merged 4 commits into
mainfrom
add-generate-job-deploy-acceptance

Conversation

@shreyas-goenka

@shreyas-goenka shreyas-goenka commented May 6, 2026

Copy link
Copy Markdown
Contributor

Moves TestGenerateFromExistingJobAndDeploy from integration/ to acceptance/. Acceptance tests are the only path that wires up terraform installs now, so the integration variant can't run end-to-end.

The new test runs the same flow (upload notebook → create job → bundle generate jobbundle deploybundle destroy) on both modes:

  • localupdate: ~5s
  • cloudupdate (azure-prod-ucws, terraform + direct): ~3-4m

Also fixes a Windows path-separator bug in bundle/generate/downloader.go that the new test caught: filepath.Rel returned ..\src\test_notebook.py on Windows, so the generated YAML had OS-native separators. Mirrors the existing filepath.ToSlash pattern in pipeline.go.

This pull request was AI-assisted by Isaac.

We did not have coverage for generate + deploy in our existing tests, that's why I translated it instead.

Covers the same flow as the integration test TestGenerateFromExistingJobAndDeploy
(which is removed in this PR): upload notebook → create job → bundle generate
job → bundle deploy → bundle destroy. Runs on both Local (testserver) and Cloud.

Co-authored-by: Isaac
@shreyas-goenka shreyas-goenka changed the title acceptance: add python_job_and_deploy; remove integration TestGenerateFromExistingJobAndDeploy acceptance: replace TestGenerateFromExistingJobAndDeploy May 6, 2026
@shreyas-goenka shreyas-goenka marked this pull request as ready for review May 6, 2026 10:35
With MSYS_NO_PATHCONV=1 set globally in test.toml, Git Bash on Windows
stops translating the shebang script's path, so python3.exe can't find
add_repl.py / contains.py. Mirror the existing envsubst() pattern in
acceptance/script.prepare and unset MSYS_NO_PATHCONV just for those
calls.

Co-authored-by: Isaac
filepath.Rel produced backslashes on Windows, so `bundle generate job`
wrote `notebook_path: ..\src\test_notebook.py` into the generated YAML.
Apply filepath.ToSlash in markFileForDownload, MarkDirectoryForDownload,
and markNotebookForDownload to match the existing pipeline.go pattern
and the codebase rule that file paths in user-visible output use forward
slashes.

Caught by the new python_job_and_deploy acceptance test on Windows.

Co-authored-by: Isaac
@andrewnester andrewnester merged commit 3bff4ca into main May 11, 2026
22 of 23 checks passed
@andrewnester andrewnester deleted the add-generate-job-deploy-acceptance branch May 11, 2026 10:59
denik pushed a commit that referenced this pull request May 20, 2026
Moves `TestGenerateFromExistingJobAndDeploy` from `integration/` to
`acceptance/`. Acceptance tests are the only path that wires up
terraform installs now, so the integration variant can't run end-to-end.

The new test runs the same flow (upload notebook → create job → `bundle
generate job` → `bundle deploy` → `bundle destroy`) on both modes:
- `localupdate`: ~5s
- `cloudupdate` (azure-prod-ucws, terraform + direct): ~3-4m

Also fixes a Windows path-separator bug in
`bundle/generate/downloader.go` that the new test caught: `filepath.Rel`
returned `..\src\test_notebook.py` on Windows, so the generated YAML had
OS-native separators. Mirrors the existing `filepath.ToSlash` pattern in
`pipeline.go`.

This pull request was AI-assisted by Isaac.

We did not have coverage for generate + deploy in our existing tests,
that's why I translated it instead.

---------

Co-authored-by: Andrew Nester <andrew.nester@databricks.com>
TanishqDatabricks pushed a commit to TanishqDatabricks/cli that referenced this pull request May 22, 2026
…5190)

Moves `TestGenerateFromExistingJobAndDeploy` from `integration/` to
`acceptance/`. Acceptance tests are the only path that wires up
terraform installs now, so the integration variant can't run end-to-end.

The new test runs the same flow (upload notebook → create job → `bundle
generate job` → `bundle deploy` → `bundle destroy`) on both modes:
- `localupdate`: ~5s
- `cloudupdate` (azure-prod-ucws, terraform + direct): ~3-4m

Also fixes a Windows path-separator bug in
`bundle/generate/downloader.go` that the new test caught: `filepath.Rel`
returned `..\src\test_notebook.py` on Windows, so the generated YAML had
OS-native separators. Mirrors the existing `filepath.ToSlash` pattern in
`pipeline.go`.

This pull request was AI-assisted by Isaac.

We did not have coverage for generate + deploy in our existing tests,
that's why I translated it instead.

---------

Co-authored-by: Andrew Nester <andrew.nester@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.

2 participants