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

Add createworkflow failure proto #minor #331

Merged
merged 4 commits into from
Oct 24, 2022
Merged

Add createworkflow failure proto #minor #331

merged 4 commits into from
Oct 24, 2022

Conversation

jerempy
Copy link
Contributor

@jerempy jerempy commented Oct 17, 2022

TL;DR

Adds createworkflow failure proto. This is for more concrete return values when a workflow fails to get created.
For context: flyteorg/flyteadmin#487 (comment)

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

How did you fix the bug, make the feature etc. Link to any design docs etc

Tracking Issue

Remove the 'fixes' keyword if there will be multiple PRs to fix the linked issue

flyteorg/flyte#2522

Follow-up issue

NA
OR
https://github.com/flyteorg/flyte/issues/

@welcome
Copy link

welcome bot commented Oct 17, 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).

@jerempy
Copy link
Contributor Author

jerempy commented Oct 17, 2022

@katrogan Would you mind taking a look at this? If it looks good to you, would you mind helping me compile the protobufs? This is out of my wheelhouse unfortunately 😞


// The workflow id is already used and the structure is different
message WorkflowErrorExistsDifferentStructure {
string id = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

}

// The workflow id is already used with an identical sctructure
message WorkflowErrorExistsIdenticalStructure {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we need this message since we return a different gRPC status code (AlreadyExists) for this scenario

Copy link
Contributor

Choose a reason for hiding this comment

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

although perhaps it would be nice to keep this to include the existing workflow id 👍

Copy link
Contributor

@katrogan katrogan left a comment

Choose a reason for hiding this comment

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

hey @jerempy thanks for opening this! can you try these instructions for generating proto code and let me know if that works for you?

@jerempy
Copy link
Contributor Author

jerempy commented Oct 17, 2022

hey @jerempy thanks for opening this! can you try these instructions for generating proto code and let me know if that works for you?

Hey there, I did try that and had difficulties. It looks dated since there is no "download_tooling" in the makefile. I tried looking at different things in the make file and couldn't figure out what I was missing. Any other ideas?

@katrogan
Copy link
Contributor

ah @jerempy the top-level Makefile should import the boilerplate one with the target:

@jerempy
Copy link
Contributor Author

jerempy commented Oct 18, 2022

@katrogan thanks for all the input! I updated the type for the id - good spotting that!
Thanks for the direction on getting the compiler to work, but I just seem to not be having any luck. Maybe its cuz im on windows 10. I tried through my cmd prompt. I tried through wsl, and I tried to git bash.

When trying to run make command in wsl I would get this error:

Makefile:17: warning: overriding recipe for target 'generate'
boilerplate/flyte/golang_test_targets/Makefile:13: warning: ignoring old recipe for target 'generate'
Makefile:30: warning: overriding recipe for target 'test_unit'
boilerplate/flyte/golang_test_targets/Makefile:38: warning: ignoring old recipe for target 'test_unit'
make: boilerplate/flyte/golang_test_targets/download_tooling.sh: Command not found
make: *** [boilerplate/flyte/golang_test_targets/Makefile:9: download_tooling] Error 127

I tried running the .sh scripts directy and that didn't turn out so good. Wanted to delete 1200 files as a result 😨
So for now I just changed the types on the id and I think I'm a bit out of luck on this one. unfortunately. I might try again tomorrow

@katrogan
Copy link
Contributor

katrogan commented Oct 18, 2022

hey @jerempy do you mind filing an issue dumping what you ran into? I'm sorry this process doesn't work out of the box :(

I can help you with the generation for now. But in the meantime, could I ask you to move the new proto message definitions to the admin workflow proto def: https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/admin/workflow.proto rather than the core one you've defined them in now?

@jerempy
Copy link
Contributor Author

jerempy commented Oct 18, 2022

@katrogan ok great. thanks much for your help! and good spottin on the location - I moved it. Thanks! 🙏

Signed-off-by: Katrina Rogan <[email protected]>
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #331 (8a7a0df) into master (70aea35) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #331   +/-   ##
=======================================
  Coverage   75.57%   75.57%           
=======================================
  Files          18       18           
  Lines        1171     1171           
=======================================
  Hits          885      885           
  Misses        235      235           
  Partials       51       51           
Flag Coverage Δ
unittests 75.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@katrogan
Copy link
Contributor

@EngHabu since you also reviewed the corresponding admin PR, mind reviewing this one too?

Copy link
Contributor

@EngHabu EngHabu left a comment

Choose a reason for hiding this comment

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

Thank you for taking on that work! Mind linking to an issue too?

}

// When a CreateWorkflowRequest failes due to matching id
message CreateWorkflowFailureReason {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do the same for tasks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What if we do that in a seperate issue/ pr series? I can make the issue for it as a follow up after finishing this one if you want.

Copy link
Contributor

Choose a reason for hiding this comment

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

That would be awesome!


// The workflow id is already used and the structure is different
message WorkflowErrorExistsDifferentStructure {
core.Identifier id = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we include the structure of the other workflow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Current plan was to return the id of the workflow to the sdk client and then to get the workflow and as part of the exception handling to then compare the diff with the initial request

@jerempy
Copy link
Contributor Author

jerempy commented Oct 19, 2022

@EngHabu thanks for reviewing! I updated the top comment to Include the issue. And thanks @katrogan for compiling for me!

@jerempy jerempy requested review from EngHabu and removed request for EngHabu October 21, 2022 11:50
@jerempy
Copy link
Contributor Author

jerempy commented Oct 24, 2022

@EngHabu @katrogan if possible, think we could merge this today? After this one is done then I still need to re-do the flyeadmin PR and then the flytekit PR to get this issue resolved and I only got 7 days left until the end of the month 🙏

}

// When a CreateWorkflowRequest failes due to matching id
message CreateWorkflowFailureReason {
Copy link
Contributor

Choose a reason for hiding this comment

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

That would be awesome!

@katrogan katrogan merged commit 6965b90 into flyteorg:master Oct 24, 2022
@welcome
Copy link

welcome bot commented Oct 24, 2022

Congrats on merging your first pull request! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants