Update the pollSince time based on latest activation start time#396
Update the pollSince time based on latest activation start time#396csantanapr merged 4 commits intoapache:masterfrom
Conversation
|
@csantanapr @rabbah @dubee Please review |
|
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