Package com.xebialabs.xlrelease.service
Class PhaseService
java.lang.Object
com.xebialabs.xlrelease.service.PhaseService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPhaseService(com.xebialabs.xlrelease.service.CiIdService ciIdService, com.xebialabs.xlrelease.repository.ReleaseRepository releaseRepository, com.xebialabs.xlrelease.repository.PhaseRepository phaseRepository, XLReleaseEventBus eventBus, com.xebialabs.xlrelease.service.PhaseRestart phaseRestart, com.xebialabs.xlrelease.api.internal.InternalMetadataDecoratorService decoratorService, com.xebialabs.xlrelease.actors.ReleaseActorService releaseActorService) -
Method Summary
Modifier and TypeMethodDescriptioncom.xebialabs.xlrelease.domain.Phasebuild(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phaseTemplate, Integer position) com.xebialabs.xlrelease.domain.Phasecom.xebialabs.xlrelease.domain.Phasecom.xebialabs.xlrelease.domain.Phasevoidcom.xebialabs.xlrelease.domain.PhaseduplicatePhase(String originPhaseId) com.xebialabs.xlrelease.domain.Phasecom.xebialabs.xlrelease.domain.PhasefindByIdWithoutDecorators(String phaseId) com.xebialabs.xlrelease.domain.PhasemovePhase(com.xebialabs.xlrelease.domain.Release release, MovementIndexes movementIndexes) com.xebialabs.xlrelease.domain.ReleaserestartPhase(String releaseId, String phaseId, String taskId, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion) com.xebialabs.xlrelease.domain.ReleaserestartPhase(String releaseId, String phaseId, String taskId, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion, boolean resumeRelease) Should only be called not from Actor thread This method calls Actor to modify release (add copy of restarted phase), and then searches for dependencies (gate tasks) and updates them.com.xebialabs.xlrelease.service.PhaseRestart.RestartPhaseResultrestartPhases(String releaseId, String phaseId, String taskId, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion, boolean resumeRelease, com.xebialabs.xlrelease.domain.Release release) com.xebialabs.xlrelease.domain.Phase
-
Field Details
-
DEFAULT_RELEASE_PHASE_TITLE
- See Also:
-
DEFAULT_WORKFLOW_PHASE_TITLE
- See Also:
-
-
Constructor Details
-
PhaseService
@Autowired public PhaseService(com.xebialabs.xlrelease.service.CiIdService ciIdService, com.xebialabs.xlrelease.repository.ReleaseRepository releaseRepository, com.xebialabs.xlrelease.repository.PhaseRepository phaseRepository, XLReleaseEventBus eventBus, com.xebialabs.xlrelease.service.PhaseRestart phaseRestart, com.xebialabs.xlrelease.api.internal.InternalMetadataDecoratorService decoratorService, com.xebialabs.xlrelease.actors.ReleaseActorService releaseActorService)
-
-
Method Details
-
create
-
create
-
build
public com.xebialabs.xlrelease.domain.Phase build(com.xebialabs.xlrelease.domain.Release release, com.xebialabs.xlrelease.domain.Phase phaseTemplate, Integer position) -
findById
-
findByIdWithoutDecorators
-
delete
-
update
@Timed public com.xebialabs.xlrelease.domain.Phase update(String phaseId, com.xebialabs.xlrelease.domain.Phase toUpdate) -
copyPhase
@Timed public com.xebialabs.xlrelease.domain.Phase copyPhase(com.xebialabs.xlrelease.domain.Release release, String originPhaseId, int targetPosition) -
duplicatePhase
-
movePhase
@Timed public com.xebialabs.xlrelease.domain.Phase movePhase(com.xebialabs.xlrelease.domain.Release release, MovementIndexes movementIndexes) -
restartPhases
-
restartPhase
-
restartPhase
@Timed public com.xebialabs.xlrelease.domain.Release restartPhase(String releaseId, String phaseId, String taskId, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion, boolean resumeRelease) Should only be called not from Actor thread This method calls Actor to modify release (add copy of restarted phase), and then searches for dependencies (gate tasks) and updates them. To me there seem to be a race condition, because when release is started after phase restart, then release execution races against dependency update which may cause release tasks from restarted phase to be completed earlier than dependencies will be discovered and updated One of the solutions would be to not restart release until all dependencies will be discovered and updated. TODO FI-526 check consistency of this approach and fix -
getTitle
-