If a flow is unchanged and already register, when I register it again flow.register(project_name="Some Name") it produced a new version.
Either not register a flow if it's identical to the latest or have a flag in flow.register() which will only register the flow if different from the latest version.
flow.register(project_name="Some Name", validate_difference=True) or something like that :)
This makes sense - we could store some type of hash of the JSON representation of the Flow in the backend, and only create a new Flow ID when the provided JSON payload doesn't match the old one.
Awesome idea @snenkov
This is definitely a pain point because if you want to register your flows using a CI/CD tool, then, the flow versioning becomes meaningless 馃槙
Yeah i would like to do the flow registration in my CI process. One way to handle this issue is to allow to pass some sort of ID of a flow, in CI case this can be a commit hash or md5 of flow source file.
This was closed by https://github.com/PrefectHQ/prefect/pull/3590 and is now released!
Most helpful comment
This was closed by https://github.com/PrefectHQ/prefect/pull/3590 and is now released!