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

Update get_serializable_workflow to consistently generate the same subworkflow order #1011

Merged
merged 2 commits into from
May 20, 2022

Conversation

vvasavada-fn
Copy link
Contributor

@vvasavada-fn vvasavada-fn commented May 19, 2022

TL;DR

We observed a bug when registering a workflow that directly calls one or more workflows. The first time I register it, it completes successfully. In subsequent times, we would expect it to skip the workflow / tasks, because there are no changes and the registration already happened. However, sometimes when you go to register again, instead of skipping, it produces an error that "workflow with different structure already exists with id resource_type". This is because the serialized versions of the parent workflow are different across calls to registration.

This PR this issue by ensuring that get_serializable_workflow returns the subworkflow dictionaries in the same order every time it is called.

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

The main open question I have is is this the correct place for this change to be made? Or should this be made on the flyteadmin side?

Tracking Issue

fixes flyteorg/flyte#2508

Follow-up issue

NA

@welcome
Copy link

welcome bot commented May 19, 2022

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

Signed-off-by: Vrinda Vasavada <[email protected]>
@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.26%. Comparing base (e057f2a) to head (9ca070d).
Report is 1083 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1011      +/-   ##
==========================================
- Coverage   86.39%   86.26%   -0.13%     
==========================================
  Files         255      255              
  Lines       24417    24417              
  Branches     2775     2776       +1     
==========================================
- Hits        21095    21064      -31     
- Misses       2850     2865      +15     
- Partials      472      488      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Vrinda Vasavada <[email protected]>
@eapolinario eapolinario merged commit 519f93c into flyteorg:master May 20, 2022
@welcome
Copy link

welcome bot commented May 20, 2022

Congrats on merging your first pull request! 🎉

wild-endeavor added a commit that referenced this pull request May 20, 2022
Signed-off-by: Yee Hing Tong <[email protected]>
eapolinario added a commit that referenced this pull request May 24, 2022
* backport #1011 to 0.26

Signed-off-by: Yee Hing Tong <[email protected]>

* update pytest-flyte protocol in requirements file

Signed-off-by: Yee Hing Tong <[email protected]>

* bump black to 22.3.0 and make fmt

Signed-off-by: Yee Hing Tong <[email protected]>

* Fix url in sqlite tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* pip install -r requirements.txt for plugins tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* delete ci for integration tests

Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>

* bump flyteidl to 0.21.11 to pick up cache_serialize change

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix docs failures

Signed-off-by: Eduardo Apolinario <[email protected]>

* Bump version of codecov-action to 1.5.2

Signed-off-by: Eduardo Apolinario <[email protected]>

Co-authored-by: Eduardo Apolinario <[email protected]>
reverson pushed a commit to reverson/flytekit that referenced this pull request May 27, 2022
* backport flyteorg#1011 to 0.26

Signed-off-by: Yee Hing Tong <[email protected]>

* update pytest-flyte protocol in requirements file

Signed-off-by: Yee Hing Tong <[email protected]>

* bump black to 22.3.0 and make fmt

Signed-off-by: Yee Hing Tong <[email protected]>

* Fix url in sqlite tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* pip install -r requirements.txt for plugins tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* delete ci for integration tests

Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>

* bump flyteidl to 0.21.11 to pick up cache_serialize change

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix docs failures

Signed-off-by: Eduardo Apolinario <[email protected]>

* Bump version of codecov-action to 1.5.2

Signed-off-by: Eduardo Apolinario <[email protected]>

Co-authored-by: Eduardo Apolinario <[email protected]>
eapolinario pushed a commit that referenced this pull request Jun 17, 2022
…bworkflow order (#1011)

* update get_serializable_workflow

Signed-off-by: Vrinda Vasavada <[email protected]>

* make fmt

Signed-off-by: Vrinda Vasavada <[email protected]>
@eapolinario eapolinario mentioned this pull request Jun 17, 2022
8 tasks
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.

[BUG] Registering the same workflow twice causes an invalid argument error
2 participants