08/24/2022, 12:05 AM
Not sure, why the flytectl says that the file taken from flytesnacks as invalid files when trying to register. Even the pyflyte package is not recognizing the file. Any idea? My local:
Copy code
flyte]$ tree workflows/

└── __pycache__
    ├── hello_world.cpython-37.pyc
    └── __init__.cpython-37.pyc
1 directory, 5 files
serializing using pyflyte which creates tar.gz file:
Copy code
flyte]$ pyflyte register workflows/ -d development  -p cloudops-max-flyte-demo

Output given as None, using a temporary directory at /tmp/tmplbj3dq0o instead
{"asctime": "2022-08-23 23:56:57,913", "name": "flytekit.remote", "levelname": "WARNING", "message": "Uploading /tmp/tmplbj3dq0o/fastd2800a4ca5d77817f85af258a1ca4eff.tar.gz to https://<my_bucket>.<|> native url s3://<my_bucket>/io/cloudops-max-flyte-demo/development/MKBVMY42N6USXMYOHFXIKC2DAI======/fastd2800a4ca5d77817f85af258a1ca4eff.tar.gz"}
Loading packages ['workflows.hello_world'] under source root /home/kkanagar/cloudops-max-flyte-demo/flyte
Successfully serialized 3 flyte objects
Registering using flytectl:
Copy code
flyte]$ flytectl register files /tmp/tmplbj3dq0o/fastd2800a4ca5d77817f85af258a1ca4eff.tar.gz  -d development  -p cloudops-max-flyte-demo --archive

{"json":{},"level":"error","msg":"failed to initialize token source provider. Err: failed to fetch auth metadata. Error: rpc error: code = Unimplemented desc = unknown service flyteidl.service.AuthMetadataService","ts":"2022-08-23T23:57:19Z"}
{"json":{},"level":"warning","msg":"Starting an unauthenticated client because: can't create authenticated channel without a TokenSourceProvider","ts":"2022-08-23T23:57:19Z"}
Error: input package have some invalid files. try to run pyflyte package again [/tmp/register3231572267/workflows/ /tmp/register3231572267/workflows/]
{"json":{},"level":"error","msg":"input package have some invalid files. try to run pyflyte package again [/tmp/register3231572267/workflows/ /tmp/register3231572267/workflows/]","ts":"2022-08-23T23:57:19Z"}

Samhita Alla

08/24/2022, 6:24 AM
Hi, @karthikraj! You need not run
flytectl register
pyflyte register
does the serialization and registration: Is there a folder that houses the workflow folder (like parent/) as @Yee suggested?
Copy code
(no init file here at this layer)