Commit Graph

176 Commits

Author SHA1 Message Date
Oleg Zhurakousky
f7c862ce9b remove commented code 2020-11-09 19:34:14 +01:00
Oleg Zhurakousky
70076c8653 GH-597 Add support for handling MultipartFile(s)
This initial fix ensures that functions can process single MultipartFile as well as multiple.

Resolves #597
2020-11-09 19:27:01 +01:00
Oleg Zhurakousky
dd0f70bc8e Simplify logic around getting item type of a function type 2020-11-04 11:29:01 +01:00
Oleg Zhurakousky
1ed99667bb Disable 'sentencesAcceptSse' test as it started to fail due to some reactor changes 2020-11-03 14:03:39 +01:00
Oleg Zhurakousky
9a715be835 Initial refactoring and simplificatioin of web module 2020-11-03 13:46:52 +01:00
Oleg Zhurakousky
9b1206f6af Fix SmartCompositeMessageConverter to ensure it properly injects contentType
Initial refactoring web - test pass
2020-11-03 13:44:45 +01:00
Oleg Zhurakousky
b8d462678a Deprecate and remove all usages of FunctionInspector 2020-10-19 18:11:11 +02:00
Oleg Zhurakousky
10b1f808ba Consolidate isMessage() operation 2020-10-19 14:57:55 +02:00
Oleg Zhurakousky
72f05fc591 Refactor FunctionCatalog implementation 2020-10-16 17:59:06 +02:00
Oleg Zhurakousky
6863931f30 GH-578 Fix FunctionRegistration lookup
The root of the issue was in implementation of  equals() and hashCode() of FunctionInvocationWrapper

Resolves #578
2020-09-21 15:22:21 +02:00
Oleg Zhurakousky
2f36dbccb3 Various polishing to accomodate boot, reactor and other changes 2020-08-04 19:21:14 +02:00
Oleg Zhurakousky
b4e5315a10 GH-500 Fix NPE in FunctionEndpointInitializer
This ensures that posting to the consumer does not result in NPE given that there is no body

Resolves #500
2020-06-10 19:44:27 +02:00
anshlykov
8bcfad48fa 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
8503c39104 Re-enable ignored tests 2020-05-04 21:09:41 +02:00
Oleg Zhurakousky
5f3f0cf965 Polishing
Fix code format
Resolves #489
2020-04-29 15:29:35 +02:00
谭繁华
719f3745f0 GH-489 the received data which Post Flux data to FunctionController is not same as the function apply
fix test case
2020-04-29 15:29:35 +02:00
Oleg Zhurakousky
b5592d8e7a Enhance test to validate HTTP header propagation 2020-04-21 14:13:35 +02:00
Oleg Zhurakousky
27494567a0 Add propagation of HTTP headers
Polish function composition logic
2020-04-20 18:13:45 +02:00
Oleg Zhurakousky
5f37819eae Remove attempt to convert incoming type to target type from Requestprocessor
This fix effectively forces all type conversion happen in function catalog
2020-04-20 09:14:57 +02:00
Oleg Zhurakousky
7bd84c79a2 GH-499,498 Add support for SupplierExporter to control output content-type
- Add 'contentType' property to ExporterProperties to assist SupplierExporter with delegating it to function catalog
- Add additional logging and testing
- Change JsonMapper to abstract class providing special handling of conversion of Json Sting to byte[]
2020-04-20 07:06:18 +02:00
Oleg Zhurakousky
8f7672399f Extract common code from BeanFactoryAwareFunctionRegistry
. . . to ensure that we can have the version of FunctionRegistry that is not dependent on BeanFactory.
2020-04-16 13:42:17 +02:00
Oleg Zhurakousky
949f5fb023 GH-466 Fix SupplierExporter to avoid starting if Supplier is not present
Added condition to the start method of the SupplierExporter to prevent it from starting for cases where there are no Suppliers in catalog

