I got: ```{"asctime": "2023-05-16 14:16:33,972", "...
# ask-the-community
f
I got:
Copy code
{
  "asctime": "2023-05-16 14:16:33,972",
  "name": "flytekit",
  "levelname": "ERROR",
  "message": "Error from command '['aws', 's3', 'cp', '--acl', 'bucket-owner-full-control', '/var/folders/xn/j7gcmr5j12b7jy0nm2kfykhm0000gp/T/flytex7wgfw1z/control_plane_metadata/local_flytekit/2461a0641858e66c16dc8214fffdb4b7', '<s3://my-s3-bucket/data/c36474e9b9ca42edb35ba64e2d17bab1/2461a0641858e66c16dc8214fffdb4b7']'>:\nb'upload failed: ../../../../var/folders/xn/j7gcmr5j12b7jy0nm2kfykhm0000gp/T/flytex7wgfw1z/control_plane_metadata/local_flytekit/2461a0641858e66c16dc8214fffdb4b7 to <s3://my-s3-bucket/data/c36474e9b9ca42edb35ba64e2d17bab1/2461a0641858e66c16dc8214fffdb4b7> An error occurred (AccessDenied) when calling the PutObject operation: Access Denied\\n'\n"
}
k
which version of flytekit are you using? IIRC, there are some issues with uploading file in flytekit 1.4
f
@Kevin Su, we are using flytekit==1.2.4 CC: @karthikraj
k
only this workflow failed? or all other workflows failed as well.
f
Only this workflow is having a input param of type dict. All others have simple str or int as input, therefore no need to upload as files.
k
just test it. this is a bug in flytekit v1.2.4, but there is another issue in flytekit v1.6. will create a pr shortly
s
@Kevin Su, I believe I'm looking at the same error as well. I tested it on flytekit 1.5.0 https://flyte-org.slack.com/archives/CP2HDHKE1/p1684297314863949?thread_ts=1683861857.343639&amp;cid=CP2HDHKE1
k
I fixes it here, but you can’t use default input for now since
type_engine
doesn’t use dataproxy to upload data. this is another issue, we’ll fix it.
f
@Kevin Su @Samhita Alla, thank you very much!
Hi @Kevin Su, Which flyte version has this feature working? I need this feature. Therefore I will re-test if you’ve got it released. Thanks!
k
flytekit==1.6.2
f
Thanks @Kevin Su, Right now I am using:
Copy code
flytekit==1.2.4
flytekitplugins-snowflake==1.2.4
flytekitplugins-spark==1.2.4
flytekitplugins-polars==1.2.4
pandas~=1.5.0
...
Do I need to upgrade the version of flytekitplugins to the same as flytekit version? And do I need to change the pandas version?
k
1.2.4 is a bit old, I suggest upgrade them as well.
but I think it should work as well if you don’t upgrade them.
f
Thanks Kevin.
k
and make sure to use flyteidl==1.5.8. The latest flytekit is not compatible with latest flyteidl (1.5.9)
f
Thanks. @Kevin Su, The reason I chose version 1.2.4 of flyte is because I had to build a custom image with spark. So I used this as part of my dependency req txt files. https://github.com/flyteorg/flytesnacks/blob/master/cookbook/integrations/kubernetes/k8s_spark/requirements.txt
I realize if I upgrade flyte version, I need to figure out the upgraded k8s_spark requirements.txt. Otherwise, I cannot upgrade flyte along without breaking the dependencies in my k8s_spark/requirements.txt
Could you point me to where the latest k8s_spark req txt file is?
k
Try to use imageSpec, it’s a new feature in flytekit. you don’t need to build an image for spark anymore. https://github.com/flyteorg/flytekit/pull/1616
Copy code
spark_image = ImageSpec(registry="<docker_id>", packages=["pandas", "numpy"])
f
@Kevin Su, I need to upgrade the flyte remote server to also have flytekit upgraded to v1.6.2, not only locally, is that correct?
@Kevin Su, just to clarify regarding not needing to build an image for spark. I need to build a custom image because I have custom dependencies. I do pyflyte run --remote --image with my custom image. And that’s why I built custom image with spark. Do you think I can remove the spark from my custom image now since I can use ImageSpec to run spark tasks?
k
yes, you can use imageSpec for the spark task. You can still install custom dependencies in ImageSpec, but you don’t need to install spark dependencies yourself. imageSpec will use spark-base-image, and install you custom packages on top of it
here is a doc in flytesnacks, we’ll merge the doc soon
f
Thanks @Kevin Su. You told me to upgrade to flytekit 1.6.2 for a bug fix. Does it mean I need to upgrade flytekit in the flyte remote server also to 1.6.2, not only locally?
k
flyte remote server
you mean flyteadmin, flytepropeller?
those deployments don’t need to be upgraded
f
You mean flytekit, flyteidl, etc. are not installed on the flyter remote server?
I am not the flyte remote server administrator, therefore I am not aware of that.
@Kevin Su
k
flytekit is only used in the task pods and local (for local execution). The remote server is written by golang, which is in a different repo.
f
Thanks @Kevin Su. I have custom dependencies that is private to my organization and is in a private repository (in one of two repos, e.g. https://maven.homebox.com/repository/max-pypi-snapshots, & https://maven.homebox.com/repository/max-pypi-releases). How do I add them in the ImageSpec?
k
ImageSpec(packages=[“max-pypi”, ….])
f
@Kevin Su, how will ImageSpec know where to find packages from max-pypi? Where do I specify the repo url https://maven.homebox.com/repository?
k
sorry, if you are trying to download it from others pypi, it’s not supported. I’ll add it to imageSpec
151 Views