Skip to content

acceptance: replace TestGenerateFromExistingJobAndDeploy#5190

Open
shreyas-goenka wants to merge 3 commits intomainfrom
add-generate-job-deploy-acceptance
Open

acceptance: replace TestGenerateFromExistingJobAndDeploy#5190
shreyas-goenka wants to merge 3 commits intomainfrom
add-generate-job-deploy-acceptance

Conversation

@shreyas-goenka
Copy link
Copy Markdown
Contributor

@shreyas-goenka shreyas-goenka commented May 6, 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 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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Approval status: pending

/acceptance/bundle/ - needs approval

6 files changed
Suggested: @denik
Also eligible: @pietern, @andrewnester, @anton-107, @janniklasrose, @lennartkats-db

/bundle/ - needs approval

Files: bundle/generate/downloader.go, bundle/generate/downloader_test.go
Suggested: @denik
Also eligible: @pietern, @andrewnester, @anton-107, @janniklasrose, @lennartkats-db

/integration/ - needs approval

Files: integration/bundle/generate_job_test.go
Suggested: @simonfaltum
Also eligible: @renaudhartert-db, @hectorcast-db, @parthban-db, @tanmay-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

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
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.

1 participant