Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hangup workflow listener when workflow run finishes #161

Merged
merged 20 commits into from
Feb 9, 2024

Conversation

abelanger5
Copy link
Contributor

Description

Listeners rely on client-side cancellation to hang up. This hangs up the listener if the workflow run finishes.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

What's Changed

Copy link

vercel bot commented Feb 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hatchet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2024 4:33pm

print('failure stopping listener...')
break

if payload and stop_step and stop_step in payload and eventType != StepRunEventType.STEP_RUN_EVENT_TYPE_STARTED:
Copy link
Contributor

Choose a reason for hiding this comment

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

oops, might want to remove this block now that we have signaling and hangups.

if workflow_event.eventPayload:
payload = json.loads(workflow_event.eventPayload)

# TODO: eventually call a handler here
Copy link
Contributor

Choose a reason for hiding this comment

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

rm comment, this is handled in the on method

@abelanger5 abelanger5 merged commit f8e9c8b into main Feb 9, 2024
15 of 17 checks passed
@abelanger5 abelanger5 deleted the belanger/listener-hangup branch February 9, 2024 16:35
steebchen added a commit that referenced this pull request Feb 12, 2024
grutt added a commit that referenced this pull request Feb 13, 2024
* hotfix: add repository for npm publish

* release(py-sdk): bump version

* chore: ignore venv

* feat(dashboard): collapsible sidebar

* fix: hangup workflow listener when workflow run finishes (#161)

* wip: class based listener pattern

* fix: workflow run listener hangups

* fix: hang up workflow listener on finished

* fix: case for current workflow run

* address review comments

* bump version

---------

Co-authored-by: g <gabriel.ruttner@gmail.com>

* wip: focus state and flat playground

* fix: focus state

* feat: unify state

* wip: playground state

* cleanup: rm logging

* fix: default output

* cleanup: rm deadcode

* feat: can replay individual steps

* feat: icon tabs

* feat: sticky output

* cleanup: linting

---------

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
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.

2 participants