Skip to content

Conversation

@vkalapov
Copy link
Contributor

@vkalapov vkalapov commented Jan 9, 2026

No description provided.

@vkalapov vkalapov force-pushed the bg-stop-reorder branch 7 times, most recently from dd016cb to 7150540 Compare January 14, 2026 09:34
Copy link
Contributor

@Yavor16 Yavor16 left a comment

Choose a reason for hiding this comment

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

Can you add also unit test for PrepareToStopDependentModulesStep

Comment on lines 41 to 47
Module applicationModule = findModuleInDeploymentDescriptor(context, getCurrentModuleToStop(context).getName());
context.setVariable(Variables.MODULE_TO_DEPLOY, applicationModule);
CloudApplicationExtended modifiedApp = getApplicationCloudModelBuilder(context).build(applicationModule, moduleToDeployHelper);
Map<String, String> calculatedAppEnv = applicationEnvironmentCalculator.calculateNewApplicationEnv(context, modifiedApp);
modifiedApp = ImmutableCloudApplicationExtended.builder()
.from(modifiedApp)
.staging(modifiedApp.getStaging())
.routes(getApplicationRoutes(context, modifiedApp))
.env(calculatedAppEnv)
.build();
context.setVariable(Variables.APP_TO_PROCESS, modifiedApp);
return StepPhase.DONE;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you creating here new APP_TO_PROCESS here and what is the difference from the old one?

Copy link
Contributor Author

@vkalapov vkalapov Jan 19, 2026

Choose a reason for hiding this comment

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

APP_TO_PROCESS is set to the dependent app inside the subprocess. This is done due to the fact that ExecuteTaskStep relies on that variable to be set. Otherwise the logic would fail whenever a there's a need for hook executions.

Comment on lines -120 to -121
<sequenceFlow id="sid-0F200B9A-6462-48CD-BA2D-6E6F1CE15D96" sourceRef="deleteIdleRoutesTask" targetRef="shouldManageServiceBroker"></sequenceFlow>
<sequenceFlow id="skipDeleteIdleRoutesFlow" sourceRef="shouldDeleteIdleRoutes" targetRef="shouldManageServiceBroker"></sequenceFlow>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you change the location of sequence flows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its changed due to the new added steps for stopping dependent modules. These specific flows should be unchanged, they've been re-ordered from the bpmn modeler.

LMCROSSITXSADEPLOY-3367
@vkalapov vkalapov force-pushed the bg-stop-reorder branch 2 times, most recently from d053a35 to 6e242eb Compare January 19, 2026 09:13
return result;
}

private boolean isDependencyAwareStopOrderEnabled(ProcessContext context, DeploymentDescriptor descriptor) {
Copy link
Contributor

Choose a reason for hiding this comment

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

all private methods may be declared as static for simplicity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They could be static, but I don’t see a clear simplicity gain. Can you share a specific reason?

private ApplicationWaitAfterStopHandler waitAfterStopHandler;

@Mock
private MtaMetadataParser mtaMetadataParser;
Copy link
Contributor

Choose a reason for hiding this comment

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

not used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

getModuleDeterminer requires it to be not null, which is called in the abstract parent SyncFlowableStepWithHooks

private MtaMetadataParser mtaMetadataParser;

@Mock
private HooksPhaseGetter hooksPhaseGetter;
Copy link
Contributor

Choose a reason for hiding this comment

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

not used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Required for SyncFlowableStepWithHooks to not throw null pointer exception.

@sonarqubecloud
Copy link

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.

3 participants