feat(batch): array jobs — real child containers + parent aggregation (batch 3)#1987
Merged
Conversation
…(batch 3) - SubmitJob with arrayProperties.size=N spawns N child jobs `<parent>:<index>`, each a real container with AWS_BATCH_JOB_ARRAY_INDEX injected so it selects its slice of work, launched on the ECS engine via the batch-2 path. - The array parent is a tracking record whose status + arrayProperties. statusSummary are computed live from its children at DescribeJobs time (SUCCEEDED only when every child exits 0; FAILED if any child failed once all are terminal; RUNNING/PENDING otherwise). - Extracted the ECS-launch-or-park logic into `launch_job`, shared by single and array submits. Tests: unit (array spawn + parent aggregation, status-summary terminal logic, AWS_BATCH_JOB_ARRAY_INDEX injection); Docker-gated e2e (array size 3 runs three real alpine containers -> parent SUCCEEDED, statusSummary SUCCEEDED=3). Docs updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AWS Batch batch 3 — array jobs (the highest-demand Batch feature after real execution).
SubmitJobwitharrayProperties.size = NspawnsNchild jobs<parent>:<index>, each a real container withAWS_BATCH_JOB_ARRAY_INDEXinjected so it selects its slice of work, launched on the ECS engine via the batch-2 path.arrayProperties.statusSummaryaggregate the children live atDescribeJobstime —SUCCEEDEDonly when every child exits 0,FAILEDif any child failed once all are terminal, elseRUNNING/PENDING.launch_job(single + array submits).Test plan
AWS_BATCH_JOB_ARRAY_INDEXinjection, plus existing control-plane/resource-mapping.array_job_runs_every_child_and_parent_succeeds— array size 3 runs three real alpine containers → parentSUCCEEDED,statusSummary.SUCCEEDED == 3. Passes locally.cargo clippy -p fakecloud-batch -p fakecloud-e2e --all-targets -- -D warningsclean. Docs updated.Next
Job dependencies (
dependsOn), retry strategies + timeouts, then a CloudFormationAWS::Batch::*provisioner + tfacc.Summary by cubic
Add AWS Batch array jobs:
SubmitJobwitharrayProperties.sizespawns real child containers and the parent aggregates live status. Also refactors the ECS launch flow into a sharedlaunch_jobused by single and array submits.New Features
SubmitJobwitharrayProperties.size=Nspawns N real child jobs<parent>:<index>, each withAWS_BATCH_JOB_ARRAY_INDEX.DescribeJobs: SUCCEEDED only if all children exit 0; FAILED if any failed once all are terminal; otherwise RUNNING/PENDING.Refactors
launch_job, shared by single and array submits.Written for commit 8ffa257. Summary will update on new commits.