You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the GitHub search to find a similar issue and didn't find it.
I searched the Prefect documentation for this issue.
I checked that this issue is related to Prefect and not one of its dependencies.
Bug summary
I'm trying to follow the Storage and infrastructure tutorial in the docs and am unable to create a deployment with S3 as the storage block. When creating the deployment from the CLI, I get an error relating because the code is expecting a string (it uses the endswith method) but receiving a PosixPath. See Reproduction below for more details.
As an aside, the tutorial is also out-of-date and needs to be updated to change the storage block type from s3 to s3-bucket -- i.e., -sb s3-bucket/log-test instead of -sb s3/log-test, as this is what prefect block ls shows as the slug. I'm assuming this was a recent change to, maybe, the prefect-aws collection?
Reproduction
Followthe [Deployments](https://docs.prefect.io/tutorials/deployments/) and [Storageandinfrastructure](https://docs.prefect.io/tutorials/storage/) tutorials. ThecommandI'mhavingissueswithis:
$ prefectdeploymentbuild ./log_flow.py:log_flow-nlog-flow-s3-sbs3/log-test-qtest-olog-flow-s3-deployment.yaml
You'll also need to have the following files (see the Deployments tutorial):
log_flow.py
import sys
import prefect
from prefect import flow, task, get_run_logger
from utilities import AN_IMPORTED_MESSAGE
@task
def log_task(name):
logger = get_run_logger()
logger.info("Hello %s!", name)
logger.info("Prefect Version = %s 🚀", prefect.__version__)
logger.debug(AN_IMPORTED_MESSAGE)
@flow()
def log_flow(name: str):
log_task(name)
if __name__ == "__main__":
name = sys.argv[1]
log_flow(name)
Other dependencies:
$ echo '{"some-piece-of-config": 100}' > config.json
$ echo 'AN_IMPORTED_MESSAGE = "Hello from another file"' > utilities.py
First check
Bug summary
I'm trying to follow the Storage and infrastructure tutorial in the docs and am unable to create a deployment with S3 as the storage block. When creating the deployment from the CLI, I get an error relating because the code is expecting a string (it uses the
endswith
method) but receiving a PosixPath. See Reproduction below for more details.As an aside, the tutorial is also out-of-date and needs to be updated to change the storage block type from
s3
tos3-bucket
-- i.e.,-sb s3-bucket/log-test
instead of-sb s3/log-test
, as this is whatprefect block ls
shows as the slug. I'm assuming this was a recent change to, maybe, the prefect-aws collection?Reproduction
You'll also need to have the following files (see the Deployments tutorial):
log_flow.py
Other dependencies:
Error
Versions
Additional context
This seems related to #7289.
The text was updated successfully, but these errors were encountered: