-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3463 from mercedes-benz/feature-390-zero-downtime…
…-sechub-deployment Provide zero downtime sechub deployment
- Loading branch information
Showing
106 changed files
with
2,578 additions
and
593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
206 changes: 93 additions & 113 deletions
206
sechub-api-java/src/main/resources/reduced-openapi3.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
sechub-doc/src/docs/asciidoc/diagrams/diagram_sechub_job_restart_handling.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
@startuml | ||
|
||
'Hide empty parts: | ||
hide empty fields | ||
hide empty methods | ||
|
||
'You can find more examples at https://plantuml.com/class-diagram | ||
|
||
package com.mercedesbenz.sechub.adapter { | ||
|
||
interface AdapterMetaDataCallback{ | ||
AdapterMetaData getMetaDataOrNull() | ||
persist(AdapterMetaData data) | ||
} | ||
|
||
class AdapterMetaData { | ||
setValue(String key, String value) | ||
String getValue(String key) | ||
} | ||
|
||
interface Adapter { | ||
AdapterExecutionResult start(C config, AdapterMetaDataCallback callback) | ||
} | ||
|
||
class PDSAdapterV1 implements Adapter{ | ||
|
||
} | ||
} | ||
|
||
|
||
package com.mercedesbenz.sechub.domain.scan { | ||
|
||
|
||
class ScanService { | ||
startScan() | ||
} | ||
|
||
class ScanJobExecutor{ | ||
} | ||
|
||
class ProductResult { | ||
UUID getSecHubJobUUID() | ||
UUID getProductExecutorConfigUUID() | ||
} | ||
|
||
class AbstractProductExecutionService { | ||
runOnExecutorWithOneConfiguration() | ||
} | ||
|
||
interface ProductExecutor { | ||
execute(SecHubExecutionContext context, P param) | ||
} | ||
|
||
interface ProductExecutorCallback extends AdapterMetaDataCallback{ | ||
ProductResult getProductResult() | ||
} | ||
class ProductExecutorContextFactory | ||
class ProductExecutorCallbackImpl implements ProductExecutorCallback | ||
|
||
class ScanJobExecutionRunnable { | ||
} | ||
} | ||
|
||
|
||
|
||
note top of PDSAdapterV1 | ||
If meta data is available, the PDS adapter tries to fetch | ||
former PDS job UUID from meta data of product result. | ||
|
||
If the PDS job uuid is null, a new PDS job is created, otherwise the | ||
existing PDS job will be reused and the the current state handled. | ||
end note | ||
|
||
ProductExecutorContextFactory -> ProductExecutorCallbackImpl : creates | ||
AbstractProductExecutionService -> ProductExecutorContextFactory: calls to create callback instance | ||
AbstractProductExecutionService "1" *-- "many" ProductExecutor | ||
ProductExecutorCallback --> AdapterMetaData : provides | ||
|
||
ProductResult <-- AbstractProductExecutionService : loads former product result for same executor and sechub job uuid | ||
PDSAdapterV1 --> AdapterMetaData : stores and reads | ||
PDSAdapterV1 -> AdapterMetaDataCallback: uses | ||
|
||
ProductExecutor -> Adapter : uses to communicate | ||
|
||
ScanJobExecutionRunnable --> AbstractProductExecutionService: calls multiple implementations | ||
|
||
package com.mercedesbenz.sechub.domain.schedule { | ||
|
||
class ScheduleMessageHandler { | ||
handleJobRestartRequested() | ||
} | ||
|
||
class SchedulerRestartJobService { | ||
restartJob(UUID jobUUID, String ownerEmailAddress) | ||
- markJobAsNewExecutedNow(ScheduleSecHubJob secHubJob) | ||
} | ||
|
||
class ScheduleJobLauncherService { | ||
executeJob(ScheduleSecHubJob secHubJob) | ||
} | ||
} | ||
|
||
|
||
package com.mercedesbenz.sechub.domain.administration { | ||
|
||
|
||
class JobRestartRequestService{ | ||
restartJob(UUID sechubJobUUID) | ||
} | ||
} | ||
|
||
class DomainMessageService { | ||
} | ||
|
||
JobRestartRequestService -[bold,#blue]> DomainMessageService: (1) REQEUST RESTART JOB (soft) | ||
DomainMessageService -[bold,#blue]> ScheduleMessageHandler : (2) REQEUST RESTART JOB (soft) | ||
ScheduleMessageHandler -[bold,#blue]> SchedulerRestartJobService | ||
|
||
SchedulerRestartJobService -[bold,#green]> ScheduleJobLauncherService | ||
|
||
ScheduleJobLauncherService -[bold,#green]> DomainMessageService : (3) START_SCAN (synchron) | ||
|
||
DomainMessageService -[bold,#green]> ScanService: (4) START_SCAN (synchron) | ||
|
||
|
||
ScanService -[bold,#green]> ScanJobExecutor | ||
|
||
ScanJobExecutor -> ScanJobExecutionRunnable | ||
@enduml |
64 changes: 64 additions & 0 deletions
64
sechub-doc/src/docs/asciidoc/diagrams/diagram_sechub_resume_suspended_jobs.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@startuml | ||
|
||
'Hide empty parts: | ||
hide empty fields | ||
hide empty methods | ||
|
||
'You can find more examples at https://plantuml.com/class-diagram | ||
|
||
package com.mercedesbenz.sechub.domain.schedule { | ||
|
||
class SchedulerJobBatchTriggerService { | ||
void triggerExecutionOfNextJob() | ||
} | ||
|
||
class SchedulerNextJobResolver { | ||
UUID resolveNextJobUUID(); | ||
} | ||
|
||
class ScheduleJobMarkerService { | ||
} | ||
|
||
class ScheduleResumeJobService { | ||
void resume(ScheduleSecHubJob sechubJob) | ||
} | ||
|
||
database DB { | ||
entity ScheduleSecHubJob { | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
node EventBus { | ||
} | ||
|
||
node springcontainer as "Spring boot container" { | ||
} | ||
|
||
cloud restartProcess as "Restart job handling" { | ||
} | ||
|
||
SchedulerJobBatchTriggerService --> ScheduleJobMarkerService | ||
ScheduleResumeJobService ...> EventBus: REQUEST_JOB_RESTART | ||
restartProcess <. EventBus: REQUEST_JOB_RESTART | ||
SchedulerNextJobResolver <-- ScheduleJobMarkerService | ||
SchedulerNextJobResolver --> ScheduleSecHubJob | ||
SchedulerJobBatchTriggerService --> ScheduleResumeJobService : when RESUMING | ||
ScheduleJobMarkerService ..> ScheduleSecHubJob :updates execution state to RESUMING\nwhen jobs was in state SUSPENDED\n | ||
|
||
|
||
springcontainer --[#darkgreen,bold]> SchedulerJobBatchTriggerService: scheduled | ||
|
||
|
||
note top of SchedulerNextJobResolver | ||
At first job uuids of | ||
suspended jobs are resolved. | ||
|
||
If no suspended job shall be executed, | ||
the selected schedule strategy is used | ||
to resolve the next job. | ||
end note | ||
|
||
@enduml |
Oops, something went wrong.