Giter Club home page Giter Club logo

worker.flow's People

Contributors

amy0511 avatar benjaminruby avatar dependabot[bot] avatar florentinvintila avatar gchickma avatar georgesafta avatar isakawa-carbon avatar marcusdroy avatar morarucostel avatar timrbula avatar tlawrie avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

worker.flow's Issues

Response as error type has wrong casting.

On other types of error, that are in the catch for the http.request the offered error is sent and at task response body is empty. Casting is to be performed, or optional chaining.

Difficulties in debugging errors while executing the HTTP call Task.

Is your request related to a problem? Please describe.
During the execution of the HTTP Call task, if something wrong happens during the processing part of the response, it is difficult debug the problem since there is no information on the response content.

Describe the solution you'd like
In debug mode, output the content so the developers can check for the response of the integration.

Describe the benefits or justification for this request
Ease up the investigation and speeds up the solution identification. Started in non-debug mode there is no security, performance impact.

Additional context
Add any other context or screenshots about the feature request here.

Internal routes ERR_INVALID_PROTOCOL

For internal routes that have HTTP protocol an error is triggered with HTTP Promise error: TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:".
Similar behaviour to HTTPS protocol calling HTTP url.

Enhance Execute HTTP task with retrial capabilities

Is your request related to a problem? Please describe.
There are cases when the flow needs a retry capability of the Execute HTTP Task when a specific HTTP call response is received.
For example if the task receives a HTTP 504, the flow might want to retry for a number of times before giving-up on the call.

Describe the solution you'd like
Allow the end-user to select an HTTP list of error codes for which the the task if receives the http response code it will retry for a number of x times - again configurable in the UI.

Describe the benefits or justification for this request
Sometime calls might fail due to network reasons, a retry mechanism helps in getting the workflow with success to its end.

Additional context

Refactor HTTP task to incorporate different Success, Retry and Error codes

Refactor the HTTP task to incorporate different Success , Retry and Error codes.

