reorder arguments resolving logics to full support middleware - V5 - breaking change.

Open
#648 0 comments 0 reactions 1 assignee View on GitHub

@kaibocai is already working on this.

Since Sep 21, 2022.

Assessment

This issue has not been assessed yet.

Description

Enhancement Needs: Triage (Functions) reviewed V5

For today's middleware support logics we are convert the parameter payload to String for middleware to consume during the invocation request at https://github.com/Azure/azure-functions-java-worker/blob/679e5618010d6c3b68b48654048c268b7274a116/src/main/java/com/microsoft/azure/functions/worker/binding/ExecutionContextDataSource.java#L120,

This has limitation as middleware is getting the payload that already got transferred to String type. Middleware may want to use the original type of parameter payload which build by java worker. I see from two advantages of this approach:

  • Give more fliexibility to middleware when they want to play around the input parameter payload, not only restrict payload type to String.
  • Reduce the repeat work we already did in the worker - convert the payload type from GRPC type to corresponding java type. Currently without this we are trying to did the same worker for middleware only different we convert all GRPC type to String.

Attached the potential PR here https://github.com/Azure/azure-functions-java-worker/tree/kaibocai/v5-bench

Potential break changes:

Dominant language
Java
Stars
103
Forks
74
Avg merge
1d 11h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-functions-java-worker

All issues in Azure/azure-functions-java-worker

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.