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 7 commits into
base: master
Choose a base branch
from
Open

Add Tuple idl #5720

wants to merge 7 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.

Signed-off-by: Mecoli1219 <[email protected]>
Signed-off-by: Mecoli1219 <[email protected]>
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 79.59184% with 30 lines in your changes missing coverage. Please review.

Project coverage is 51.00%. Comparing base (28f65b3) to head (fa27e1a).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
flytepropeller/pkg/compiler/validators/bindings.go 58.69% 14 Missing and 5 partials ⚠️
...ytepropeller/pkg/controller/nodes/dynamic/utils.go 0.00% 5 Missing ⚠️
flytepropeller/pkg/controller/nodes/resolve.go 80.00% 2 Missing and 1 partial ⚠️
flytepropeller/pkg/visualize/visualize.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5720       +/-   ##
===========================================
+ Coverage   36.30%   51.00%   +14.70%     
===========================================
  Files        1305     1159      -146     
  Lines      110000    75156    -34844     
===========================================
- Hits        39932    38332     -1600     
+ Misses      65912    32845    -33067     
+ Partials     4156     3979      -177     
Flag Coverage Δ
unittests-datacatalog 51.37% <ø> (ø)
unittests-flyteadmin 55.59% <ø> (-0.04%) ⬇️
unittests-flytecopilot 12.17% <ø> (ø)
unittests-flytectl 62.40% <ø> (+0.18%) ⬆️
unittests-flyteidl ?
unittests-flyteplugins 53.35% <ø> (ø)
unittests-flytepropeller 42.11% <79.59%> (+0.22%) ⬆️
unittests-flytestdlib 55.19% <ø> (-0.03%) ⬇️

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Noteworthy PRs
Development

Successfully merging this pull request may close these issues.

2 participants