Resolves #466
2020-03-31 16:40:31 +02:00
Oleg Zhurakousky
21d68ff3c8 GH-475 Fix support for Flux<List> type conversion
At the moment support is rudimentary but given that BeanFactoryAwareFunctionRegistry provides all the necessary type conversion functionality the true fix should consider utilizing it.

Resolves #475
2020-03-31 14:46:37 +02:00
Oleg Zhurakousky
1d784c199d GH-467 Added initial support for GET method to FunctionEndpointInitializer
At the moment support is rudimentary as it does not include any type conversion, but neither does POST so it is consistent.
Given that BeanFactoryAwareFunctionRegistry provides all that functionality already perhaps the proper fix with regard to converter would be to use it or part of it in place of InMemoryFunctionCatalog currently used.

Resolves #467
2020-03-31 14:14:33 +02:00
Oleg Zhurakousky
86d12f3a84 GH-473 Fix type discovery for generic parameters
Resolves #473
2020-03-30 10:56:00 +02:00
Oleg Zhurakousky
a3a08919e0 GH-423 Ensure that SupplierExporter assumes generic Publisher
Resolves #423
2019-12-11 13:44:32 +01:00
Oleg Zhurakousky
2aed5abff8 GH-408 Enhance RoutingFunction with SpEL and application properties
- Added initial support for communicating routing instructions via SpEL thru both message headers and application properties
- Added support for communication function definition via application properties
- Added additional tests and updated documentation

Resolves #408
2019-09-10 09:25:40 +02:00
Oleg Zhurakousky
7611cba69e GH-387 Added initial support for flexible function signatures
- Added support for simple POJO functions
- Added additional utility methods
2019-08-22 16:58:18 +02:00
Oleg Zhurakousky
9b1e69f05d Removed auto-fluxing Supplier result when Supplier is not reactive 2019-07-26 15:33:26 +02:00
Oleg Zhurakousky
243cf95eca GH-388 Adding utility to interogate Function types
- refactoring of BeanFactoryAwareFunctionRegistry to eliminate the need for FunctionType as it takes certain assumptions that are no longer valid
- adding support for multiple acceptedOutputTypes to FunctionCatalog

Resolves #388
2019-07-24 12:12:52 +02:00
Oleg Zhurakousky
fbeee8bc37 Renamed new registry implementation to BeanFactoryAwareFunctionRegistry
- added initila javadoc
- polished few tests
2019-07-17 14:48:05 +02:00
Oleg Zhurakousky
2c8f3644da Ignored remaining failing tests 2019-07-17 13:57:44 +02:00
Oleg Zhurakousky
93f7a248a5 Added initial support for lazy style FunctionCatalog/Registry which:
-  does not rely on any of the existing wrappers and instead relies on internal wrapper which performs  in-flight/just-in-time wrapping and unwrapping from reactive to imperative types
- performs transparent type conversion relying on MessageConverters and ConversionService
- supports multiple inputs/outputs
2019-07-17 13:54:02 +02:00
Oleg Zhurakousky
85af2e4ed6 Increased sleep time in randomly failing test 2019-07-17 11:05:05 +02:00
Dave Syer
521c6d3397 Add proxyTargetBeans = false 2019-07-12 17:11:26 +02:00
Oleg Zhurakousky
70d46f8b9f GH-386 Fixed NPE for non-existing functions invoked as REST endpoints
Resolves #386
2019-07-12 17:09:46 +02:00
Dave Syer
5e3111bf80 Fix conditions for custom AWS runtime
Conflicts:
	spring-cloud-function-samples/function-sample-aws-custom/pom.xml
2019-07-12 17:08:34 +02:00
Oleg Zhurakousky
b7d2557656 fixing doc links
polishing test
2019-05-07 11:07:01 +02:00
Oleg Zhurakousky
4d9cdb9750 GH-238 Added initial support for RoutingFunction
- Added initial implementation of RoutingFunction which is bootstrapped optionally based on setting ‘spring.cloud.function.routing.enabled’ property to true.
- Added initial documentation and tests

