Comments (6)
@anna-geller for permission, we can do the same as the Flow task: allowed to toggle the trigger if the current flow is allowed to trigger the target flow. If so, we can reuse the existing facility which would speed up development.
from kestra.
this might be a quicker workaround once the state store gets added as a condition:
id: http
namespace: dev
tasks:
- id: slack
type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK') }}"
payload: |
{
"channel": "#general",
"text": "The price is now: {{ json(trigger.body).price }}"
}
- id: if
type: io.kestra.core.tasks.flows.If
condition: "{{ json(trigger.body).price <= 110 }}"
then:
- id: setState
type: io.kestra.core.tasks.states.Set
data:
disabled: true
triggers:
- id: http
type: io.kestra.plugin.fs.http.Trigger
uri: https://fakestoreapi.com/products/1
responseCondition: "{{ json(response.body).price <= 110 }}"
interval: PT30S
- conditions:
- type: io.kestra.core.models.conditions.types.state.Get
condition: "{{ disabled != true }}"
from kestra.
alternative option (less favorable but solves the immediate pain): at first, only provide the functionality within this task:
id: http
namespace: dev
tasks:
- id: slack
type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK') }}"
payload: |
{
"channel": "#general",
"text": "The price is now: {{ json(trigger.body).price }}"
}
triggers:
- id: http
type: io.kestra.plugin.fs.http.Trigger
uri: https://fakestoreapi.com/products/1
responseCondition: "{{ json(response.body).price <= 110 }}"
interval: PT30S
stopAfterSuccess: true # false by default
from kestra.
Next steps:
- stopAfterSuccess boolean
- Update trigger endpoint
- UI change with toggle, unlock and Backfill Executions
- Reevaluate after user feedback if we need the Toggle task and state store to store previous trigger conditions
from kestra.
to add more info from today's meeting with @brian-mulier-p and @tchiotludo:
- we added an issue here #2964 for a generic
stopAfter
success property for all triggers - we want to add the
Toggle
task allowing to disable a specific trigger (as shown below) via an API call (i.e. without changing the source code) - we want to support more advanced use cases based on Flow trigger e.g. if a specific critical flow (or if any flow from a "prod" namespace) ends in a FAILED state, send a Slack alert + disable a trigger of that flow
- for now, automatic reenabling of trigger is out of scope - user needs to reenable the trigger manually once they are ready
- id: disable_schedule
type: io.kestra.core.tasks.triggers.Toggle
namespace: dev
flowId: http
triggerId: http
enabled: false # true to reenable
from kestra.
sounds good!
from kestra.
Related Issues (20)
- Front end validation of format of file to import
- Flow Filters User can filter by space symbol
- Json Files are not displayed in editor
- Editor can't open files with space in naming
- Blueprints bottom of the page improve design HOT 1
- No limit on environment name in Settings
- Add spacing to the bottom of the UI
- Worker can exhaust system storage HOT 2
- Previewing large files crashes browser
- Error logs lead to performance issues on the main Dashboard
- FOLLOW-UP Memory runner removal
- Ensure that deleting an execution also deletes the logs related to that execution
- Secret is not populated as a header value in module io.kestra.plugin.core.http.Request
- Namespace Files Editor seems to be broken with a local storage on develop
- outputFiles with nested subdirectories is broken
- Refactor tasks to use taskrunner
- Filtering executions with custom label does not work
- containerImage is not taken into account (Shell task runs with the default ubuntu image)
- Some logs can't be seen from the UI but can be downloaded
- Unable to authenticate to private image repo if GetAuthToken is inside working dir
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kestra.