Repository navigation
Run pipelines test against the pipeline's testing.sources - #7429
tharunbhuk-db wants to merge 10 commits into
Conversation
|
Commit: Regression test reportSelected 20 changed tests (limit=20, 0 not selected) 24 tests: regression=24 unreleased=0 coverage=0 failing=0
TestAccept/bundle/environments/editable-folder/DMS=: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) TestAccept/bundle/environments/editable-folder/DMS=true: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) TestAccept/bundle/refschema/DMS=: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) TestAccept/bundle/refschema/DMS=true: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=true: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): TestAccept/bundle/resources/pipelines/testing/DMS=: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) TestAccept/bundle/resources/pipelines/testing/DMS=true: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) TestAccept/pipelines/databricks-cli-help: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) TestAccept/pipelines/test/arguments: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) TestAccept/pipelines/test/immutable: branch ✅ | main (688c228) ❌ | latest (v1.25.0) ❌main (688c228): latest (v1.25.0): same output as main (688c228) 13 more failure details omitted, see the full report in the run. |
✅ Integration test reportCommit: 75f2713
Top 3 slowest tests (at least 2 minutes):
|
ed5750c to
75f2713
Compare
75f2713 to
ccdd807
Compare
1fd5e11 to
3af4a58
Compare
2e9b82e to
a149708
Compare
3af4a58 to
7498e1b
Compare
a149708 to
490849a
Compare
The command starts a test-only update of the pipeline named by --pipeline-id and prints its IDs. Selections are workspace paths or paths relative to the pipeline's root_path, and are sent as typed so that the service checks them. --pytest-arg accepts only -k and -m. The command is experimental and runs only with DATABRICKS_CLI_PIPELINES_TEST=true. Co-authored-by: Isaac <no-reply@databricks.com>
In a bundle, the first argument is the pipeline KEY, and relative test selections are local paths that map to their deployed workspace paths. When the first argument is not a pipeline KEY, the error names the bundle's pipelines and shows the working command. Co-authored-by: Isaac <no-reply@databricks.com>
readTestEvents reads every page of an update's events and keeps the test fields that the Go SDK event type does not have. It sends the SDK's ListPipelineEventsRequest and uses the filter of buildPipelineEventFilter. fetchAllPipelineEvents, which pipelines logs and run use, is not changed. testRun collects one result per test case and reports whether the results are complete. The command does not use them yet. Co-authored-by: Isaac <no-reply@databricks.com>
Each finished case prints "<i> of <n> <STATUS> <test ID>", padded with dots to 80 columns, then "[<STATUS> in <s>s]", so the statuses line up while each case prints as it ends. After the run, the details of every failed or errored case follow, then the reason for an incomplete run, and the run ends with "Done. PASSED=… FAILED=… SKIPPED=… ERROR=… TOTAL=…". The command does not use the printer yet. Co-authored-by: Isaac <no-reply@databricks.com>
The command waits for the test-only update, prints each test case as it finishes, then the failure details and a summary line. It exits with code 0 only for a complete run where at least one test ran and none failed or errored, and a completed update that reports a fatal error does not pass. Test IDs are shown relative to the project folder. With the no-wait flag, the command returns after the update starts. The wait takes the steps of the bundle pipeline runner's wait loop. The acceptance tests stub the service per case, as the other pipelines tests do. Co-authored-by: Isaac <no-reply@databricks.com>
--timeout and Ctrl+C end only the local wait and print the command that reads the results later; the update keeps running. That command keeps the KEY or --pipeline-id, --target, --profile and every --var. --resume <update-id> reads the results of an existing test update instead of starting one, and rejects an update that the service reports is not a test update. The signal handler is installed before the update starts, but only the wait listens to it, so a Ctrl+C during Start Update still prints the update ID. The first signal releases the handler, so a second one ends the process. Co-authored-by: Isaac <no-reply@databricks.com>
The report has one testcase per collected test case, named as pytest's JUnit report names it, with its outcome and duration. A case without a final outcome is an error, and a run problem, such as an incomplete run, adds a failing entry. A bracket in a folder name stays part of the path, and the file is replaced atomically so that a reader never sees a partly written report. The command does not write the report yet. Co-authored-by: Isaac <no-reply@databricks.com>
--junit-xml writes one testcase per collected test case, with its outcome and duration; an incomplete run, a run without tests, or a timeout adds a failing entry that names the cause. The report replaces the file on every exit after the flags parse, including the disabled-command error and project errors, so an older report never survives; a flag that cannot be parsed ends the command before it runs. --junit-xml cannot be combined with the no-wait flag, and the printed resume command keeps --junit-xml so that it replaces a partial report. The report line prints before the summary, so the summary stays the last line. Co-authored-by: Isaac <no-reply@databricks.com>
490849a to
6c31046
Compare
Co-authored-by: Isaac <no-reply@databricks.com>
The pipelines test acceptance bundles declare testing, as the service requires testing.sources for a test-only update. When Start Update fails with PIPELINE_TEST_NO_TEST_SOURCES and the bundle sets testing for the pipeline, the error says to deploy first: the bundle changed after its last deploy. Add a live acceptance test that deploys a bundle with testing, including a local test dependency after -e, and runs its tests. Locally it uses stubs for the test run. Against a real workspace it runs only when TEST_PIPELINES_TESTING_ENABLED is set. Co-authored-by: Isaac <no-reply@databricks.com>
7498e1b to
e79333b
Compare
6c31046 to
bbb4adb
Compare
🥞 Stacked PR
Review only the last commit (Run pipelines test against the pipeline's testing.sources). The merge commit before it brings in the pipelines test command stack (#7297 → #7434), so CI can run. When that stack merges, this PR moves to
mainand the merge goes away.pipelines testacceptance bundles declaretesting, as the service requirestesting.sources.PIPELINE_TEST_NO_TEST_SOURCESand the bundle setstesting, the error says to deploy first.testingand a local test dependency after-e, and runs its tests. Locally it uses stubs; on a real workspace it runs only withTEST_PIPELINES_TESTING_ENABLED.PIPELINE_TEST_NO_TEST_SOURCES, so the hint matches the class in the error code or the message.Tests:
TestWithDeployHint; acceptancepipelines/test/no-test-sourcesandpipelines/test/live.This pull request and its description were written by Isaac.