Horatiu Bota
05/16/2022, 10:35 AM404 Client Error: Not Found for url
. I've tried various combinations of repo/project/auth credentials for Bitbucket storage, but all with the same issue - has anyone successfully set up Bitbucket storage? (using Prefect 1.1.0)Anna Geller
Anna Geller
project
is required, this is sort of special for BitbucketHoratiu Bota
05/16/2022, 11:45 AMflow.storage = Bitbucket(
project="LEAF",
repo="hbota/prefect-storage-test",
path="flow.py",
ref="main",
cloud_username_secret="BITBUCKET_USERNAME",
cloud_app_password_secret="BITBUCKET_APP_PASSWORD"
)
Horatiu Bota
05/16/2022, 11:46 AMurl = "<https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/path/to/file.py>"
url = "<https://api.bitbucket.org/2.0/repositories/hbota/prefect-storage-test/src/main/flow.py>"
Anna Geller
Horatiu Bota
05/16/2022, 11:48 AMurl = "<https://bitbucket.org/rest/api/2.0/projects/LEAF/repos/prefect-storage-test/raw/flow.py?at=main>"
Horatiu Bota
05/16/2022, 11:50 AMprefect agent ecs start \
--cluster arn:aws:ecs:us-east-2:478904141323:cluster/<cluster-name> \
--env PREFECT_CONTEXT_SECRETS__BITBUCKET_USERNAME="<username>" \
--env PREFECT_CONTEXT_SECRETS__BITBUCKET_APP_PASSWORD="<bitbucket-app-password>"
Anna Geller
Horatiu Bota
05/16/2022, 11:51 AMAnna Geller
env:
- name: PREFECT__CLOUD__USE_LOCAL_SECRETS
value: true
- name: PREFECT__CLOUD__API
value: "<http://some_ip:4200/graphql>" # paste your GraphQL Server endpoint here
- name: PREFECT__BACKEND
value: server
Horatiu Bota
05/16/2022, 11:56 AMconfig.toml
Anna Geller
Anna Geller
Horatiu Bota
05/16/2022, 12:10 PMHoratiu Bota
05/16/2022, 12:15 PMflow.storage = Bitbucket(
project="<project_name>",
workspace="<workspace_id>",
repo="<repository_name>",
path="flow.py",
ref="main",
cloud_username_secret="BITBUCKET_USERNAME",
cloud_app_password_secret="BITBUCKET_APP_PASSWORD"
)
Horatiu Bota
05/16/2022, 12:16 PMcloud=True
when initing the Bitbucket objectHoratiu Bota
05/16/2022, 12:16 PMHoratiu Bota
05/16/2022, 12:17 PMAnna Geller
it seems there's not github/bitbucket storage yet for Prefect 2.0that's true, but you may use any storage supported by fsspec e.g. s3, gcs, Azure blob - super easy to configure
Horatiu Bota
05/16/2022, 12:26 PMAnna Geller
Anna Geller
Anna Geller
maybe this helps elsewhere 🙂for sure! thanks for sharing!
Horatiu Bota
05/16/2022, 12:27 PMAnna Geller
Horatiu Bota
05/16/2022, 12:28 PMAnna Geller