Page MenuHomeElementl

Stub ECS RunTask
ClosedPublic

Authored by jordansanders on Jun 16 2021, 4:02 PM.

Details

Summary

Running a task is the most complex behavior of any of the stubbed
endpoints and consequently, is the one I least exhaustively stubbed.
There's a lot of validation happening internally in the service that
isn't captured in botocore's parameter validation; luckly a lot of it is
documented in the API reference:

https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html

I've faked the behaviors that I anticipate being most relevant to our
EcsRunLauncher. Particularly, Our reference ECS deployments run with
launchType = "FARGATE" and networkMode = "awsvpc". Tasks using that
networkMode must include an awsvpcConfiguration but that validation
takes place in the ECS service and not in botocore. So our stub fakes
the check.

As we expand the ECS configurations that we support, we'll need to
expand the flexibility of this stub as well. This is the behavior that
will benefit most from an end-to-end integration test against a live
endpoint once development is more complete.

Also, rather than stub all the cluster endpoints, this just assumes
you're passing a valid cluster. That's a simplification I felt
comfortable taking becuase - unlike task definitions - the cluster
doesn't really have meaningful behavioral implications for our use of
the run endpoint.

Test Plan

unit

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 16 2021, 4:28 PM
Harbormaster failed remote builds in B32164: Diff 39624!
Harbormaster returned this revision to the author for changes because remote builds failed.Jun 16 2021, 6:25 PM
Harbormaster failed remote builds in B32196: Diff 39662!
Harbormaster returned this revision to the author for changes because remote builds failed.Jun 16 2021, 8:26 PM
Harbormaster failed remote builds in B32232: Diff 39700!
This revision is now accepted and ready to land.Jun 17 2021, 10:12 PM
This revision was automatically updated to reflect the committed changes.