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

Add Tuple idl #5720

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add Tuple idl #5720

wants to merge 5 commits into from

Conversation

Mecoli1219
Copy link

@Mecoli1219 Mecoli1219 commented Sep 3, 2024

Tracking issue

#1337
#3158
#4358

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

RFC: #5699

Docs link

@Mecoli1219 Mecoli1219 changed the title Add Tuple idl [WIP] Add Tuple idl Sep 3, 2024
@pingsutw pingsutw marked this pull request as ready for review September 3, 2024 21:33
@Mecoli1219 Mecoli1219 changed the title [WIP] Add Tuple idl Add Tuple idl Sep 7, 2024
Comment on lines +670 to +681
case *core.LiteralType_TupleType:
// TO_DISCUSS: How to handle the tuple interface in Inputs field of flytectl?
//
// [Example usage]
// inputs:
// tuple_data:
// key1: "foo"
// key2: 123

vMap, ok := v.(map[string]interface{})
if !ok {
return nil, errors.Errorf("Expected a map[string]interface{} for tuple type, got [%v]", v)
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain more?

Copy link
Author

Choose a reason for hiding this comment

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

In this part, the LiteralType is already given, so the name of the tuple and the order of each field should be already defined. The only thing that is missing is the value of each field.
Therefore, we only need to provide the value of each tuple field (via the key-value pair of each field) in flytectl for the registered task or workflow for further execution needs.

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