Repository navigation
Deploy the testing property of pipelines and show remote changes in bundle plan #7438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tharunbhuk-db
wants to merge
2
commits into
tharun/pipelines-test-b3-testing-paths
Choose a base branch
from
tharun/pipelines-test-b4-testing-deploy
base: tharun/pipelines-test-b3-testing-paths
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,2 +1,35 @@ | ||
| title "Relative test paths resolve to the deployed workspace paths" | ||
| trace $CLI bundle validate -o json | jq .resources.pipelines.orders.testing | ||
|
|
||
| title "Deploy sends testing, with the local wheel uploaded" | ||
| trace $CLI bundle deploy | ||
| trace print_requests.py //api/2.0/pipelines --nostamp | jq '{method, path, testing: .body.testing}' | ||
|
|
||
| title "No changes after the deploy" | ||
| trace $CLI bundle plan | ||
| rm "$OUT_REQUESTS" | ||
|
|
||
| title "A remote edit that drops testing shows in the plan" | ||
| PIPELINE_ID=$(read_id.py orders) | ||
| MSYS_NO_PATHCONV=1 $CLI api get "/api/2.0/pipelines/$PIPELINE_ID" | jq '.spec | del(.testing)' > edit.json | ||
| MSYS_NO_PATHCONV=1 $CLI api put "/api/2.0/pipelines/$PIPELINE_ID" --json @edit.json &> LOG.edit | ||
| rm edit.json | ||
| trace $CLI bundle plan -o json | jq '.plan["resources.pipelines.orders"].changes.testing.action' | ||
| trace $CLI bundle deploy | ||
| trace $CLI bundle plan | ||
| rm "$OUT_REQUESTS" | ||
|
|
||
| title "Changing testing updates the pipeline" | ||
| trace update_file.py databricks.yml './tests/**' './tests/unit/**' | ||
| trace $CLI bundle plan | ||
| trace $CLI bundle deploy | ||
| trace print_requests.py //api/2.0/pipelines --nostamp | jq '{method, path, sources: .body.testing.sources}' | ||
|
|
||
| title "Removing testing sends an update without it" | ||
| update_file.py databricks.yml "$(sed -n '/^ testing:/,$p' databricks.yml)" "" | ||
| trace $CLI bundle plan | ||
| trace $CLI bundle deploy | ||
| trace print_requests.py //api/2.0/pipelines --nostamp | jq '{method, path, has_testing: (.body | has("testing"))}' | ||
|
|
||
| trace $CLI bundle destroy --auto-approve | ||
| rm "$OUT_REQUESTS" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to double check: on dogfood, did
bundle planshow 0 changes right after deploying a pipeline withtesting? The description covers existing pipelines and removing it, but the fake server echoes the body back, so it can't tell us whether the backend normalizesglob.includeor the-e /Workspace/...[test]dependency on read.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Pranshu checked it on a real workspace (see his review on #7300): after a deploy with
testing, the next plan showed 0 changes. The fake server cannot show this, as you say.