feat: add Azure SQL Edge module - #3787
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughAdds an Azure SQL Edge module with EULA and password options, startup validation, password inspection, and connection-string generation. Integration tests, an example, documentation, and module dependency updates accompany the implementation. ChangesAzure SQL Edge module
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8bc926334
ℹ️ 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".
| moduleOpts = append(moduleOpts, | ||
| testcontainers.WithExposedPorts(defaultPort), | ||
| testcontainers.WithEnv(map[string]string{ | ||
| "ACCEPT_EULA": "Y", |
There was a problem hiding this comment.
Require explicit SQL Edge EULA acceptance
This sets ACCEPT_EULA=Y for every Run call, so consumers implicitly accept the SQL Edge image license merely by starting the module. The other EULA-gated modules in this repo require an explicit WithAcceptEULA() and validate it after user options, so this module should follow that pattern instead of silently opting callers in.
Useful? React with 👍 / 👎.
| "MSSQL_SA_PASSWORD": defaultPassword, | ||
| }), | ||
| testcontainers.WithWaitStrategy( | ||
| wait.ForListeningPort(defaultPort).WithStartupTimeout(2*time.Minute), |
There was a problem hiding this comment.
Wait for SQL Edge to accept queries
With only ForListeningPort, Run returns as soon as port 1433 is listening, but SQL Server/SQL Edge can open the socket before database recovery is complete. Callers and the new tests immediately call ConnectionString/Ping, so they can see transient login or query failures; add a SQL/log readiness wait like the existing MSSQL module does.
Useful? React with 👍 / 👎.
Adds a testcontainers-go module for Microsoft Azure SQL Edge, an
ARM64-compatible SQL Server variant for IoT/edge scenarios, as a
sub-package of the modules/azure umbrella module.
Import path: github.com/testcontainers/testcontainers-go/modules/azure/sqledge
- WithAcceptEULA() required option (explicit EULA consent)
- WithPassword() to override the default SA password
- Wait strategy: ForListeningPort + ForLog("Recovery is complete.")
- ConnectionString() returns sqlserver:// URL on port 1433
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
e8bc926 to
ec53e15
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@modules/azure/sqledge/sqledge.go`:
- Around line 104-121: Update Container.ConnectionString to construct the SQL
Server URI with net/url.URL instead of interpolating credentials into a string.
Set the scheme, user credentials, host, port, and database query through URL
fields so c.password is safely escaped, while preserving the existing optional
args query parameters.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 935ffc11-2a62-4376-b73f-8d4c12f4f16b
⛔ Files ignored due to path filters (1)
modules/azure/go.sumis excluded by!**/*.sum
📒 Files selected for processing (5)
docs/modules/azure.mdmodules/azure/go.modmodules/azure/sqledge/examples_test.gomodules/azure/sqledge/sqledge.gomodules/azure/sqledge/sqledge_test.go
Passwords containing URI reserved characters (?, #, /, %) would break the fmt.Sprintf-based connection string. Replace with url.URL struct so url.UserPassword handles percent-encoding of the credentials correctly.
Fixed CodeRabbit Major finding in commit 744071a. Replaced |
Adds the
sqledgetestcontainers-go module.Part of the broader effort to add missing modules — split from #3762.