Commit Graph

48 Commits

Author SHA1 Message Date
Oleg Zhurakousky
eddfa97b85 Fix checkstyle 2021-06-11 09:32:00 +02:00
Oleg Zhurakousky
5d1a1cf5b3 GH-706 Fix application context caching for JDK11 class loaders
Resolves #706
2021-06-08 20:36:23 +02:00
Oleg Zhurakousky
7e5eaeeb49 GH-692 Fix reactive support in Azure FunctionInvoker
Resolves #692
2021-05-25 17:25:06 +02:00
Oleg Zhurakousky
ba8dd58db6 GH-678 Fix race condition leading to NPE in Azure FunctionInvoker
Resolves #678
2021-04-06 14:02:04 +02:00
Oleg Zhurakousky
4e42e3631a GH-437 Refactor Azure request handler
This approach simplifies the existing request handlers while also fixing the invocation model to ensure AC is not created multiple times and ExecutionContext is properly propagated via Message headers
The old request handlers are deprecated
Documentation updates as well as tests
Resolves #437
2021-03-15 11:08:36 +01:00
Oleg Zhurakousky
b0ef4522d4 GH-600 Fix logic in Azure adapter to ensure proper handling of sveral functions
This also addresses re-initialization of AC when the second function is invoked
Added second function to the azure examples

Resolves #600
2021-03-11 15:26:06 +01:00
Oleg Zhurakousky
3c5d905eab GH-437 Pass ExecutionContext via MessageHeader
Caching it as part of ApplicationContext was not the right idea so this changes it
2021-03-10 18:53:25 +01:00
Oleg Zhurakousky
14ab5ac1b3 Disconnect FunctionInspector from adapter request handlers and Kotlin module 2020-10-20 13:58:51 +02:00
Oleg Zhurakousky
818cda144c Deprecate and remove all usages of FunctionInspector 2020-10-19 18:11:11 +02:00
Oleg Zhurakousky
3f1315c523 Consolidate isMessage() operation 2020-10-19 14:57:55 +02:00
anshlykov
dfa02750c1 Migrate to JUnit 5
spring-cloud-function-context

spring-cloud-function-context: fix

spring-cloud-function-web

spring-cloud-function-adapters

spring-cloud-function-samples

spring-cloud-function-deployer; spring-cloud-function-kotlin

Resolves #535
2020-06-10 16:43:04 +02:00
Oleg Zhurakousky
021e384d27 GH-508 Fix casting of the exception in AzureSpringBootRequestHandler 2020-04-27 13:37:29 +02:00
Oleg Zhurakousky
aa721a7b43 GH-456 Fix Azure logging
Added static delegate context which holds target context and is also refreshed with new context on each request

Resolves #456
2020-04-02 16:36:54 +02:00
Eddú Meléndez
a3597614df Fix typos 2020-02-14 21:33:29 -06:00
Oleg Zhurakousky
c36d1b8594 GH-425 Additional enhancements in AzureSpringBootRequestHandler
Added additional enhancements to AzureSpringBootRequestHandler to ensure it has a chance to re-initilaize in the event function name changed
2019-12-18 13:42:17 +01:00
Oleg Zhurakousky
7e0e8ff7ee GH-425 Fix Azure function reinitialization
Fixed Azure function reinitialization on each request

Resolves #425
2019-12-16 19:47:46 +01:00
Oleg Zhurakousky
f16a2c76cf GH-317 Polishing and minor refactoring in AzureSpringBootHttpRequestHandler
- Moved convertOutput() to base class and added input value as an argument
- Added javadoc
- fixed checkstyle violations

Resolves #317
Resolves #360
2019-04-29 13:46:13 +02:00
Markus Gulden
27344d7098 GH-317, Implement HTTP request-specific handler for Azure adapter
* Handler extends AzureSpringBootRequestHandler with types
  HttpRequestMessage and HttpResponseMessage (which are required by
  Azure Functions for HTTP-triggered functions)

* Handler extracts request path, query string parameters as well as the
  HTTP method from the HttpRequestMessage object and forwards them to
  the function as message headers

* Handler creates an HttpResponseMessage with the response coming from
  the called function

* Created unit tests accordingly

GH-317, Implement HTTP request-specific  handler for Azure adapter

* Handler extends AzureSpringBootRequestHandler with types
  HttpRequestMessage and HttpResponseMessage (which are required by
  Azure Functions for HTTP-triggered functions)

* Handler extracts request path, query string parameters as well as the
  HTTP method from the HttpRequestMessage object and forwards them to
  the function as message headers

* Handler creates an HttpResponseMessage with the response coming from
  the called function

* Created unit tests accordingly

GH-317, Implement HTTP request-specific  handler for Azure adapter

* Handler extends AzureSpringBootRequestHandler with types
  HttpRequestMessage and HttpResponseMessage (which are required by
  Azure Functions for HTTP-triggered functions)

* Handler extracts request path, query string parameters as well as the
  HTTP method from the HttpRequestMessage object and forwards them to
  the function as message headers

* Handler creates an HttpResponseMessage with the response coming from
  the called function

