Not sure, why the flytectl says that the file take...
# announcements
k
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/

workflows/
├── hello_world.py
├── __init__.py
└── __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/hello_world.py -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>.<http://s3.amazonaws.com/io/cloudops-max-flyte-demo/development/MKBVMY42N6USXMYOHFXIKC2DAI%3D%3D%3D%3D%3D%3D/fastd2800a4ca5d77817f85af258a1ca4eff.tar.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=XXXXXXXXXXXXXXXXXXXXXXXXX-Amz-SignedHeaders=content-md5%3Bhost&X-Amz-Signature=XXXXXXXXXXXXXXXXXXXXX|s3.amazonaws.com/io/cloudops-max-flyte-demo/development/MKBVMY42N6USXMYOHFXIKC2DAI%3D%3D%3D%3D%3D%3D/fastd2800a4ca5d77817f85af258a1ca4eff.tar.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=XXXXXXXXXXXXXXXXXXXXXXXXX-Amz-SignedHeaders=content-md5%3Bhost&X-Amz-Signature=XXXXXXXXXXXXXXXXXXXXX> 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/__init__.py /tmp/register3231572267/workflows/hello_world.py]
{"json":{},"level":"error","msg":"input package have some invalid files. try to run pyflyte package again [/tmp/register3231572267/workflows/__init__.py /tmp/register3231572267/workflows/hello_world.py]","ts":"2022-08-23T23:57:19Z"}
s
Hi, @karthikraj! You need not run
flytectl register
cause
pyflyte register
does the serialization and registration: https://docs.flyte.org/projects/flytekit/en/latest/design/clis.html#what-is-pyflyte-register. Is there a folder that houses the workflow folder (like parent/) as @Yee suggested?
Copy code
parent/
(no init file here at this layer)
  workflows/
    __init__.py
    hello_world.py
159 Views