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

Fix the unit tests that use Rust FlyteIDL #2811

Merged
merged 36 commits into from
Oct 18, 2024

Conversation

austin362667
Copy link
Collaborator

@austin362667 austin362667 commented Oct 13, 2024

Tracking issue

Follow-ups in #2561

Why are the changes needed?

The unit tests of flyrs-v2 dev branch should also be updated to the corresponding flyteidl_rust in flyteorg/flyte#5525

What changes were proposed in this pull request?

Beyond fixing all unit tests to use new flyteidl_rust, there are some pending todos:

  1. PyO3 not support pickling in Python:
    As it's not currently supported by PyO3. So Flyte keeps failing on pickling exposed flyteidl_rust objects.

    • I decided to temporarily mark them as flyteidl_rust and skip in pytest.
    • For more details on supporting pickle serialization in PyO3, please check Pickle Support PyO3/pyo3#100 (One of the oldest lasting issues..).
  2. OpenSSL linking not found:

    • Currently, only the Windows CI is failing because the Rust openssl[vendored] crate can't link to OpenSSL. I've tried both static and dynamic linking.
    • With dynamic linking, it can compile, but an error occurs when importing the Python module. The solution is to copy the .dll file inside the Python module folder.
    • However, I think a better solution would be to directly replace openssl with rustls. Please refer to this discussion.

How was this patch tested?

Rather than directly installing flyteidl_rust from https://test.pypi.org/project/flyteidl-rust/. We build flyteidl_rust from flyteorg/flyte#5525 source code to simulate future development process, users modify new protos then build the new flyteidl_rust python package locally.

Setup process

Screenshots

As you can see, only windows CI failed due to OpenSSL compilation and static linking error:
Screenshot 2024-10-16 at 8 12 24 PM

Check all the applicable boxes

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

Related PRs

Docs link

Signed-off-by: Austin Liu <[email protected]>

Skip pickle error

Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
@austin362667 austin362667 changed the title Fix uint tests which use rust flyetidl Fix the uint tests that use Rust FlyteIDL. Oct 13, 2024
@austin362667 austin362667 changed the title Fix the uint tests that use Rust FlyteIDL. Fix the uint tests that use Rust FlyteIDL Oct 13, 2024
Signed-off-by: Austin Liu <[email protected]>

Set OPENSSL_DIR based on dynamic build path

Signed-off-by: Austin Liu <[email protected]>

Set OPENSSL_DIR based on dynamic build path

Signed-off-by: Austin Liu <[email protected]>

Set OPENSSL_DIR based on dynamic build path

Signed-off-by: Austin Liu <[email protected]>

Set OPENSSL_DIR based on dynamic build path

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

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 3.50877% with 55 lines in your changes missing coverage. Please review.

Please upload report for BASE (flyrs-v2@5c8f1e7). Learn more about missing BASE report.

Files with missing lines Patch % Lines
flytekit/core/utils.py 0.00% 14 Missing ⚠️
flytekit/models/core/condition.py 0.00% 14 Missing ⚠️
flytekit/models/common.py 0.00% 9 Missing ⚠️
flytekit/models/core/workflow.py 0.00% 9 Missing ⚠️
flytekit/extras/accelerators.py 0.00% 2 Missing ⚠️
flytekit/clients/friendly.py 0.00% 1 Missing ⚠️
flytekit/core/array_node.py 0.00% 1 Missing ⚠️
flytekit/core/artifact.py 0.00% 1 Missing ⚠️
flytekit/core/local_cache.py 0.00% 1 Missing ⚠️
flytekit/models/admin/common.py 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff             @@
##             flyrs-v2    #2811   +/-   ##
===========================================
  Coverage            ?   37.61%           
===========================================
  Files               ?      183           
  Lines               ?    19042           
  Branches            ?     2470           
===========================================
  Hits                ?     7163           
  Misses              ?    11692           
  Partials            ?      187           

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

Signed-off-by: Austin Liu <[email protected]>

Fix maturin build

Signed-off-by: Austin Liu <[email protected]>

Fix maturin build

Signed-off-by: Austin Liu <[email protected]>
@austin362667 austin362667 force-pushed the flyrs-v2 branch 3 times, most recently from 38ee3ad to 169a41a Compare October 14, 2024 15:06
Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>

Clean up

Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>

Add vcpkg

Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>

Add vcpkg

Signed-off-by: Austin Liu <[email protected]>

Add vcpkg

Signed-off-by: Austin Liu <[email protected]>

Add vcpkg

Signed-off-by: Austin Liu <[email protected]>

Add vcpkg

Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>

Fix windows link path

Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>

Fix windows install path

Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
Signed-off-by: Austin Liu <[email protected]>
@Future-Outlier Future-Outlier changed the title Fix the uint tests that use Rust FlyteIDL Fix the unit tests that use Rust FlyteIDL Oct 18, 2024
@pingsutw pingsutw merged commit edeb2ba into flyteorg:flyrs-v2 Oct 18, 2024
11 of 13 checks passed
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