Skip to content

Add SQL Server PR smoke tests - #4026

Merged
BrentOzar merged 1 commit into
mainfrom
codex/sql-server-pr-smoke-tests
Jul 2, 2026
Merged

Add SQL Server PR smoke tests#4026
BrentOzar merged 1 commit into
mainfrom
codex/sql-server-pr-smoke-tests

Conversation

@BrentOzar

Copy link
Copy Markdown
Member

Summary

Adds a GitHub Actions workflow that starts SQL Server Developer Edition and smoke-tests changed root-level sp_*.sql scripts in pull requests.

The workflow intentionally avoids generated release artifacts like Install-All-Scripts.sql, Install-Azure.sql, SqlServerVersions.sql, and Uninstall.sql. Instead, it discovers root-level stored procedure scripts changed by the PR, installs each individually, verifies that the procedure exists, and runs its @VersionCheckMode = 1 check.

Validation

  • bash -n .github/scripts/run-sql-server-smoke-tests.sh
  • YAML parse via Ruby YAML.load_file
  • Local Docker SQL Server 2022 Developer Edition test with a mixed changed-file list verified only sp_Blitz.sql was tested and ignored install/subfolder/utility SQL files

Notes

This is based on main so it can be merged separately from pending dev branch work.

Copilot AI review requested due to automatic review settings July 2, 2026 12:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@BrentOzar
BrentOzar merged commit 9f0fc7f into main Jul 2, 2026
1 check passed
@BrentOzar
BrentOzar deleted the codex/sql-server-pr-smoke-tests branch July 2, 2026 12:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a3f210bdb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

changed_scripts=()
while IFS= read -r changed_script; do
[[ -n "$changed_script" ]] && changed_scripts+=("$changed_script")
done < <(discover_changed_sp_scripts)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Propagate changed-file discovery failures

When changed-file discovery cannot run, this process substitution hides the failure: for example, with neither CHANGED_SQL_FILES nor the GitHub diff env vars set, discover_changed_sp_scripts prints its error and exits 1, but the loop still completes with an empty array and the script exits 0 after reporting that there were no scripts to test. The same fail-open pattern can mask discovery failures, so capture the function output/status before populating changed_scripts and fail the job if discovery fails.

Useful? React with 👍 / 👎.

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.

2 participants