Skip to content
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

Update GetModuleLogs method when tail + since + until options are provided (#4922) #5171

Merged
merged 3 commits into from
Jun 25, 2021

Conversation

yophilav
Copy link
Contributor

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 with tail + since + until, all the 3 options are passed to Docker API management to fetch the log. The Docker API does the following:

  1. Fetch the log of the module
  2. Apply tail to the log
  3. Apply the since and until to the log
    This results in an empty log most of the time which is not a desirable behavior.

This PR changes the GetModuleLogs when the tail + since + until are specified together by doing the following:

  1. Fetch Docker API with since + until log option
  2. tail 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

… provided. (Azure#4922)

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 with `tail + since + until`, all the 3 options are passed to Docker API management to fetch the log. The Docker API does the following: 
1. Fetch the log of the module
2. Apply `tail` to the log
3. Apply the `since` and `until` to the log
This results in an empty log most of the time which is not a desirable behavior. 

This PR changes the `GetModuleLogs` when the `tail + since + until` are specified together by doing the following:
1. Fetch Docker API with `since + until` log option
2. `tail` 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
@kodiakhq kodiakhq bot merged commit 496985c into Azure:release/1.1 Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants