Mathijs Miermans
01/21/2022, 12:26 AMKevin Kho
Mathijs Miermans
01/21/2022, 3:18 AMKevin Kho
stored_as_script=True
and then supply a path
to the flow. During runtime, this will just go in and grab that file to run the Flow. You can see them in the doc here . When you do flow.register()
, pass build=False
so you don’t have to build the containerMathijs Miermans
01/21/2022, 3:26 AMStorage.flows
get set when a flow is executed on ECS?
I tried both Docker storage and Local storage with our ECS Agent, and in both cases I get the error Failed to load and execute Flow's environment: ValueError('Flow is not contained in this Storage')
. The only place where I see self.flows
being set is in add_flow()
, but I thought that function was only used during build/registration?def create_docker_storage(flow_path: str) -> Storage:
return Docker(
stored_as_script=True, # We store the flows in the Docker image
path=flow_path, # Direct path to the storage in the Docker container
)
Local storage:
def create_local_storage(flow_path: str) -> Storage:
return Local(
stored_as_script=True, # We store the flows in the Docker image
path=flow_path, # Direct path to the storage in the Docker container
add_default_labels=False, # Don't label the flow with the local machine name
)
Kevin Kho
Mathijs Miermans
01/26/2022, 5:02 PMYou can do Local storage plus DockerRun and the path will be relative to the containerIn the screenshot you can see that we're passing in an absolute path. Looking at the source code, the first thing it does is check
self.flows
. Where is it using the path
?
If you use Docker storage but supply your own image, you will still need to add the flow to the storage.I believe I did that, but my next step was to try to run an agent locally with Docker storage to debug this.
Kevin Kho
Mathijs Miermans
01/26/2022, 5:11 PMadd_flow
before it calls get_flow
on ECS? I'm confused how it's otherwise supposed to get passed this check:
if flow_name not in self.flows:
raise ValueError("Flow is not contained in this Storage")
Kevin Kho
build=False
alsoMathijs Miermans
01/26/2022, 5:13 PMregister
call:
flow.register(self.project_name, build=self.build)
self.build
is set to False.)add_flow()
was called automatically during flow.register()
. When I call it during CD, I'm now getting a property under 'Flow Locations' that wasn't there before.Kevin Kho
Mathijs Miermans
01/26/2022, 5:23 PM