-
Notifications
You must be signed in to change notification settings - Fork 122
Wait for app deletion in DoCreate instead of DoDelete #4176
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
base: main
Are you sure you want to change the base?
Wait for app deletion in DoCreate instead of DoDelete #4176
Conversation
5ce6557 to
2459f80
Compare
|
Commit: 900e11a
21 interesting tests: 18 KNOWN, 2 flaky, 1 SKIP
Top 26 slowest tests (at least 2 minutes):
|
denik
left a comment
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.
Thanks @varundeepsaini, looks good. Only have a comment about testing.
Could you also add NEXT_CHANGELOG entry?
bundle/direct/dresources/app_test.go
Outdated
|
|
||
| // TestAppDoCreate_FailsWhenAppExistsAndNotDeleting verifies that DoCreate returns | ||
| // a hard error when an app already exists but is NOT in DELETING state. | ||
| func TestAppDoCreate_FailsWhenAppExistsAndNotDeleting(t *testing.T) { |
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.
The two tests above have special logic in the handler, so it makes sense to write them as unit tests. This test can be using standard handlers though, could you rewrite it as acceptance test?
first create app with the same name using databricks cli
$CLI apps create --json '{...}'
then do bundle deploy and observe the error:
musterr $CLI bundle deploy
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.
The testserver used to overwrite when an app already exists, i modified it so it returns a 409
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
|
Thanks @varundeepsaini ! |
Description
Moves app deletion wait from
DoDeletetoDoCreate, and only retries when appropriate.Changes
RESOURCE_ALREADY_EXISTSerror, check app state via GET before retryingDELETINGstate or was just deleted (404)ACTIVE)Why?
bundle destroyFollow up to #4102, addresses feedback from #4006.