Skip to content

Conversation

@flemzord
Copy link
Member

Add fx.Supply(connectionOptions) to provide DB connection options to the fx container.

The Circuit Breaker storage module requires *bunconnect.ConnectionOptions as an fx dependency, which was previously not supplied, preventing it from creating its DB connection when active.


Open in Cursor Open in Web

…ainer

The circuit breaker storage module requires *bunconnect.ConnectionOptions
but this dependency was not provided to the fx container, causing injection
failures. This fix adds fx.Supply(connectionOptions) to ensure the circuit
breaker module can properly create its database connection.
@cursor
Copy link

cursor bot commented Dec 29, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/circuit-breaker-db-connection-768d

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

@flemzord flemzord changed the title Circuit breaker db connection fix: provide database connection options to fx container for circuit breaker Dec 29, 2025
@flemzord flemzord marked this pull request as ready for review December 29, 2025 14:58
@flemzord flemzord requested a review from a team as a code owner December 29, 2025 14:58
}),
health.Module(),
publish.FXModuleFromFlags(cmd, service.IsDebug(cmd)),
fx.Supply(connectionOptions),
Copy link
Contributor

Choose a reason for hiding this comment

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

why not doing the same as in main?

		fx.Provide(func() *bunconnect.ConnectionOptions {
			return connectionOptions
		}),

Copy link
Contributor

Choose a reason for hiding this comment

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

actually it might be why the tests fails :D

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.

4 participants