Skip to content

The readiness check fails a successful install when sqlcmd is not on PATH #325

Closed

Description

@dhensby

With wait-for-ready: true (the default), the action runs sqlcmd after setup to check that the instance accepts logins (src/utils.ts#L99-L114). @actions/exec finds the tool with io.which(tool, true), which throws when sqlcmd is not on PATH. install() doesn't catch this (src/install.ts#L183-L211), so:

  • The action fails although setup succeeded and the instance is running.
  • The Waiting for database log group is never closed.
  • Because the action treats this as a failure, it prints Detail.txt and the error logs, so the log looks like a setup failure.

The GitHub-hosted Windows images include sqlcmd, so this mainly affects self-hosted runners and custom images.

The number of attempts is also wrong in two places:

  • action.yml, and so the generated README, says "A maximum of 10 attempts is made" (action.yml#L24). The code makes 6 attempts: one, then up to 5 retries after waits of 1, 2, 4, 8 and 16 seconds. That is about 31 seconds of waiting, plus up to 5 seconds of login timeout per attempt.
  • The log messages count retries, not attempts, so "Database not ready after 5 attempts" is printed after 6 attempts.

Suggested fix:

  • Catch a failure to start sqlcmd, log a warning that the readiness check was skipped, and continue. Decide what to do when setup also returned 3010, because in that case a failed readiness check is fatal today.
  • Close the log group in a finally block.
  • Make the input description and the log messages match the real number of attempts.
  • Add a test for a rejected waitForDatabase().

Activity

  1. github-actions commented on Nov 21, 2026

    @github-actions

    🎉 This issue has been resolved in version 4.1.4 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions