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

[flytectl][MSGPACK IDL] Gate feature by setting ENV #5976

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Nov 8, 2024

Tracking issue

#5318

Why are the changes needed?

We want to ease the pain of generic IDL -> msgpack IDL when the user upgrades to flyte 1.14.

What changes were proposed in this pull request?

  1. if os.environ["FLYTE_USE_OLD_DC_FORMAT"] = "true", then use old behavior to generate protobuf struct in the generic IDL.
    else generate msgpack IDL.
  2. add back unit tests deleted in this PR:
    [flytectl] Use Protobuf Struct as dataclass Input for backward compatibility #5840

note: use envs is passed to flyteadmin to inform that the first task pod need to inject envs in this file, but not be used to command line create protobuf struct.

iamRoleARN: ""
inputs:
    dc:
        a: 1
        b: 3.14
        c: example_string
envs:
    FLYTE_USE_OLD_DC_FORMAT: true  # Here doesn't work to produce protobuf struct
kubeServiceAcct: ""
targetDomain: ""
targetProject: ""
task: build.current_PR.priority_msgpack.backend_version.dataclass_all.t_dc
version: MO9p1YLmOU041912EgsVUg

How was this patch tested?

use flytectl create execution and unit test.

Setup process

  1. pyflyte run --remote a worfklow

  2. (msgpack idl) use flytectl to create an execution

  3. (protobuf struct) use flytectl to create an execution

iamRoleARN: ""
inputs:
    dc:
        a: 1
        b: 3.14
        c: example_string

kubeServiceAcct: ""
targetDomain: ""
targetProject: ""
task: build.current_PR.priority_msgpack.backend_version.dataclass_all.t_dc
version: MO9p1YLmOU041912EgsVUg

Screenshots

msgpack idl

flytectl create execution --execFile /Users/future-outlier/code/dev/flytekit/build/current_PR/priority_msgpack/flytectl_env/flytectl/create_json_dataclass.yaml -p flytesnacks -d development
execution identifier project:"flytesnacks" domain:"development" name:"a7q4ppv6szk8tqp7972m"
image

protobuf struct

FLYTE_USE_OLD_DC_FORMAT=true flytectl create execution --execFile /Users/future-outlier/code/dev/flytekit/build/current_PR/priority_msgpack/flytectl_env/flytectl/create_json_dataclass.yaml -p flytesnacks -d development
execution identifier project:"flytesnacks" domain:"development" name:"a8vxtjr4r6z2kgbk46jv"
image

Check all the applicable boxes

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

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 36.94%. Comparing base (25cfe16) to head (c9194b6).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
flyteidl/clients/go/coreutils/literals.go 75.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5976      +/-   ##
==========================================
+ Coverage   33.09%   36.94%   +3.85%     
==========================================
  Files        1013     1310     +297     
  Lines      107489   131391   +23902     
==========================================
+ Hits        35570    48546   +12976     
- Misses      68767    78631    +9864     
- Partials     3152     4214    +1062     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.05% <ø> (?)
unittests-flytecopilot 22.23% <ø> (ø)
unittests-flytectl 62.39% <ø> (-0.05%) ⬇️
unittests-flyteidl 6.95% <75.00%> (+0.03%) ⬆️
unittests-flyteplugins 53.84% <ø> (ø)
unittests-flytepropeller 43.08% <ø> (+0.17%) ⬆️
unittests-flytestdlib 55.31% <ø> (ø)

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.

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
@Future-Outlier Future-Outlier changed the title [wip][flytectl][MSGPACK IDL] Gate feature by setting ENV [flytectl][MSGPACK IDL] Gate feature by setting ENV Nov 11, 2024
@Future-Outlier Future-Outlier enabled auto-merge (squash) November 11, 2024 05:48
@Future-Outlier Future-Outlier merged commit 5d5bbe8 into master Nov 11, 2024
51 checks passed
@Future-Outlier Future-Outlier deleted the flytectl-msgpack-backward-compatible branch November 11, 2024 15:57
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