Skip to content

Adding user info related information regarding deployment process actions#1869

Open
karrgov wants to merge 3 commits into
masterfrom
log_user_info
Open

Adding user info related information regarding deployment process actions#1869
karrgov wants to merge 3 commits into
masterfrom
log_user_info

Conversation

@karrgov

@karrgov karrgov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Adding user info related information regarding deployment process actions

public static final String UNBINDING_SERVICE_INSTANCE_FROM_APP_FINISHED = "Unbinding service instance \"{0}\" from application \"{1}\" finished";
public static final String POLLING_SERVICE_OPERATIONS = "Polling service operations...";
public static final String AUTO_ABORTING_PROCESS_0 = "Auto-aborting process \"{0}\"...";
public static final String AUTO_ABORTING_PROCESS_0 = "Auto-aborting process with processId: \"{0}\", action: \"{1}\", actor: system ...";

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Discussed ;D

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()));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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.

LMCROSSITXSADEPLOY-3329
Yavor16
Yavor16 previously approved these changes Jul 2, 2026
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));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why another logging was added instead editing first one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because the first one was a debug one and I did not want to change what we have had until now - my idea was to add a second info log

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}\".";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this message can be shortened - Started operation \"{operation_id}\" by user \"{user_guid}\" and origin \"{origin_string}\"

What do you think about this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

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}\".";
public static final String STARTED_OPERATION_0_BY_USER_1_AND_ORIGIN_OF_2 = "Started operation \"{0}\" by user \"{1}\" and origin of \"{2}\".";
;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove this semicolon

.build();
}

protected void logStartOperation(String processInstanceId, UserInfo authenticatedUser) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we have only one logStartOperation method? Also why this method use protected access modifies instead of private?

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