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

[PY-398] Polling on Item Push #708

Merged
merged 10 commits into from
Nov 20, 2023
Merged

[PY-398] Polling on Item Push #708

merged 10 commits into from
Nov 20, 2023

Conversation

saurbhc
Copy link
Member

@saurbhc saurbhc commented Nov 7, 2023

Problem

  1. Before pushing an item to the next stage, we need a way to make sure those items should have complted the processing.
  2. dataset-stage might not be the 1st staged returned from the API, which raises an error when pushed to next stage.

Solution

  1. Add Pooling on Item Push (before pushing item to next stage), with an optional wait parameter
  2. Additionally, fix dataset stage logic in Workflow obj

Changelog

Pooling on Item Push + Fix dataset stage logic

…cessing_status, update Meta Workflow obj - fix dataset stage
@saurbhc saurbhc added the enhancement New feature or request label Nov 7, 2023
@saurbhc saurbhc self-assigned this Nov 7, 2023
Copy link

linear bot commented Nov 7, 2023

PY-398 Polling on Item Push

Darwin py v2 workflow upload currently pushes new items to the next stage automatically but doesn't check whether processing of the item is complete.

  • poll each item on stage, waiting for complete
  • once all complete, then push to stage
  • Add status check to all remaining stage item move code
    • potentially with flag for behaviour, wait=True to poll, but if False Raises Exception

@saurbhc saurbhc marked this pull request as ready for review November 7, 2023 17:42
darwin/future/meta/objects/stage.py Outdated Show resolved Hide resolved
darwin/future/meta/objects/workflow.py Outdated Show resolved Hide resolved
Copy link
Contributor

@owencjones owencjones left a comment

Choose a reason for hiding this comment

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

I like it, with some suggestions - review comments before merge

darwin/future/meta/objects/stage.py Outdated Show resolved Hide resolved
darwin/future/meta/objects/stage.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Nathanjp91 Nathanjp91 left a comment

Choose a reason for hiding this comment

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

Minor changes on where the sleep happens.

darwin/future/meta/objects/stage.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Nathanjp91 Nathanjp91 left a comment

Choose a reason for hiding this comment

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

I'm happy now with the changes.

@saurbhc saurbhc merged commit 1cc483b into master Nov 20, 2023
13 checks passed
@saurbhc saurbhc deleted the PY-398 branch November 20, 2023 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants