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

[Docs] FlyteRemote example throws an error #4351

Closed
2 tasks done
davidmirror-ops opened this issue Nov 2, 2023 · 6 comments · Fixed by flyteorg/flytesnacks#1238
Closed
2 tasks done

[Docs] FlyteRemote example throws an error #4351

davidmirror-ops opened this issue Nov 2, 2023 · 6 comments · Fixed by flyteorg/flytesnacks#1238
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@davidmirror-ops
Copy link
Contributor

Description

While runnning the FlyteRemote example locally, the result is the following error message:

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.INVALID_ARGUMENT
        details = "missing project"
        debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:30080 {created_time:"2023-11-02T05:53:05.142633-05:00", grpc_status:3, 
grpc_message:"missing project"}"

There's no reference to look further into FlyteRemote Config. A manual search leads to the FlyteRemote page but even adding explicitly the config like this:

remote = FlyteRemote(config= Config.for_endpoint(endpoint="localhost:30088", config_file="$HOME/.flyte/config.yaml"),default_project="flytesnacks",default_domain="development")

leads to an error:

FileNotFoundError: [Errno 2] No such file or directory: '$HOME/.flyte/config.yaml'

I'm sure there's something really simple I'm missing but it's nowhere explained in the docs.

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@davidmirror-ops davidmirror-ops added documentation Improvements or additions to documentation untriaged This issues has not yet been looked at by the Maintainers labels Nov 2, 2023
@eapolinario
Copy link
Contributor

can you confirm the version of flytekit ?

@eapolinario eapolinario removed the untriaged This issues has not yet been looked at by the Maintainers label Nov 2, 2023
@davidmirror-ops
Copy link
Contributor Author

Ok, I was using 1.9.1.

I just switched to 1.10. I'm running a sandbox cluster so I used this:

remote = FlyteRemote(config= Config.for_sandbox()) and it successfully fetches the config and connects to the sandbox cluster but still misses the default project/domain:

"UNKNOWN:Error received from peer ipv4:127.0.0.1:30080 {created_time:"2023-11-03T05:16:21.508258-05:00", grpc_status:3, grpc_message:"missing project"}"

Once I explicitly indicate it:

remote = FlyteRemote(config= Config.for_sandbox(),default_project="flytesnacks",default_domain="development")

It works.

I wasn't able to find how to indicate a default project/domain in the config file .

cc @samhita-alla do you think this is something we should add to the docs? Am I missing a step so FlyteRemote discovers the default project/domain?

@samhita-alla
Copy link
Contributor

@davidmirror-ops, the default project and domain must be specified in the FlyteRemote config. Otherwise, you could also specify the project and domain during fetching or execution. Does that make sense?

@kumare3
Copy link
Contributor

kumare3 commented Nov 5, 2023

I think the error message should look better

@davidmirror-ops
Copy link
Contributor Author

@samhita-alla It makes sense. The problem is that this is not mentioned in the example, but it's written so the reader understands that config.auto() will generate all the necessary config, including the project/domain.

@samhita-alla
Copy link
Contributor

@davidmirror-ops, in that case, we need to update flyte remote docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants