Kieran
03/05/2021, 2:45 PM0.13.18
. Has anyone had this before -- all of a sudden a large row of cancelled flows appear in the UI?
(these flows run using the CronSchedule)nicholas
Kieran
03/05/2021, 3:00 PMnicholas
nicholas
Kieran
03/05/2021, 3:13 PMFlow 8dda1956-8cb0-4d7a-ad67-477d5da757ad was archived
nicholas
Cancelled
state. Is it possible you or someone on your team registered new versions of a bunch of your flows?Kieran
03/05/2021, 4:25 PMnicholas
nicholas
Scheduled
state, which is why you probably didn't notice this beforeKieran
03/07/2021, 9:59 AMKieran
03/07/2021, 9:59 AMnicholas
nicholas
flow.serialize()
to the idempotency_key
argument to flow.register()
, which will create a string representation of your flow. If the serialized representation of a flow matches the existing idempotency key, a new version of the flow won't be registered.Kieran
03/08/2021, 7:54 PMnicholas
Kieran
03/08/2021, 7:59 PMnicholas
Kieran
03/08/2021, 8:03 PMnicholas
Kieran
03/08/2021, 8:04 PMnicholas
Cancelled
states are those that aren't created by the Prefect SchedulerKieran
03/08/2021, 8:08 PMnicholas
Kieran
03/09/2021, 9:28 AMflow.register(
project_name=project_name,
labels=[label],
add_default_labels=False,
idempotency_key=flow.serialize()
)
Kieran
03/09/2021, 9:30 AMprefect.utilities.exceptions.ClientError: 400 Client Error: Bad Request for url: <https://api.prefect.io/graphql>
The following error messages were provided by the GraphQL server:
INTERNAL_SERVER_ERROR: Variable "$input" got invalid value { name: "customers",
type: "prefect.core.flow.Flow", schedule: { clocks: [Array], or_filters: [],
adjustments: [], not_filters: [], filters: [], __version__: "0.14.11", type:
"Schedule" }, parameters: [], tasks: [[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object], ... 4 more items],
edges: [[Object], [Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], ... 5 more items], reference_tasks: [],
environment: null, run_config: { task_role_arn: null, run_task_kwargs: null,
task_definition: null, cpu: "512", execution_role_arn: null, labels: [], image:
null, task_definition_path: null, env: null, memory: "1024",
task_definition_arn: null, __version__: "0.14.11", type: "ECSRun" },
__version__: "0.14.11", storage: { stored_as_script: false, image_tag: null,
path: null, prefect_version: "0.14.11", registry_url: "************", secrets: [], flows: {}, image_name: null,
__version__: "0.14.11", type: "Docker" } } at "input.idempotency_key"; Expected
type String. String cannot represent a non string value: { name: "customers",
type: "prefect.core.flow.Flow", schedule: { clocks: [Array], or_filters: [],
adjustments: [], not_filters: [], filters: [], __version__: "0.14.11", type:
"Schedule" }, parameters: [], tasks: [[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object], ... 4 more items],
edges: [[Object], [Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], ... 5 more items], reference_tasks: [],
environment: null, run_config: { task_role_arn: null, run_task_kwargs: null,
task_definition: null, cpu: "512", execution_role_arn: null, labels: [], image:
null, task_definition_path: null, env: null, memory: "1024",
task_definition_arn: null, __version__: "0.14.11", type: "ECSRun" },
__version__: "0.14.11", storage: { stored_as_script: false, image_tag: null,
path: null, prefect_version: "0.14.11", registry_url: "************", secrets: [], flows: {}, image_name: null,
__version__: "0.14.11", type: "Docker" } }
The GraphQL query was:
mutation($input: create_flow_from_compressed_string_input!) {
create_flow_from_compressed_string(input: $input) {
id
}
}
nicholas
flow.*serialized_hash()*
passed to the idempotency keyKieran
03/09/2021, 6:04 PMnicholas
Kieran
03/11/2021, 9:57 AMnicholas
delete_flow_run
mutationKieran
03/11/2021, 5:20 PMnicholas
Kieran
03/11/2021, 5:52 PMnicholas