Skip to content

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented Mar 11, 2020

Fix the regression in #12154: provisioning_state.casefold() raises exception AttributeError: 'NoneType' object has no attribute 'casefold' when provisioning_state is None.

This causes issue to az sql server wait since sql server doesn't use "provisioningState": "Succeeded", but "state": "Ready": #12313

Only lower provisioning_state when it has value (not None or empty string '').

Tested with

az vm wait --ids {} --created

Also, use lower() to be consistent with other code.

Copy link
Member

@fengzhou-msft fengzhou-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix.

@Juliehzl
Copy link
Contributor

My concern is that although your current change will not break users ay more, the sql wait command still doesn't work now.
I mean because the wait condition is from "state" and "provisionstate" will none, the wait condition will never match as expected for this scenario.

@yonzhan yonzhan added this to the S167 milestone Mar 13, 2020
@jiasli
Copy link
Member Author

jiasli commented Mar 13, 2020

My concern is that although your current change will not break users ay more, the sql wait command still doesn't work now.
I mean because the wait condition is from "state" and "provisionstate" will none, the wait condition will never match as expected for this scenario.

I have put my thought in #12313 (comment). But anyway, let's fix the regression first.

@jiasli jiasli merged commit 93b92c9 into Azure:dev Mar 13, 2020
@jiasli jiasli deleted the provisioning_state branch March 13, 2020 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants