Skip to content

Commit

Permalink
Documentation changes + Review suggestions #390
Browse files Browse the repository at this point in the history
  • Loading branch information
de-jcup committed Sep 30, 2024
1 parent 4e2192e commit 7744f8b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// SPDX-License-Identifier: MIT
[[section-shared-concepts-sechub-job-restart-handling]]

{sechub} jobs can be restarted. To provide this the
{sechub} jobs can be restarted - either by administrators or by system itself to resume formerly
suspended jobs.

The next diagram shows the involved classes and the program flow when {pds} is used for
communication - but if no {pds} adapter is used for the product execution the behavior is
Expand All @@ -16,7 +17,7 @@ The event `REQUEST_RESTART_JOB` is also triggered when the batch trigger service
[TIP]
====
It is always a good idea to use {pds} instead of direct product handling (via dedicated
adapters) because {pds} (by the adapter) provides relaunch /restart meta data handling
adapters) because {pds} (via the {pds} adapter) provides relaunch /restart meta data handling
out of the box!
====

Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// SPDX-License-Identifier: MIT
=== PDS with SecHub
With {pds} {sechub} can simply integrate different products in a very convenient, scalable and
resilient way.
With the Product Delegation Server ({pds}) the {sechub} server can simply integrate different
products in a very convenient, scalable and resilient way.


[TIP]
====
This documentation only gives an overview how and why {sechub} uses {pds}. Please look into the dedicated
{pds} documentation for architecture and also technical details!
https://mercedes-benz.github.io/sechub/latest/sechub-product-delegation-server.html[{pds} documentation]
for architecture and also technical details!
====

include::concept_pds_general.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,7 @@ public boolean runAndReturnTrueWhenSuccesfulImpl() throws Exception {

private static boolean containsStatus(TestUser user, TestProject project, UUID jobUUID, String... acceptedContainedStatus) {
String status = as(user).getJobStatus(project.getProjectId(), jobUUID);
LOG.info(">>>>>>>>>JOB:STATUS:" + status);

LOG.info(" => Job status: {}", status);
for (String accepted : acceptedContainedStatus) {
if (status.contains(accepted)) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void terminate() {

LOG.info("Start termination process");
if (terminating) {
LOG.info("Alrady in termination process! Will skip request");
LOG.info("Already in termination process! Will skip request");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class SchedulerNextJobResolver {
ScheduleEncryptionService encryptionService;

@Autowired
public SecHubJobRepository jobRepository;
SecHubJobRepository jobRepository;

@Autowired
SchedulerStrategyProvider schedulerStrategyProvider;
Expand Down Expand Up @@ -56,7 +56,7 @@ public class SchedulerNextJobResolver {
this job will be returned. Otherwise the selected schedule strategy will be used to determine next job uuid.
Remark: A suspended job shall only be executed when the minium duration time has been
reached. The time period can be configured and prevents cross site effects at deployments.
reached. The time period can be configured and prevents side effects at deployments.
"""))
public UUID resolveNextJobUUID() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
description="""
When a SecHub instance is receiving a SIGTERM signal from OS,
the server instance must block further job processing (on this instance) and
suspend all of it running jobs. Because after some time the job will be resumed
suspend all of its running jobs. Because after some time the job will be resumed
by another instance, this process will not stop any running PDS jobs.
""")
public @interface UseCaseSystemSuspendsJobsWhenSigTermReceived {
Expand Down

0 comments on commit 7744f8b

Please sign in to comment.