Repository navigation
Conversation
…downloaded Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Regression test report ✅Commit: Selected 1 changed tests (limit=20, 0 not selected) 2 tests: regression=2 unreleased=0 coverage=0 failing=0
TestAccept/bundle/generate/pipeline_empty_root_path/DMS=: branch ✅ | main (21589ba) ❌ | latest (v1.28.0) ❌main (21589ba): latest (v1.28.0): TestAccept/bundle/generate/pipeline_empty_root_path/DMS=true: branch ✅ | main (21589ba) ❌ | latest (v1.28.0) ❌main (21589ba): latest (v1.28.0): |
✅ Integration test reportCommit: 12670a6
Top 3 slowest tests (at least 2 minutes):
|
There was a problem hiding this comment.
Automated review at 12670a6. Each finding was verified against the code.
No blocking issues found.
This PR makes bundle generate pipeline create the root_path source directory after FlushToDisk, so a pipeline whose workspace root folder has no files now produces a bundle that passes bundle validate. The guard is the same one used to mark the root path for download, it matches the existing fix in app.go, and the updated acceptance test covers the empty-folder case. One thing I checked and set aside: if the YAML already exists and --force isn't set, the command can leave an empty src/pl behind. That's harmless, FlushToDisk already writes files at that point, and app.go behaves the same way. I found no defects that should block the merge.
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Opus 5.5 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
No issues found.
Changes
bundle generate pipelinefor a pipeline withroot_pathnow creates the source directory after downloading. Before, it was only created as a side effect of downloading files. So for aroot_paththat is an empty workspace folder, the generated config pointed at a directory that did not exist, andbundle validatefailed withstat src/pl: no such file or directory.This uses the same fix as #8244 for
bundle generate app: oneos.MkdirAll(sourceDir)afterFlushToDisk, only when the pipeline has aroot_path. Pipelines withoutroot_pathdon't getroot_pathin the generated config and don't need the directory, so they are unchanged.Stacked on #8287 (the test recording the bug). Review this PR's own commit only, or wait for #8287 to merge.
Why
The generated bundle should load without manual fixes. A newly created Lakeflow pipeline whose root folder has no files yet is a realistic input.
This PR was created by analyzing coverage gaps.
Coverage: http://go/cli/dashboard/coverage/file/cmd/bundle/generate/pipeline.go (
NewGeneratePipelineCommand, theRootPath != ""branch around lines 91-96).Tests
acceptance/bundle/generate/pipeline_empty_root_path(added in #8287) now showssrc/plcreated andValidation OK!, and its Badness is removed. Otherbundle/generatepipeline tests pass unchanged (pipeline,lakeflow_pipelines,pipeline_with_glob,pipeline_and_deploy,auto-bind).Gaps and risks
MkdirAllon an existing directory does nothing, so re-running generate over an existingsrc/is unaffected.Reviewed by an AI agent (gpt-6-2-astra, high effort): no findings.
🤖 AI agent (author claude-opus-5-5, review gpt-6-2-astra, isaac_claude)
This pull request and its description were written by Isaac.