Resolves #238
2019-05-07 10:13:42 +02:00
Oleg Zhurakousky
abeb652830 Fixed condition for spring.cloud.function.web.export.enabled property 2019-05-03 13:25:58 +02:00
Oleg Zhurakousky
d9582a9867 GH-358 Fixd NPE in flux FunctionWebUtils
added tests

Resolves #358
2019-04-29 16:07:56 +02:00
Oleg Zhurakousky
085204bad2 Miscellaneous clean up, refactoring
Simplified FunctionCatalog structure by no longer registering the actual target function since it is available in wrapper anyway.
Cleaned up logic in RequestProcessor
2019-04-03 20:33:04 +02:00
Dave Syer
6eea43b266 Fix test for supplier exporter in functional application
You need to look beyond the application context (now) since it
might still be of type GenericApplicationContext even in a webflux
app.
2019-04-01 15:19:19 +01:00
Oleg Zhurakousky
1e2d0f2720 Merge pull request #305 from spring-operator/polish-urls-apache-license-master
URL Cleanup
2019-03-26 11:13:20 +01: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
Spring Operator
bcd2f61689 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 But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://compose.docker.io/ (UnknownHostException) with 1 occurrences migrated to:
  https://compose.docker.io/ ([https](https://compose.docker.io/) result UnknownHostException).
* [ ] http://nosuchhost (UnknownHostException) with 1 occurrences migrated to:
  https://nosuchhost ([https](https://nosuchhost) result UnknownHostException).
* [ ] http://projects.spring.io/spring-boot/function-sam (404) with 1 occurrences migrated to:
  https://projects.spring.io/spring-boot/function-sam ([https](https://projects.spring.io/spring-boot/function-sam) result 404).
* [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404).

## 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://EditorConfig.org with 1 occurrences migrated to:
  https://EditorConfig.org ([https](https://EditorConfig.org) result 200).
* [ ] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* [ ] http://www.reactive-streams.org/ with 2 occurrences migrated to:
  https://www.reactive-streams.org/ ([https](https://www.reactive-streams.org/) result 200).
* [ ] http://plugins.jetbrains.com/plugin/6546 with 1 occurrences migrated to:
  https://plugins.jetbrains.com/plugin/6546 ([https](https://plugins.jetbrains.com/plugin/6546) result 301).
* [ ] http://eclipse.org with 1 occurrences migrated to:
  https://eclipse.org ([https](https://eclipse.org) result 302).
* [ ] http://eclipse.org/m2e/ with 2 occurrences migrated to:
  https://eclipse.org/m2e/ ([https](https://eclipse.org/m2e/) result 302).
* [ ] http://www.springsource.com/developer/sts with 1 occurrences migrated to:
  https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302).

# Ignored
These URLs were intentionally ignored.

* http://localhost with 23 occurrences
2019-03-20 15:45:22 -05:00
Oleg Zhurakousky
7042394bd2 GH-274 Fixed empty body request handling
Resolves #274
2019-03-20 08:45:26 +01:00
Oleg Zhurakousky
ee13ef4e09 Fixed docs home page
fixed some formatting issues
2019-03-19 08:44:01 +01:00
Oleg Zhurakousky
87a878879c GH-293 Enhanced endpoint mapping support for functional form context configuration
- Enhanced HTTP endpoint mapping support for 'functional form' context configuration ensuring it can register multiple endpoint to maintain the same behaviour as with regular application context
- Additional consolidation around Function Catalog
- Added identical test for functional and non-functional form endpoint configuration.

Resolves #293
2019-03-19 08:17:13 +01:00
Dave Syer
138e1cf3c2 Deeper support for custom AWS Lambda runtime
Adds an EnvironmentPostProcessor so the user ony has to set one
property (spring.cloud.function.web.export.enabled=true).
2019-02-28 10:05:13 -05:00