Comments (4)
mainly needed for setting default dates
Risks:
- not easy to create run context at the stage of evaluating inputs and creating an execution
- It might be complex for users to understand what is possible to use and what not within dynamically rendered inputs
Possible to use only variables not related to the execution context:
- Flow variables
- Namespace variables
- KV Store (soon)
- Global env variables
globals.myvar
@japerry911 as a workaround, you can use a subflow to use execution context from another flow for dynamic rendering
from kestra.
sounds good/will do, thank you @anna-geller !
from kestra.
sorry Jack, was sharing just raw notes in the meeting. we'll investigate
from kestra.
Hi @japerry911 , discussed with the team and the best solution for now is to use the approach with a string that you used but without a validator (becuase a validator would validate the expression string rather than a rendered date):
id: end_date_demo
namespace: company.team
inputs:
- id: end_date
type: STRING
defaults: "{{ now() | date('yyyy-MM-dd') }}"
description: The end date to fetch data from Google Ads in the format yyyy-MM-dd e.g. 2024-12-24
tasks:
- id: print_date
type: io.kestra.plugin.core.log.Log
message: hello on {{ render(inputs.end_date) }}
I believe once we fix the issue with null
#4065, the use case shared here will become much easier as you will be able to do e.g.:
id: end_date_demo_2
namespace: company.team
inputs:
- id: end_date
type: DATE
defaults: null
required: false
description: The end date to fetch data from Google Ads in the format yyyy-MM-dd e.g. 2024-12-24
tasks:
- id: print_date
type: io.kestra.plugin.core.log.Log
message: hello on {{ inputs.end_date ?? now() | date('yyyy-MM-dd') }}
for now, the above flow will not create any execution due to the error:
At end_date: Invalid input for `end_date`, java.lang.Exception: Expected `DATE`
but received `Invalid date` with errors:
``` Text 'Invalid date' could not be parsed at index 0 ```,
but received `Invalid date`
big thanks for flagging this, it's a poor UX atm, we'll tackle this as a high-priority item
from kestra.
Related Issues (20)
- Implements resume of container for the Docker task runner HOT 2
- Find and Replace in Editor stops working sometimes after flow execution HOT 6
- [Blocker] Null coalescing operator doesn't work as expected when processing undefined inputs HOT 2
- Fresh new UI still doesn't load the Welcome page by default
- Task Runner fails sometimes on Python Commands and Script tasks HOT 3
- Concurrency Limit can be exceeded by RESTARED tasks
- Add delay before displaying detailed information when hovering over plugins HOT 1
- Restart a real time trigger from the UI
- No worker job resubmission when using a STANDALONE and an separate WORKER
- Change the 404 page
- Prepare a new design of the plugin properties display HOT 3
- Provides a better error message when Kestra cannot be started due to misconfiguration
- Every typed input on the editor will send a subgraph request
- Invalid plugins will break the whole json schema
- Kestra s3 and minio storage plugins are incompatible with Ceph HOT 1
- Add a few of the Namespace endpoints to OSS version HOT 2
- Documentation, topology, blueprints are not visible on a new flow that hasn't been saved yet
- Prefil Inputs Encountering an Error HOT 1
- Kubernetes Task Runner Icon not displaying
- R script example has a missing double quote
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.