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 unauthenticated Rust Flytekit Remote Client Task endpoints #2414

Merged

Conversation

austin362667
Copy link
Collaborator

@austin362667 austin362667 commented May 14, 2024

Tracking issue

flyteorg/flyte#5344

Why are the changes needed?

This PR aims to be the first subtask that validates the feasibility of replacing Python gRPC with Rust one.

What changes were proposed in this pull request?

As a minimum viable PR, we target at end-to-end testing without authentication, and again it supports Task endpoints only at the present time.

Add a flag enable_rust to the FlyteRemote class. When this flag is true, FlyteRemote will use the rust implementation.

remote_rs = FlyteRemote(Config.auto(), default_project=PROJECT, default_domain=DOMAIN, enable_rust=True)
flyte_task = remote_rs.register_task(
    entity=my_test_task,
    serialization_settings=SerializationSettings(
        image_config=ImageConfig.auto(img_name="flyte-cr.io/image-name:tag")
    ),
    version=VERSION_ID,
)
flyte_task = remote_rs.fetch_task(name=TASK_NAME, version=VERSION_ID)

4 task-related APIs in flytekit/clients/friendly_rs.py and flyrs/src/lib.py,

  • create_task()
  • list_task_ids_paginated()
  • list_tasks_paginated()
  • get_task()

The communication between flytekit.remote(Python) flyrs.FlyteRemote(Rust) is throrugh serialization/deserialization as bytes string.

How was this patch tested?

Setup process

Please walk through #2415 .

Screenshots

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]>
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]>

add no-auth caveat

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]>

lint

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]>
Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@pingsutw pingsutw merged commit 442d60f into flyteorg:flyrs May 15, 2024
87 of 89 checks passed
austin362667 added a commit to austin362667/flytekit that referenced this pull request May 15, 2024
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