-
Notifications
You must be signed in to change notification settings - Fork 41
Adding user info related information regarding deployment process actions #1869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,4 +60,9 @@ public Action getAction() { | |
| return Action.RETRY; | ||
| } | ||
|
|
||
| @Override | ||
| protected Logger getLogger() { | ||
| return LOGGER; | ||
| } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,12 @@ | ||
| package org.cloudfoundry.multiapps.controller.process.jobs; | ||
|
|
||
| import static java.text.MessageFormat.format; | ||
|
|
||
| import java.text.MessageFormat; | ||
| import java.time.LocalDateTime; | ||
| import java.time.ZonedDateTime; | ||
| import java.util.List; | ||
|
|
||
| import jakarta.inject.Inject; | ||
| import jakarta.inject.Named; | ||
|
|
||
| import org.cloudfoundry.multiapps.controller.api.model.ImmutableOperation; | ||
| import org.cloudfoundry.multiapps.controller.api.model.Operation; | ||
| import org.cloudfoundry.multiapps.controller.persistence.OrderDirection; | ||
|
|
@@ -18,11 +16,12 @@ | |
| import org.cloudfoundry.multiapps.controller.process.flowable.ProcessAction; | ||
| import org.cloudfoundry.multiapps.controller.process.flowable.ProcessActionRegistry; | ||
| import org.flowable.common.engine.api.FlowableObjectNotFoundException; | ||
|
|
||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.springframework.core.annotation.Order; | ||
|
|
||
| import static java.text.MessageFormat.format; | ||
|
|
||
| @Named | ||
| @Order(10) | ||
| public class OperationsCleaner implements Cleaner { | ||
|
|
@@ -59,7 +58,7 @@ | |
|
|
||
| private int abortActiveOperations(LocalDateTime expirationTime) { | ||
| int abortedOperations = 0; | ||
| for (int pageIndex = 0;; pageIndex++) { | ||
| for (int pageIndex = 0; ; pageIndex++) { | ||
| List<Operation> operationsPage = getOperationsPage(expirationTime, pageIndex); | ||
| for (Operation operation : operationsPage) { | ||
| if (inFinalState(operation)) { | ||
|
|
@@ -107,6 +106,7 @@ | |
| ProcessAction abortAction = processActionRegistry.getAction(Action.ABORT); | ||
| String processId = operation.getProcessId(); | ||
| LOGGER.debug(CleanUpJob.LOG_MARKER, format(Messages.ABORTING_OPERATION_0, processId)); | ||
| LOGGER.info(MessageFormat.format(Messages.AUTO_ABORTING_PROCESS_0, processId, Action.ABORT.toString())); | ||
|
Check warning on line 109 in multiapps-controller-process/src/main/java/org/cloudfoundry/multiapps/controller/process/jobs/OperationsCleaner.java
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you pass the process type when you only pass abort. I think you can hard code it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just wanted to make it more consistent with the other logs I have added - will hard code it, thanks. |
||
| abortAction.execute(null, processId); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,7 @@ public final class Messages { | |
| public static final String OBJECT_STORE_WITH_PROVIDER_0_CREATED = "Object store with provider: {0} created"; | ||
| public static final String JOB_WITH_ID_WAS_NOT_UPDATED_WITHIN_SECONDS = "Job with ID: {} was not updated within: {} seconds"; | ||
| public static final String CLEARING_OLD_ENTRY = "Clearing old entry with id: {0}"; | ||
| public static final String STARTED_NEW_DEPLOYMENT_PROCESS = "Started new MTA deployment process with process instance id: \"{0}\" and origin of: \"{1}\", by user with user GUID: \"{2}\"."; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this message can be shortened - What do you think about this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed, I think It might be better shorter as well now that I have seen it |
||
|
|
||
| // DEBUG log messages | ||
| public static final String RECEIVED_UPLOAD_REQUEST = "Received upload request on URI: {}"; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the point of actor here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed ;D