* Created unit tests accordingly
2019-04-29 13:42:55 +02:00
Oleg Zhurakousky
3fed1f1cd4 GH-264 Simplified signagure for Supplier 2019-04-03 09:42:34 +02:00
Oleg Zhurakousky
edba4c428e GH-264 Added initial support for Supplier and Consumer for Azure
Resolves #264
2019-04-03 09:37:01 +02:00
Spring Operator
3b573c27ac URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 247 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 12:48:58 -05:00
Oleg Zhurakousky
d20171d196 GH-265 Added support for injecting execution context
- Added support for injecting target execution context into the ApplicationContext in AbstractSpringFunctionAdapterInitializer, effectively making it available to all adapters (if one is provided)
- Added test, docs

Resolves #265
2019-03-01 17:07:03 +01:00
neokeld
3f4401f9be Simple refactor: isSingleInput already check if input is a collection
Resolves #269
2019-03-01 05:46:45 +01:00
Oleg Zhurakousky
cdca44f714 Polished adapter initializers consolidation effort
- Added ability to retrieve input type from FunctionRegistration (if available) in AbstractSpringFunctionAdapterInitializer
- Removed azure/AzureSpringFunctionInitializer and aws/SpringFunctionInitializer
- Added additional tests in AWS and Azure modules
- See 0189c578ef for additional info
2019-02-25 19:37:34 +01:00
Oleg Zhurakousky
0189c578ef GH-266 Consolidated Adapter infrastructure
- Moved common logic into a new AbstractSpringFunctionAdapterInitializer
- Modified Azure and AWS request handlers to extend from it
- Deprecated both AzureSpringFunctionInitializer and SpringFunctionInitializer(AWS)

Resolves #266
2019-02-25 13:25:08 +01:00
Marcin Grzejszczak
c6ddfe1af4 Added checkstyle for tests 2019-02-03 15:34:10 +01:00
Marcin Grzejszczak
e4b08a083c Turned on checkstyle 2019-02-01 15:48:32 +01:00
Dave Syer
4315cb1d61 SpringApplication->FunctionalSpringApplication (less confusing) 2018-10-18 09:38:27 +01:00
Dave Syer
666bc100e8 Extract functional bean definition concerns into a common class
SpringApplication looks like the class with the same name in Spring
Boot (and is a subclass of it), but it checks to see if the user
is asking for functional bean registrations and only used those if
it can.
2018-10-12 18:00:41 +01:00
Dave Syer
3966f378b7 Add support for application type Function in Azure
See #215
2018-10-12 16:53:42 +01:00
Dave Syer
37729e4583 Add support for ApplicationContextInitializer in azure adapter 2018-10-03 09:01:54 +01:00
Dave Syer
bb1c97251f Use ApplicationContextInitializer if provided
An Initializer is more efficient than using @Configuration.
2018-10-02 12:07:51 +01:00
Dave Syer
9016ccd969 More yellow markers 2018-09-18 13:30:37 +01:00
Dave Syer
c964dc5451 Add some logging on startup of Azure adapter 2018-09-17 11:58:38 +01:00
Dave Syer
f09f750c39 Add support for different handler->function mappings in Azure 2018-09-17 11:06:17 +01:00
Dave Syer
3baaa45648 Allow Azure function apps to pass function name down to handler 2018-09-17 11:06:08 +01:00
Dave Syer
9d1818839e Add SupplierExporter (HTTP POST of Suppliers on startup)
Add throwable handling to azure base class
2018-08-14 12:57:12 +02:00
Dave Syer
d0eb012371 Make Azure function initializer a bit more flexible 2018-08-07 14:58:34 +01:00
Dave Syer
2c7144bc49 Update Azure dependencies 2018-08-07 10:06:14 +01:00
Dave Syer
fa55ebab16 Compiler warnings 2018-05-02 10:55:24 -04:00
Dave Syer
b59b43ddc5 Only expose Publisher via FunctionCatalog
Flux.from() is cheap and can be used to marshal the inputs everywhere
internally. With this change users ought to be able to register any
function of any Publisher type.
2018-05-01 12:06:34 -04:00
Dave Syer
33b33adb4b Change FunctionCatalog to key off Class<?>
Makes it possible to support other "function" types in the future.
The user is always taking a risk with the lookup that the object
returned has the generic type desired (but that hasn't changed
with this commit). FunctionCatalog is a lot simpler as a result
and also a lot more flexible.
2018-02-28 14:18:09 +00:00
Dave Syer
616e2825c6 Move FunctionCatalog into context module 2018-02-27 09:05:28 +00:00
Dave Syer
54873b66d5 Fix test 2018-01-25 09:36:37 +00:00
Dave Syer
ab30b755ba Add test to azure sample 2018-01-25 09:20:20 +00:00
Dave Syer
b0bddd3160 Handler for azure sample calls super in different method
If FooHandler extends AzureSpringBootRequestHandler apparently
Azure cannot extract the generic types Foo and Bar.
2018-01-24 15:56:40 +00:00
Dave Syer
7604de3ca7 Attempt to write JSON by hand 2018-01-24 14:54:41 +00:00
Soby Chacko
308e4d5514 Experimental Azure function adapter for HTTP trigger 2018-01-24 14:54:33 +00:00