Skip to content

Events API#279

Merged
SVilgelm merged 49 commits into
mainfrom
conditions
May 30, 2026
Merged

Events API#279
SVilgelm merged 49 commits into
mainfrom
conditions

Conversation

@kumare3
Copy link
Copy Markdown
Contributor

@kumare3 kumare3 commented Oct 18, 2025

No description provided.

Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Comment thread examples/advanced/events.py Outdated
prompt="Is it ok to continue?",
data_type=bool,
)
event2 = await flyte.new_event.aio(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should allow users to make the prompt fancy, like html etc (reports)
And then we should also have an even type that is a webhook invocation with a callback to signal

Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
@kumare3 kumare3 changed the title [wip] Events API Events API May 28, 2026
@kumare3 kumare3 marked this pull request as ready for review May 28, 2026 01:08
kumare3 added 2 commits May 27, 2026 18:29
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
kumare3 and others added 7 commits May 28, 2026 09:59
Enqueue rejected condition actions because input_uri was empty and the
proto enforces min_len=1. Pass a placeholder inputs path from
register_event through from_condition.

Assisted-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
Assisted-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
ActionUpdate carries the condition payload on field `value`; wire it
through Action.condition_output and convert via literal_to_python in
wait_for_event so event.wait() returns the bool/int/float/str instead
of always None.

Assisted-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
Mirror the task/trace path so the inputs_uri stamped on a condition
action resolves to a real (empty LiteralMap) blob and the backend's
GetActionData read no longer 404s.

Assisted-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
Resolve _controller.py conflict by keeping submit_and_wait_for_action
rename from conditions over submit_action from main. Drop dead
trace/timing call to _trace_enabled_for in _core._bg_wait_for_action
left over after the debug-log cleanup in #1127.

Signed-off-by: Sergey Vilgelm <sergey@union.ai>
This reverts commit 00f5103.

Signed-off-by: Sergey Vilgelm <sergey@union.ai>
kumare3 added 4 commits May 28, 2026 21:03
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
SVilgelm
SVilgelm previously approved these changes May 29, 2026
Signed-off-by: Ketan Umare <kumare3@users.noreply.github.com>
pingsutw and others added 6 commits May 29, 2026 00:38
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
New `flyte signal event <run> <action> <value>` resolves a paused
condition action. The value is coerced to bool/int/float/str using the
condition's declared LiteralType, read from
ActionMetadata.condition.type. Falls back gracefully when the field
isn't yet populated by the backend.

Also adds Event.expected_type for SDK callers and drops the stale
signal_event_remotely helper in the events example.

Assisted-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
`flyte signal event <run> <action>` now reads the condition's prompt
(and prompt_type) from the backend and pops an interactive click.prompt
typed to the expected payload. Passing `<value>` keeps the previous
non-interactive shape but also prints the prompt and the value being
signaled before sending.

Assisted-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
Lists events for a run, optionally filtered to a parent action via the
existing remote.Event.listall (which already filters list_actions to
ACTION_TYPE_CONDITION). Adds Event.__rich_repr__ so table output shows
event name, action id, run, phase, parent, and the inferred payload type
when the backend exposes it.

Assisted-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Sergey Vilgelm <sergey@union.ai>
Resolve _controller.RemoteController.__init__ conflict by keeping both
new attributes: _submit_init_lock from #1130 (lock around submit_sync)
and _pending_events from conditions (event registration store).

Signed-off-by: Sergey Vilgelm <sergey@union.ai>
@SVilgelm SVilgelm merged commit 9daceb0 into main May 30, 2026
39 checks passed
@SVilgelm SVilgelm deleted the conditions branch May 30, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants