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

Add retries for sqlcmd in sqlserver.bicep #2098

Open
weikanglim opened this issue May 5, 2023 · 2 comments
Open

Add retries for sqlcmd in sqlserver.bicep #2098

weikanglim opened this issue May 5, 2023 · 2 comments
Labels
bug Something isn't working customer-reported identify a customer issue needs-team-attention Issues out of a milestone
Milestone

Comments

@weikanglim
Copy link
Contributor

Problem

sqlcmd (relevant code here) often fails to connect to the newly provisioned database when azd provision runs, with error:

"Database '<>' is not currently available. Please retry this connection later."

Example failures:

Fix

  1. We should add retries for failure conditions in the deployment script, and timeout after 3-5 minutes.
  2. We should investigate if sqlcmd is logging errors to standard out or standard error, and if there's something we can change here. The logs from sqlcmd are not showing up in the github action logs, which are first parsed by Microsoft.Resources/deploymentScripts service. There should be a way to get the logs to show up and avoid the extra step of troubleshooting for the user.
@weikanglim weikanglim added bug Something isn't working customer-reported identify a customer issue labels May 5, 2023
@ghost ghost added the needs-team-attention Issues out of a milestone label May 5, 2023
@rajeshkamal5050
Copy link
Contributor

@jongio can you take a look and see if we can

  • add some retries?
  • make sure it logs?

@jongio
Copy link
Member

jongio commented May 9, 2023

Retries being discussed here: Azure/bicep#1013

You can try to add a depends on for the database.

@rajeshkamal5050 rajeshkamal5050 added this to the Gallium milestone Jun 1, 2023
@jongio jongio removed their assignment Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer-reported identify a customer issue needs-team-attention Issues out of a milestone
Projects
None yet
Development

No branches or pull requests

3 participants