Alexey Stoletny
09/23/2022, 8:13 PMprefect.exceptions.PrefectHTTPStatusError: Client error '403 Forbidden' for url '<https://api.prefect.cloud/api/accounts/43db7ccd-9f39-41f2-8989-000b28747858/workspaces/cedd89e9-9f12-421e-a17b-94045c976a2a/block_types/e91e7544-7ecd-4fa6-b6d7-a53068cb67fc>'
Response: {'detail': 'protected block types cannot be updated.'}
For more information check: <https://httpstatuses.com/403>
Alexey Stoletny
09/23/2022, 8:14 PMAlix Cook
09/23/2022, 8:14 PMAlix Cook
09/23/2022, 8:15 PMAlexey Stoletny
09/23/2022, 8:15 PMAlexey Stoletny
09/23/2022, 8:15 PMIlya Galperin
09/23/2022, 8:33 PMAnna Geller
09/23/2022, 8:38 PMAnna Geller
09/23/2022, 8:42 PMAlexey Stoletny
09/23/2022, 8:44 PMXavier Babu
09/23/2022, 11:31 PMIuliia Volkova
09/24/2022, 6:53 AMTadej Svetina
09/24/2022, 1:54 PMOliver Mannion
09/24/2022, 1:57 PMAlex Turek
09/24/2022, 7:24 PMFailed
, or skip retries when it's marked as Succeeded
, by my codeGeorgi Yanev
09/24/2022, 9:29 PMflavienbwk
09/25/2022, 3:10 PM@flow(name="get_paris_weather")
def get_paris_weather(
minio_endpoint: str,
minio_access_key: str,
minio_secret_key: str,
minio_use_ssl: bool,
bucket_name: str,
):
create_bucket(
minio_endpoint,
minio_access_key,
minio_secret_key,
minio_use_ssl,
bucket_name,
)
city_coordinates = get_city_coordinates("Paris")
return get_weather(city_coordinates[0], city_coordinates[1])
# --- Deployment definition
if __name__ == "__main__":
bucket_name = os.environ.get("MINIO_PREFECT_FLOWS_BUCKET_NAME")
minio_endpoint = os.environ.get("MINIO_ENDPOINT")
minio_use_ssl = os.environ.get("MINIO_USE_SSL") == "true"
minio_scheme = "https" if minio_use_ssl else "http"
minio_access_key = os.environ.get("MINIO_ACCESS_KEY")
minio_secret_key = os.environ.get("MINIO_SECRET_KEY")
flow_identifier = uuid.uuid4()
block_storage = RemoteFileSystem(
basepath=f"s3://{bucket_name}/{flow_identifier}",
key_type="hash",
settings=dict(
use_ssl=minio_use_ssl,
key=minio_access_key,
secret=minio_secret_key,
client_kwargs=dict(endpoint_url=f"{minio_scheme}://{minio_endpoint}"),
),
)
block_storage.save("s3-storage", overwrite=True)
deployment = Deployment.build_from_flow(
name="get_weather_s3_example",
flow=get_paris_weather,
storage=RemoteFileSystem.load("s3-storage"),
work_queue_name="flows-example-queue",
parameters={
minio_endpoint: minio_endpoint,
minio_access_key: minio_access_key,
minio_secret_key: minio_secret_key,
minio_use_ssl: minio_use_ssl,
bucket_name: bucket_name,
},
)
deployment.apply()
But what I get as error is :
prefect.exceptions.SignatureMismatchError: Function expects parameters ['minio_endpoint', 'minio_access_key', 'minio_secret_key', 'minio_use_ssl', 'bucket_name'] but was provided with parameters ['False', 'minio', 'minio123', 'prefect-flows', '172.17.0.1:9000']
Could you explain me how I can pass parameters to my flow ?flavienbwk
09/25/2022, 6:40 PMDeepanshu Aggarwal
09/25/2022, 8:10 PM张强
09/26/2022, 3:41 AMfuture = client.submit(func, *args, workers=['Alice'],
allow_other_workers=True)
JV
09/26/2022, 5:00 AMprefect.exceptions.ParameterTypeError: Flow run received invalid parameters:
- run_name: none is not an allowed value
in jobs_runs_submit_and_wait_for_completion
jobs_runs_state, jobs_runs_metadata = await jobs_runs_wait_for_completion(
ValueError: too many values to unpack (expected 2)
Ha Pham
09/26/2022, 9:05 AMAndreas Nord
09/26/2022, 9:44 AMHedgar
09/26/2022, 10:14 AMserverless.yml
file I don’t understand the KVPs PREFECT_API_KEY
and PREFECT_API_URL
are the values supposed to be variables or secrets and from where?Andreas Nord
09/26/2022, 10:20 AMErick Joca
09/26/2022, 11:28 AMAisha Merhebi
09/26/2022, 11:56 AMSylvain Hazard
09/26/2022, 12:14 PMdefault_params
that fill required parameters ? I want to make sure users can't run the flow without specifying some arguments but also schedule it.Blake Stefansen
09/26/2022, 2:32 PMXavier Babu
09/26/2022, 2:36 PMXavier Babu
09/26/2022, 2:36 PMKhuyen Tran
09/26/2022, 2:42 PMXavier Babu
09/26/2022, 2:45 PMKhuyen Tran
09/26/2022, 6:15 PMXavier Babu
09/27/2022, 2:24 PM