Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new WithRouting function to the ApplicationBuilder interface, enabling explicit route registration during application setup. It also refines the runner execution logic to skip runners when ShouldRun() returns false, preventing unnecessary execution of disabled components.
Key changes:
- Added
WithRoutingmethod toApplicationBuilderfor route registration - Enhanced
QueueRunner.ShouldRun()to exclude sync driver connections - Updated runner execution to respect
ShouldRun()predicate before starting
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| contracts/foundation/application_builder.go | Adds WithRouting method signature and improves parameter naming |
| foundation/application_builder.go | Implements WithRouting method and route registration logic |
| foundation/application_builder_test.go | Adds test coverage for WithRouting functionality |
| foundation/application.go | Filters runners based on ShouldRun() before execution |
| foundation/application_test.go | Updates tests to verify ShouldRun() filtering behavior |
| mocks/foundation/ApplicationBuilder.go | Regenerates mock with WithRouting support and improved naming |
| queue/runners.go | Enhances ShouldRun() to check for sync driver configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| func (r *ApplicationBuilder) Create() foundation.Application { | ||
| if len(r.configuredServiceProviders) > 0 { |
There was a problem hiding this comment.
The length is judged internally.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1246 +/- ##
=======================================
Coverage 67.66% 67.67%
=======================================
Files 250 250
Lines 14109 14116 +7
=======================================
+ Hits 9547 9553 +6
- Misses 4180 4181 +1
Partials 382 382 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📑 Description
Closes goravel/goravel#792
This pull request introduces a new routing registration feature to the application builder, refines the runner execution logic to respect a
ShouldRun()predicate, and improves test coverage and mocks to support these changes. The most significant updates are the addition of theWithRoutingmethod to theApplicationBuilderinterface and its implementation, as well as stricter runner filtering based on configuration and runner state.✅ Checks