Log async upload job details correlated with operation id - #1889
Open
IvanBorislavovDimitrov wants to merge 1 commit into
Open
Log async upload job details correlated with operation id#1889IvanBorislavovDimitrov wants to merge 1 commit into
IvanBorislavovDimitrov wants to merge 1 commit into
Conversation
At operation start, resolve the operation's file ids and log any associated async upload job (deploy-from-URL) with a credential-free summary that includes queue wait time, upload duration and total time. Adds timing derivations and a log-safe summary to AsyncUploadJobEntry.
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




What
When an operation starts, log the async upload job (deploy-from-URL scenario) associated with that operation, correlated by the operation id — in a single, greppable line.
Previously there was no log line tying a deploy operation to its async upload job. The only shared key between the two is the uploaded file id (
appArchiveId), and it was never logged next to the operation id, so correlating an operation with its upload required manual cross-referencing.Changes
StartProcessListener— after files are stamped with the operation id, resolve the operation's file ids (appArchiveId+ ext-descriptor ids) viaOperationFileIdsUtiland queryAsyncUploadJobService.withFileIds(...). For each associated job, log one INFO line:Best-effort: operations without file ids (e.g. undeploy) short-circuit, and any lookup failure logs a WARN rather than failing the operation. Injects
AsyncUploadJobService(already available transitively, same asOrphanedFilesCleaner).AsyncUploadJobEntry— adds a credential-freebuildLogSummary()plus timing derivations:getQueueWaitTime()=addedAt → startedAt(time parked in the queue)getUploadDuration()=startedAt → finishedAt(actual upload time)getTotalTime()=addedAt → finishedAtnull(rendered asN/A) when the relevant timestamps are not set yet.Sensitive data — the summary intentionally omits
urlanduser(may carry basic-auth credentials / PII) andspaceGuid.Tests
AsyncUploadJobEntryTest— timing derivations for finished/running/initial jobs, sensitive-data redaction, andN/Arendering.StartProcessListenerTestfor the new constructor dependency.Both suites green;
multiapps-controller-persistenceand-processbuild clean.