Conversation
flyte update trigger NAME TASK --to-version V points the trigger at a deployed task version and pins it there, so later deploys leave it alone; the same command rolls back. Adds remote.Trigger.promote and TriggerDetails.task_version / task_version_pinned. Signed-off-by: Daniel Sola <daniel.sola@union.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds promotion for triggers: point a trigger at a deployed task version and pin it there, so deploying new versions registers code without moving what the trigger runs. Needs
TriggerService.PromoteTriggerfrom the companionflyteorg/flytePR.A trigger that was never promoted follows every deploy, as today. The caller launches by trigger name and never names a version:
What changed
flyte update triggergains--to-version.--activate/--deactivateis now optional; at least one of the two is required, and both can be passed together. Output:Trigger prod: v1.4.0 -> v1.6.0.flyte.remote.Trigger.promote(name, task_name, task_version)returns(TriggerDetails, previous_task_version).TriggerDetails.task_versionandTriggerDetails.task_version_pinned.promote_triggerprotocol method uses string annotations, so task images that install a releasedflyteidl2without the new messages still import the client.How this was tested
tests/cli/test_update_trigger.py: promote, promote to the current version, activate only, and neither flag (usage error).ruffclean.Dependency
Needs a
flyteidl2release withPromoteTrigger;pyproject.tomlpinsflyteidl2==2.0.49. Merge after the proto PR lands and the pin is bumped.