Update GetModuleLogs
method when tail + since + until
options are provided (#4922)
#5171
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.
TL;DR - This PR chances the behavior of
GetModuleLogs
method to better facilitate the portal experience.Previous, when the
GetModuleLogs
is triggered from the azure portal withtail + since + until
, all the 3 options are passed to Docker API management to fetch the log. The Docker API does the following:tail
to the logsince
anduntil
to the logThis results in an empty log most of the time which is not a desirable behavior.
This PR changes the
GetModuleLogs
when thetail + since + until
are specified together by doing the following:since + until
log optiontail
the returning log using LogProcessor (post-Akka).This allows a customer to get a tail of log within a given time frame.
Note: This PR doesn't change the behavior of any other option combinations (i.e.
tail + since
,tail
,since
, etc). These combination are still managed by Docker API.Note2: I set RequestHandle timeout to be 30s instead of 600s by default