Repository navigation
Always use SessionProxy - #71
Conversation
| event.requestData.callerCredentials = None | ||
| event.requestData.providerCredentials = None | ||
| if platform_sess is None: | ||
| raise ValueError("No platform credentials") |
There was a problem hiding this comment.
looks like the creds are already inadvertently being re-used across invocations. In an end-to-end test, a cwl re-invoke raises valueError.
Need to investigate a bit further, but we may need to be doing something like java's refreshClient operation.
There was a problem hiding this comment.
dug into this a bit deeper and it looks like the scheduler needs the credentials to be part of the request for re-invokes to work (looks to be the same in the java plugin). So if we're going to scrub these we'll need to stash them somewhere and inject them back into the handler_request for reschedule_after_minutes.
jaymccon
left a comment
There was a problem hiding this comment.
overall looks great, just need to work out how to get the creds into the cloudwatch events payload so that re-invokes work.
|
I can't really come up with a good way to fix this, but everything being typed/using |
The That said, all Jay's comment is saying is that the re-invoke needs to use a similar payload to the initial invoke. And currently, the re-invoke is executed via CloudWatch; but this is an implementation detail. |
Issue #, if available: N/A
Description of changes: The main change is to use
SessionProxy, instead of passing credentials around (although they are still needed for the re-invoke). I've also changed the way the request is parsed, first we try and parse the platform part. If this fails, it's now anInternalFailure. Then, theProviderLogHandleruses this parsed data instead of re-parsing the event data itself. Finally, the request is "parsed" and if this fails, it is anInvalidRequestfor now ("parsed" but not really, see #27 ). Both of these steps will make adding a validation library much easier.I also reworked the MetricPublisher interface a bit like we discussed in #69 .
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.