-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Describe the issue
Description
When trying to sync a Kestra tenant to Git using the io.kestra.plugin.git.TenantSync task, the export fails if there are flows with invalid syntax, even when onInvalidSyntax is explicitly set to something other than FAIL (e.g. WARN or SKIP).
This prevents us from saving the full state of our Kestra instance to Git.
Context
We have a few legacy flows that are currently invalid because they rely on plugins incompatible with our current Java version. These flows are intentionally kept as-is and are expected to become valid again later without requiring any changes.
Our goal is to back up the tenant (including these flows) to Git until they can be reused.
Expected behavior
When onInvalidSyntax is set to WARN (or SKIP), the tenant sync should continue and simply warn or skip invalid flows, without failing the entire TenantSync task.
Actual behavior
The TenantSync task fails during flow export, ignoring the onInvalidSyntax setting.
Steps to reproduce
Have at least one invalid flow stored in Kestra
My case : a flow using a non-existent or incompatible plugin type.
Configure a TenantSync task with:
onInvalidSyntax set to WARN (or any value other than FAIL)
Run the TenantSync task.
The task fails instead of warning or skipping the invalid flow.
Configuration example
- id: sync_tenant
type: io.kestra.plugin.git.TenantSync
url: https://my_local_git.com/kestra_sync
kestraUrl: "http://x.x.x.x:8080/kestra"
branch: test
whenMissingInSource: KEEP
sourceOfTruth: KESTRA
onInvalidSyntax: WARN
auth:
password: "{{ secret('SERVICE_INTERNAL_KESTRA_API_PASSWORD') }}"
username: "kestra@kestra.kestra"
password: "{{ secret('SERVICE_KESTRA_GITLAB_TOKEN') }}"
username: "svc_kestra"Error logs and stack trace extract
ERROR: Failed to export flows from Kestra for namespace company
ERROR: Invalid type: io.kestra.plugin.serdes.xml.XmlToIon
TRACE :
at io.kestra.plugin.git.TenantSync.fetchFlowsFromKestra(TenantSync.java:745)
at io.kestra.plugin.git.TenantSync.run(TenantSync.java:233)
at io.kestra.plugin.git.TenantSync.run(TenantSync.java:42)
Environment
- Kestra Version: 1.2.2