-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate bundle/tests/undefined_resources_test.go to acceptance test (#…
…2106) Add sort_blocks.py helper to deal with non-determinism.
- Loading branch information
Showing
6 changed files
with
50 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Helper to sort blocks in text file. A block is a set of lines separated from others by empty line. | ||
This is to workaround non-determinism in the output. | ||
""" | ||
import sys | ||
|
||
blocks = [] | ||
|
||
for line in sys.stdin: | ||
if not line.strip(): | ||
if blocks and blocks[-1]: | ||
blocks.append('') | ||
continue | ||
if not blocks: | ||
blocks.append('') | ||
blocks[-1] += line | ||
|
||
blocks.sort() | ||
print("\n".join(blocks)) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Error: experiment undefined-experiment is not defined | ||
at resources.experiments.undefined-experiment | ||
in databricks.yml:11:26 | ||
|
||
Error: job undefined-job is not defined | ||
at resources.jobs.undefined-job | ||
in databricks.yml:6:19 | ||
|
||
Error: pipeline undefined-pipeline is not defined | ||
at resources.pipelines.undefined-pipeline | ||
in databricks.yml:14:24 | ||
|
||
Found 3 errors | ||
|
||
Name: undefined-job | ||
Target: default | ||
|
||
|
||
Exit code: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# We need sort_blocks.py because the order of diagnostics is currently randomized | ||
$CLI bundle validate 2>&1 | sort_blocks.py |
This file was deleted.
Oops, something went wrong.