Screenshot 2022-04-13 at 13 12 55

  • HTTP response codes for Success -- default of 1xx,2xx or just standard http default
  • HTTP response codes for Failure (validation to be mutually exclusive w/ letter a — default standard http
  • HTTP response codes for Retry (validation mutually exclusive to both a and b) --- default none or 502/3;
  • Retry count between 1 and 9
  • Extend delay between retries up to 5 minutes (300000 milliseconds).

Slack tasks are missing the 4k output to file limit

Describe the bug
Using a task from the Slack category, a task with an output bigger than 4K, will break due to Tekton limitation on the output result parameters.

To Reproduce
Run Get Slack Channels task in a workflow and it will fail with
Unable to execute job with reason: TaskRunResultTooLarge - Task has exceeded the maximum allowed 4096 byte size for Result Parameters..

  • Commands to run
  • Interactions to cause issue to happen

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Version 2.9.18

Additional context
Add any other context about the problem here.

HTTP task - return non json response

The HTTP task will force parsing of response to JSON. It would be recommended to remove the parsing to JSON and return the response as it is.

Github tasks that return results are double encoding the json payload

Describe the bug
Github tasks that return results (parameters or in file path) are encoding twice the json payload, making the result into a non valid JSON content.
In the workflow, following such a github task, if you add the JSON file to property it will fail due to the non-valid json content.

Github Tasks being affected:

Invite User to Organization
Get Github Repository
Invite Member to Team
Create Team in Organisation
Get Team in Organization
Get All Teams in Organization
Get Organization Info
Get All Organizations
Find Repositories in Organization

To Reproduce
Create a workflow with Get Github Repository configured to save the result in a file and a JSON file to property task to pick-up a value from the file. It will fail due to the invalid json content.

Expected behavior
The JSON file to property task should be able to read from the github result task.

Environment (please complete the following information):

  • Flow 3.3

Additional context
Add any other context about the problem here.

Refactor - Send Email with Sendgrid

Things to improve:

It integrates with Sendgrid and it uses sendgrid/client lib to send the email. Needs to check the response received from Sendgrid, to mark the task if it is a success or not,
An error message must always be present in the logs before closing a task with failure (including when the response from Sendgrid states that the email was not sent, any other non 2xx status).
Validate all the input parameters including the non mandatory ones if they are provided.
Remove the log.sys that outputs the client's apikey.

Result parameters on the Manual Approval task

One of the client's use-case is to provide a way in retrieving down the workflow, the 4 informations from the Manual Approval :

  • Approval status,
  • Approver,
  • Approval submitted (time),
  • Approval comments.

The task is to broadcast the information from the Manual Approval as results parameters so that they can be accessed by the tasks down the stream.

For non-2xx returned calls the "HTTP Execute Call" task the response is not exposed.

Describe the bug
The Execute Advanced HTTP Call is not exposing the response and statusCode for the "failed" calls. If you have a server endpoint responding with 400 and a content, the task doesn't output these values as result.
In addition the task should print in the logs the return code and content of all the calls, during the retrial attempts.

To Reproduce

  • Create a workflow with Execute Advanced HTTP Call task. Configure the task to call the https://httpstat.us/400 endpoint.
  • Run the workflow.
  • The task results don't show the values, they are set on null, even though the server end-point is returning 400 with response body.

Expected behavior
The task should continue to be considered as failed but since the server returns a response and a HTTP status value, these values needs to come part of the task output parameters.

Screenshots
image

Environment (please complete the following information):

  • OS: NA
  • Browser all
  • Version worker.flow v2.10.20

Additional context
Add any other context about the problem here.

Refactor - JSONPath to Parameter

File JSONPath To Parameter

Input fields:

  • filePath [mandatory]
  • query [mandatory]

Output fields:

  • evaluation

Things to improve:

  • check/validate mandatory fields (null or empty)
  • debug message on all the input parameters, before the validation
  • make sure that the task's output param can not exceed 4K value, for a standard predefined output param. If there is any chance for a bigger value than 4K (e.g. any GitHub integration that return a response other than OK/NOK) the task MUST define the output file param.

JSONPath To Parameter

Input fields:

  • json [mandatory]
  • query [mandatory]

Output fields:

  • evaluation

Things to improve:

  • check the mandatory field query (empty or null)
  • make sure that the task's output param can not exceed 4K value, for a standard predefined output param. If there is any chance for a bigger value than 4K (e.g. any GitHub integration that return a response other than OK/NOK) the task MUST define the output file param.

MongoDB task fails to run query with $gt params

Describe the bug
Trying to run this query via MongoDB task:

db.getCollection('collection').find({'timestamp':{$gt: ISODate('2022-01-01 00:00:00.000Z')}})

Seems task is stripping out the $gt part and is not capable to run the query.

To Reproduce

  • create a workflow with a MongoDB task with a "$gt" param.
  • Run the workflow providing the query from above.

Expected behavior
Expected for the query to be executed.

Environment (please complete the following information):

  • OS: any
  • Browser all
  • Version any

Incorrect "Content-Length" of HTTP Call size calculated for utf8 characters makes the calls fail with 400

Describe the bug
If there is any non-standard characters in the body of the HTTP call task, like š or â the HTTP call fails with 400 because the Content-Length is not correctly calculated.

To Reproduce
Make a call to any valid end-point where the payload contains
{name: John Smišth}
The HTTP call will fail with HTTP 400.

Expected behavior
Well, the call should go through

Environment (please complete the following information):

  • Non specific to a environment
  • Version worker.flow v2.9.8

Running the "Execute HTTP Call" task fails when used with a non json body

Describe the bug
Running an "Execute HTTP Call" task fails when the body of the call is not json.

To Reproduce

  • Create a workflow containing an "Execute Advanced HTTP Call" task,
  • Correctly configure the task with a non json payload,
  • Execute the workflow

Expected behavior
The http call should be executed successfully.

Screenshots
N/A

Environment (please complete the following information):

  • OS: N/A
  • Browser any
  • Version 3.6.x

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.