-
Notifications
You must be signed in to change notification settings - Fork 97
Update the pollSince time based on latest activation start time #396
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
Conversation
|
@csantanapr @rabbah @dubee Please review |
csantanapr
left a comment
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.
LGTM
|
Hi, about this change: https://github.com/apache/incubator-openwhisk-cli/pull/396/files#diff-ad777399e121d471d84d4fd5bf456bceR390 |
|
the activation polling scenario in question is:
i believe the GET /activations api's |
|
It’s possible to miss activations because there’s no guarantee the activations are committed to the datastore in order. The cursor in the cli advances based on the last fetched activations. The polling doesn’t back fill. |
|
@rabbah - thanks fr the input. does the backend use the activation start time or end time when processing the activation list while not a guarantee, i'm thinking the activation order will likely be maintained most of the time - especially for activations completing in sequence and seconds apart. a polled-for, long running sequence action will probably run into this same issue. |
|
The activations in the database are indexed using the activation start time. The controller queries the database using the |
Change the
pollSincetime for each loop by basing it on the latestStarttime seen in activation resultSee #390 for background details
Testing Approach
While the fix is small it was tricky to validate the change. This PR add a test HTTP rever proxy which is used to intercept the calls between the cli client and the controller. The test then intercepts the request to check if since time gets changed or not