dmitry-s / spring-cloud-function

Apache License 2.0
0 stars 2 forks source link

What to set as context when initializing? #10

Closed meltsufin closed 4 years ago

meltsufin commented 4 years ago

For HttpFunction, HttpRequest is the only thing that seems to make sense at the moment. Any other ideas?

One issue I found is that since initialize(targetContext) is cached, only the context of the first request is ever set. This seems problematic also from the security point of view. Am I missing something here?

@dmitry-s @dzou

dzou commented 4 years ago

I think either using HttpRequest or null would be fine.

But yeah from what I see there is no way to disable the caching thing; maybe null is fine for now? I guess if the whole "write-once-run-anywhere" idea is true, then users would not need to interact with the GCP-specific context object.

dmitry-s commented 4 years ago

I think null is the best option here.

meltsufin commented 4 years ago

This is something we should raise with Oleg. So, let's keep this open until we migrate issue tracking to spring cloud function repo.

meltsufin commented 4 years ago

null is the answer.