<#5264 [Housekeeping] Decouple `flytekit.remote` t...
# flyte-github
c
#5264 [Housekeeping] Decouple
flytekit.remote
to
flytekit.remote
and
flytekit.remote_utils
Issue created by austin362667 ### Describe the issue We have the needs of porting
FlytekitRemote
into
RustFlyteRemote
with same high level behaviours recently. We might have to decouple
flytekit.remote
into two separated modules
flytekit.remote
and
flytekit.remote_utils
, because these imports requiring the initialization of
remote.py
from
flytekit.remote
.
remote.py
uses grpc clients. To completely remove Python
grpc
packages. We need refactoring
remote_utils
in advance. So
RustFlyteRemote
can only import
flytekit.remote_utils
without triggering
flytekit/remote/__init__.py
stuffs. We should be able only import
remote_utils
like
from flytekit.remote.backfill import create_backfill_workflow
, etc, without the needs of importing
flytekit.remote.remote
. For example, the following file system layout defines a top level parent package with three subpackages: parent/ init.py one/ init.py two/ init.py three/ init.py Importing
parent.one
will implicitly execute
parent/__init__.py
and
parent/one/__init__.py
. FYI ### What if we do not do this?
remote.py
depends on
grpc
in SynchronousFlyteClient. So if we
pip uninstall grpcio grpcio-status
and only use
RustFlyteRemote
still causes issues like following screenshot. ### Related component(s) [Screenshot 2024-04-22 at 9 17 11 PM](https://private-user-images.githubusercontent.com/35886692/324474679-6fc47b9c-f9b6-465b-a00d-3f7cf441c8de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDg2NTA1MjMsIm5iZiI6MTc0ODY1MDIyMywicGF0aCI6Ii8zNTg4NjY5Mi8zMjQ0NzQ2NzktNmZjNDdiOWMtZjliNi00NjViLWEwMGQtM2Y3Y2Y0NDFjOGRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA1MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTMxVDAwMTAyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZjNTdhY2Y0NTlhZDY2YmYxMGUyODA5NDQ0OTM5MmNkNGVkZTBlZTc4ZDk3YWI1OWNkNTRhY2U2NGRhYzdjMzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.iTMlOQeI6bmV1NEiBWGjG43Qlej8LvYSwwfUEE1oba0) ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte