Skip to content
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

fix(sql): remove sql skip-adding-user question #1443

Merged
merged 4 commits into from
Jun 28, 2021
Merged

Conversation

xzf0587
Copy link
Contributor

@xzf0587 xzf0587 commented Jun 28, 2021

  1. remove sql skip-adding-user question.
  2. set default skip-adding-user value based on azureAccountProvider?.getIdentityCredentialAsync

@xzf0587 xzf0587 changed the title remove sql skip-adding-user question feat(sql): remove sql skip-adding-user question Jun 28, 2021
@Alive-Fish
Copy link
Contributor

I think it's OK for the most cases, but some corner cases may have problems, such as provisioning in CLI first and then provision in VSCode extension.

Copy link
Contributor Author

@xzf0587 xzf0587 left a comment

Choose a reason for hiding this comment

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

I think it's OK for the most cases, but some corner cases may have problems, such as provisioning in CLI first and then provision in VSCode extension.

If developers haven't modify the skip-adding-user config in env file, leave it as default. The project will work.
Only specifying the skip-adding-user false in env file will make the cli provision failed.

@wenytang-ms
Copy link
Contributor

it's better merge as a hotfix not a feature

@xzf0587 xzf0587 changed the title feat(sql): remove sql skip-adding-user question fix(sql): remove sql skip-adding-user question Jun 28, 2021
@adashen
Copy link
Contributor

adashen commented Jun 28, 2021

I think it's OK for the most cases, but some corner cases may have problems, such as provisioning in CLI first and then provision in VSCode extension.

If developers haven't modify the skip-adding-user config in env file, leave it as default. The project will work.
Only specifying the skip-adding-user false in env file will make the cli provision failed.

Let's add both test cases and do the verification

@xzf0587
Copy link
Contributor Author

xzf0587 commented Jun 28, 2021

I think it's OK for the most cases, but some corner cases may have problems, such as provisioning in CLI first and then provision in VSCode extension.

If developers haven't modify the skip-adding-user config in env file, leave it as default. The project will work.
Only specifying the skip-adding-user false in env file will make the cli provision failed.

Let's add both test cases and do the verification

Added the unit test for skip-adding-user.
The e2e test does not support test cli scenario which the identity credential is undefined.

Copy link
Contributor

@Alive-Fish Alive-Fish left a comment

Choose a reason for hiding this comment

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

look good to me

}
const skipAddingUser = ctx.config.get(Constants.skipAddingUser);
if (skipAddingUser === undefined) {
this.config.skipAddingUser = (await ctx.azureAccountProvider?.getIdentityCredentialAsync())
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be simplified to :

this.config.skipAddingUser = !(await ctx.azureAccountProvider?.getIdentityCredentialAsync())

@adashen adashen merged commit de7e49c into main Jun 28, 2021
@adashen adashen deleted the zhaofeng/fix-sql-question branch June 28, 2021 05:25
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