kestra-io / kestra

Infinitely scalable, event-driven, language-agnostic orchestration and scheduling platform to manage millions of workflows declaratively in code.
https://kestra.io
Apache License 2.0
7.63k stars 463 forks source link

Allow having a custom 'flow version' on creation of a new flow revision from CI/CD #1547

Open yuri1969 opened 1 year ago

yuri1969 commented 1 year ago

Feature description

To allow tracking the flow changes directly in Kestra UI/API it is required to be able to specify a custom flow version besides the auto-incremented internal flow revision. This way it would be possible to actually see and track the flow change from the Kestra UI back to the specific external change request, etc.

For example, flows imported via CI/CD have a Git commit ID associated or use semantic versioning. This information should be accessible in Kestra UI/API.

Similarly flows edited via the web UI editor should allow specifying a version before saving the flow change.

The existing execution/flow labels could be leveraged - eg. git/version: 2.1.1.

Related to 867 and 1325.

Melkaz commented 1 year ago

We would also love this :)

anna-geller commented 1 year ago

@yuri1969 WDYT about using labels for that purpose? we were talking about it via Slack with @Melkaz and labels seem to fit the requirement very well, as you could filter for specific Executions of a custom version this way. We could investigate how to make that easier to add e.g. a Git commit SHA flow label from CI/CD and Terraform without having to modify the flow code.

yuri1969 commented 1 year ago

@anna-geller Using execution labels would still keep the editor's diff view present the internal numeric flow versions, right? If so, I would still find that style of versioning confusing.

anna-geller commented 4 weeks ago

TODOs to address it: