Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add support for GateNode with signal and sleep condition #436

Merged
merged 33 commits into from Dec 1, 2022

Conversation

hamersaw
Copy link
Contributor

@hamersaw hamersaw commented May 4, 2022

TL;DR

Adding support for GateNodes. These nodes block execution of the downstream based on a condition. Initially, we will implement sleeping, which block for a predefined duration, and manual signals, which require a user to notify that execution may proceed. Signals may also carry values, so a user can pass a variable which may be used in downstream nodes.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

^^^

Tracking Issue

flyteorg/flyte#208

Follow-up issue

NA

@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #436 (ea04074) into master (6de8831) will decrease coverage by 0.09%.
The diff coverage is 49.33%.

@hamersaw
Copy link
Contributor Author

cc @kumare3 @EngHabu the only thing I am not sure on here is configuration of the output variable name from a signal. All the binding lookups are performed using input variable names into the actual written protobuf results. In these cases it seems like flytekit may use the python variable name? Does it make sense to set the Signal variable name in the proto?

@hamersaw hamersaw changed the title Feature/gate nodes Add support for GateNode with signal and sleep condition Jun 15, 2022
flyte-bot and others added 23 commits September 9, 2022 19:46
Signed-off-by: Flyte-Bot <admin@flyte.org>
Signed-off-by: Flyte-Bot <admin@flyte.org>
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
Signed-off-by: Flyte-Bot <admin@flyte.org>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
…tput

Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
…racking in gate node status

Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Dan Rammer <daniel@union.ai>
Signed-off-by: Dan Rammer <daniel@union.ai>
@hamersaw hamersaw merged commit 4114572 into master Dec 1, 2022
@hamersaw hamersaw deleted the feature/gate-nodes branch December 1, 2022 18:31
eapolinario pushed a commit to eapolinario/flytepropeller that referenced this pull request Aug 9, 2023
* Update flyteidl version

Signed-off-by: Flyte-Bot <admin@flyte.org>

* Update flyteidl version

Signed-off-by: Flyte-Bot <admin@flyte.org>

* Fix build break

Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>

* Update flyteidl version

Signed-off-by: Flyte-Bot <admin@flyte.org>

* added GateNode to compiler

Signed-off-by: Daniel Rammer <daniel@union.ai>

* added gate node handler

Signed-off-by: Daniel Rammer <daniel@union.ai>

* enable reading and setting gate node state

Signed-off-by: Daniel Rammer <daniel@union.ai>

* gate nodes working

Signed-off-by: Daniel Rammer <daniel@union.ai>

* changed Conditional to Condition in proto naming

Signed-off-by: Daniel Rammer <daniel@union.ai>

* passing admin client to gate node handler

Signed-off-by: Daniel Rammer <daniel@union.ai>

* using signal service client to check for signal in admin and write output

Signed-off-by: Daniel Rammer <daniel@union.ai>

* updated comments

Signed-off-by: Daniel Rammer <daniel@union.ai>

* completed implementation

Signed-off-by: Daniel Rammer <daniel@union.ai>

* added unit tests for gate node

Signed-off-by: Daniel Rammer <daniel@union.ai>

* fixed unit tests with missing signal mocks

Signed-off-by: Daniel Rammer <daniel@union.ai>

* added docs on gate node handler

Signed-off-by: Daniel Rammer <daniel@union.ai>

* fixed lint issues

Signed-off-by: Daniel Rammer <daniel@union.ai>

* updating flyteidl dependency

Signed-off-by: Daniel Rammer <daniel@union.ai>

* fixed lint issue

Signed-off-by: Daniel Rammer <daniel@union.ai>

* added output variable name to signal condition

Signed-off-by: Daniel Rammer <daniel@union.ai>

* using last attempt started at timestamp on node context rather than tracking in gate node status

Signed-off-by: Daniel Rammer <daniel@union.ai>

* updated GateNodeStatus mocks

Signed-off-by: Daniel Rammer <daniel@union.ai>

* fixed lint issue

Signed-off-by: Daniel Rammer <daniel@union.ai>

* fixed unit tests

Signed-off-by: Daniel Rammer <daniel@union.ai>

* updated flyteidl deps

Signed-off-by: Daniel Rammer <daniel@union.ai>

* update flyteidl deps

Signed-off-by: Daniel Rammer <daniel@union.ai>

* added interface validation for approve condition

Signed-off-by: Daniel Rammer <daniel@union.ai>

* added approve condition unit tests

Signed-off-by: Daniel Rammer <daniel@union.ai>

* fixed missed merge conflict updating to slice of dial options

Signed-off-by: Daniel Rammer <daniel@union.ai>

* update generated mocks

Signed-off-by: Dan Rammer <daniel@union.ai>

Signed-off-by: Flyte-Bot <admin@flyte.org>
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Dan Rammer <daniel@union.ai>
Co-authored-by: flyte-bot <flyte-bot@users.noreply.github.com>
Co-authored-by: Haytham Abuelfutuh <haytham@afutuh.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants