Skip to content

feat: add Azure SQL Edge module - #3787

Merged
mdelapenya merged 2 commits into
testcontainers:mainfrom
mdelapenya:feat/module-sqledge
Jul 16, 2026
Merged

feat: add Azure SQL Edge module#3787
mdelapenya merged 2 commits into
testcontainers:mainfrom
mdelapenya:feat/module-sqledge

Conversation

@mdelapenya

Copy link
Copy Markdown
Member

🤖 Automated implementer agentthis comment was posted by the implementer bot from Docker Agentic Platform, not by a human developer

Adds the sqledge testcontainers-go module.

Part of the broader effort to add missing modules — split from #3762.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 62857fda-9332-4a6b-bf8b-ebdbbaa28bcd

📥 Commits

Reviewing files that changed from the base of the PR and between ec53e15 and 744071a.

📒 Files selected for processing (1)
  • modules/azure/sqledge/sqledge.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • modules/azure/sqledge/sqledge.go

Summary by CodeRabbit

  • New Features
    • Added Azure SQL Edge module support, including container startup, required EULA acceptance, and optional password configuration.
    • Added connection string generation using the container host/port, with support for extra connection parameters.
    • Expanded Azure module documentation with an Azure SQL Edge section and usage guidance.
  • Tests
    • Added integration-style examples and tests covering successful startup/connectivity, missing EULA behavior, custom passwords, and connection string parameter handling.

Walkthrough

Adds 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.

Changes

Azure SQL Edge module

Layer / File(s) Summary
Container startup API
modules/azure/sqledge/sqledge.go, modules/azure/go.mod
Defines SQL Edge defaults, EULA and password options, startup readiness validation, effective password extraction, and supporting dependencies.
Connection access and validation
modules/azure/sqledge/sqledge.go, modules/azure/sqledge/sqledge_test.go, modules/azure/sqledge/examples_test.go, docs/modules/azure.md
Generates SQL Server connection strings, tests connectivity and option handling, adds a runnable example, and documents the module.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: feature

Poem

A bunny hops where SQL Edge starts,
With EULA keys and password hearts.
A string is built, a ping rings true,
Tests guard the path in rabbit hue.
Docs now show the way to run—
“Binky!” cheers the container fun.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding the Azure SQL Edge module.
Description check ✅ Passed The description is directly related and accurately states that the sqledge module is being added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 744071a
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-go/deploys/6a58f75df9c9ea0008faddbc
😎 Deploy Preview https://deploy-preview-3787--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mdelapenya
mdelapenya marked this pull request as ready for review July 16, 2026 09:40
@mdelapenya
mdelapenya requested a review from a team as a code owner July 16, 2026 09:40

@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: 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".

Comment thread modules/azure/sqledge/sqledge.go Outdated
moduleOpts = append(moduleOpts,
testcontainers.WithExposedPorts(defaultPort),
testcontainers.WithEnv(map[string]string{
"ACCEPT_EULA": "Y",

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 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),

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 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>
@mdelapenya
mdelapenya force-pushed the feat/module-sqledge branch from e8bc926 to ec53e15 Compare July 16, 2026 15:18

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0fa76f7 and ec53e15.

⛔ Files ignored due to path filters (1)
  • modules/azure/go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • docs/modules/azure.md
  • modules/azure/go.mod
  • modules/azure/sqledge/examples_test.go
  • modules/azure/sqledge/sqledge.go
  • modules/azure/sqledge/sqledge_test.go

Comment thread modules/azure/sqledge/sqledge.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.
@mdelapenya

Copy link
Copy Markdown
Member Author

🤖 Automated implementer agentthis comment was posted by the implementer bot from Docker Agentic Platform, not by a human developer

Fixed CodeRabbit Major finding in commit 744071a. Replaced fmt.Sprintf with url.URL{} + url.UserPassword() so credentials containing URI reserved characters (?, #, /, %) are percent-encoded correctly.

@mdelapenya
mdelapenya merged commit 00672a1 into testcontainers:main Jul 16, 2026
17 checks passed
@mdelapenya
mdelapenya deleted the feat/module-sqledge branch July 16, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant