ballerina-platform / module-ballerinax-azure.functions Goto Github PK
View Code? Open in Web Editor NEWThe implementation of Azure Functions compiler extension for Ballerina.
License: Apache License 2.0
The implementation of Azure Functions compiler extension for Ballerina.
License: Apache License 2.0
Description:
Blocked due to ballerina-platform/ballerina-lang#34296
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
As Azure Functiosn are executed in a different way, having main method does not make sense in azure functions. Having an intermediate azure function solves initializing logic problem. Therefore disable having main function in the default module.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Currently, when an error situation happens inside a function, the Azure tracing logs simply mentions, it's an HTTP 500, and it does not show the actual error. We need these errors to be properly shown in the function logs, and also possibly provide the input request details in order to debug the situation.
Currently if we set a JSON content to a queue entry, when it's read by an Azure function as a parameter in Ballerina, it's representation is still in a JSON string escaped representation. This should be properly unescaped, so the value will be the same as it was put in.
Description:
$Subject. compiler extension and runtime should be able to generate outputs accordinly. it should support automatic data binding as well.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Similar to the one in the ms docs. We need to add a ballerina field as well to this table.
https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings?tabs=csharp
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Currently, we don't have a proper way of testing the azure functions users has written. we need to evaluate a a way to provide this functionality for the user.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$Subject
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
As ballerina-platform/ballerina-lang#29283 is introduced, we need to migrate azure functions to new compiler plugin model.
We can do this once ballerina-platform/ballerina-lang#34296 is fixed.
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
https://github.com/ballerina-platform/module-ballerina-http/blob/master/docs/spec/spec.md#2344-payload-parameter
Above document defines set of rules based on the content type header and the types available. We need to reuse http libs if possible or implement the data binding according to this specification.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Currently, when using the queue input trigger, the received value to the code is wrapped with double quotations as extra values.
Description:
$Subject. As compiler is giving WARNING [az-func-generated_1.bal:(80:1,80:85)] unused variable 'v2' warnings.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Currently, Azure functions works by modifying the AST using PackageNode block in compiler extensions. We need to migrate this using codeAnylaze(Project project) block with new compiler apis.
Description:
Update the BBE to include the following scenario.
@af:Function
public function httpTriggerBlobOutput2(@af:HTTPTrigger { } af:HTTPRequest req,
@af:BlobOutput { path: "bpath1/{Query.name}" } af:BytesOutputBinding bb)
returns @af:HTTPOutput string|error {
bb.value = [65, 66, 67, 97, 98];
return "Blob: " + req.query["name"].toString() + " Content: " +
bb?.value.toString();
}
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$Subject
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
$Subject
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
$Subject. Explore the possible api design and look into the implementation details of the approaches.
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
We need to explore if we can make context serializable, As a temp solution for ballerina-platform/ballerina-lang#34296 . I've got stackoverflow error when i tried to do this.
Current we store multiple syntax tree nodes here, we need to avoid this only store required fields in the context.
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Convert the current jenkins based artifacts to Github packages.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$subject
Description:
Currently, The BBEs contains all the scenarios supported from the module. BBEs should be small and focused at one specific use case. We need to break the existing BBEs into smaller scenarios and introduce more organized BBE.
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$subject
Description:
$Subject. This should remove packing azure functions into bre/lib.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$Subject
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
$Subject. With the api versions, features covered.
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
$Subject.
Consider the reproduce steps below. After invoking the function we get the hello response but as the payload it gives the url of the function. Ex - Hello, https://sl-alpha.azurewebsites.net/api/hello!%
Affected Product Version:
alpha
OS, DB, other environment details and versions:
Steps to reproduce:
Copy the code from below repo readme
https://github.com/ballerina-platform/module-ballerinax-azure.functions
Create the App function in azure porttal
Build the bal file and deploy in azure.
Invoke the function using
curl -d "Jack" https://sl-alpha.azurewebsites.net/api/hello
Description:
$Subject
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$Subject. We need to migrate to gradle 7.2 as its used in http and other modules.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
We need to make new-extension branch master before doing this.
Pushing azure functions to ballerina central is required to remove ballerinax repos from distribution.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
In the current implementation service is located in code.bal and we use function pointer map for route between functions. Instead of this, compiler extension should generate a service that has resource functions for each function.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$Subject. This was done using syntax tree due to ballerina-platform/ballerina-lang#27225 . Since its fixed we need to do it using the Semantic API.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Draft -
https://docs.google.com/document/d/1Y6cePAA_aa4zv6swscgTL-hFcn2GJbaMAlBxcMKg618/edit?usp=sharing
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
$Subject. As code generator gives warningWARNING [az-func-generated_1.bal:(73:2,73:2)] concurrent calls will not be made to this method since the method is not an 'isolated' method
.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
$Subject
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
As discussed, it does not make sense to have public faas functions in submodules as they are public and should belong in the default module.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$Subject
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$Subject. as the new compiler ext does not single file project codegen.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Refactor content of Package.md and Module.md to support ballerina-platform/ballerina-library#1323
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$Subject
listener af:QueueTrigger afL = @af:SomeAnnotation { somestuff } new();
service af:QueueTriggerService NameForAF on afL {
remote function onMessage(string data, @af:BlobInput {} byte[] input) returns @af:BlobOut {} byte[] {
}
}
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
import ballerinax/azure.functions as af;
listener af:HttpTrigger afL = @af:SomeAnnotation { somestuff } new();
service /foo on afL {
resource function get f1/[string s](int id, @af:payload json pl) {
}
resource function post bar(@http:Payload json pl,
@af:Input{MSSQL: “select * from ..” table<Person> tp) {
}
}
The http trigger should align with http resource methods design. It should support these following features
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
$Subject. Also helps to improve codecov.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Description:
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
Since input bindings are not supported for http or queues, we need to look into another input binding like blobs to get the architecture right.
Describe your problem(s)
Describe your solution(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
The following code:
import ballerina/http;
import ballerinax/azure.functions as af;
@af:Function
public function hello(@af:HTTPTrigger { authLevel: "anonymous" } http:Request req)
returns @af:HTTPOutput string|error {
return "Hello, " + check <@untainted> req.getTextPayload() + "!";
}
The execution of the above function fails with the below error:
2020-08-05T03:24:00.722 [Information] Executing 'Functions.hello' (Reason='This function was programmatically called via the host APIs.', Id=c9287ccd-3d0f-4285-b4ba-3ae4f7ec1287)
2020-08-05T03:24:00.836 [Error] Executed 'Functions.hello' (Failed, Id=c9287ccd-3d0f-4285-b4ba-3ae4f7ec1287, Duration=88ms)
No MediaTypeFormatter is available to read an object of type 'HttpScriptInvocationResult' from content with media type 'text/plain'.
This issue is due to a functionality change that is done in Azure Functions. This issue can be tracked from here: Azure/azure-functions-host#6462
An immediate workaround for this is to edit the generated host.json file inside the jar file, and replace "customHandler" name with "httpWorker".
Affected versions: Ballerina v1.2.7 and slp3.
Description:
$Subject
Describe your task(s)
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.