Skip setting startInPauseMode property in tasks based on a property#2556
Skip setting startInPauseMode property in tasks based on a property#2556sajinieKavindya wants to merge 1 commit into
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughOverviewThis pull request introduces conditional configuration of the task ChangesTaskConstants.java
StartUpController.java
ImpactThis change provides greater flexibility in managing task startup behavior by allowing individual tasks to opt out of automatic registry-based startup-state configuration while maintaining backward compatibility for existing tasks. WalkthroughThis pull request adds conditional control over startup-state registry configuration. A new task property constant 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Pull request overview
Adds an opt-out mechanism so a startup task’s startInPausedMode is not overridden from the persisted registry state when a skipStartInPauseModeAssignment flag is set on the TaskDescription.
Changes:
- Introduced
TaskConstants.SKIP_START_IN_PAUSED_MODE_ASSIGNMENTconstant. - Updated
StartUpController.init()to conditionally skipconfigureStartupStateFromRegistry(taskDescription)based on the new flag.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
modules/tasks/src/main/java/org/apache/synapse/task/TaskConstants.java |
Adds a constant key for the new TaskDescription flag. |
modules/core/src/main/java/org/apache/synapse/startup/quartz/StartUpController.java |
Conditionally skips applying registry-derived paused/active state based on the new flag. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| boolean skipConfiguringStartupState = false; | ||
| Object skipConfiguringStartupStateProp = taskDescription.getProperty(TaskConstants.SKIP_START_IN_PAUSED_MODE_ASSIGNMENT); | ||
| if (skipConfiguringStartupStateProp != null) { | ||
| skipConfiguringStartupState = Boolean.parseBoolean((String) skipConfiguringStartupStateProp); | ||
| } |
There was a problem hiding this comment.
This property is explicitly set in product-integrator-mi repo by calling taskDescription.addProperty(TaskConstants.SKIP_START_IN_PAUSED_MODE_ASSIGNMENT, "true");
$subject
Setting the
startInPauseModeproperty based on the value ofskipStartInPauseModeAssignmentproperty in taskdescription.