-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: failure to load chunks correctly for map-call over maps (#866)
Ensures that any time we update a fork's ID, we also attempt to re-load the chunks data from stage defs. Fixes a bug where map-called stages that map over a map type fail to load their chunks data. This results in those stages failing to reset their chunks when retry happens, which means the retried chunks happen in the original chunks directory instead of a fresh chunk directory. With this patch and added integration test, the chunks are correctly reset. This patch also removes the args field from the Fork type which was set but never read.
- Loading branch information
1 parent
c068b26
commit cde0239
Showing
138 changed files
with
3,150 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pipeline_test |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
load( | ||
"//tools:mro_rules.bzl", | ||
"mrf_test", | ||
"mro_library", | ||
"mro_test", | ||
) | ||
load("//test:integration_test.bzl", "integration_test") | ||
|
||
mro_library( | ||
name = "pipeline", | ||
testonly = True, | ||
srcs = ["pipeline.mro"], | ||
deps = [ | ||
"//test/retry_map_call_map_test/stage", | ||
], | ||
) | ||
|
||
mro_test( | ||
name = "pipeline_test", | ||
size = "small", | ||
srcs = [":pipeline"], | ||
) | ||
|
||
mrf_test( | ||
name = "pipeline_format", | ||
srcs = [":pipeline"], | ||
) | ||
|
||
filegroup( | ||
name = "pass_expect", | ||
srcs = glob(["expected/**"]), | ||
) | ||
|
||
integration_test( | ||
name = "retry_map_call_map_test", | ||
config = "autoretry_pass.json", | ||
expectation = [":pass_expect"], | ||
pipeline = ":pipeline", | ||
runner = "autoretry_pass.sh", | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"command": ["autoretry_pass.sh"], | ||
"expected_return": 0, | ||
"output_dir": "pipeline_test", | ||
"contains_only_files": ["*"], | ||
"contents_match": ["*"] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
MROPATH=$PWD | ||
if [ -z "$MROFLAGS" ]; then | ||
export MROFLAGS="--disable-ui" | ||
fi | ||
PATH=../../bin:$PATH | ||
mkdir -p ar_pass | ||
mrp --autoretry=3 --vdrmode=strict pipeline.mro pipeline_test |
1 change: 1 addition & 0 deletions
1
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/_complete
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2024-01-08 18:43:53 |
5 changes: 5 additions & 0 deletions
5
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/_invocation
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@include "pipeline.mro" | ||
|
||
call BEGIN( | ||
count = 2, | ||
) |
10 changes: 10 additions & 0 deletions
10
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/_outs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"sentinels": { | ||
"test0": "/user/test/retry_map_call_map_test/retry_map_call_map_test.runfiles/martian/test/retry_map_call_map_test/pipeline_test/SHOULD_RESTART/BEGIN/fork0/chnk0-ue2ef9c4266/files/sentinel", | ||
"test1": "" | ||
}, | ||
"should_fail_next": { | ||
"test0": true, | ||
"test1": false | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/_vdrkill
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"timestamp": "0001-01-01T00:00:00Z", | ||
"paths": null, | ||
"errors": null, | ||
"events": [ | ||
{ | ||
"Timestamp": "2024-01-08T18:43:49.060592735Z", | ||
"DeltaBytes": 3633 | ||
}, | ||
{ | ||
"Timestamp": "2024-01-08T18:43:53.344173786Z", | ||
"DeltaBytes": 11866 | ||
} | ||
], | ||
"count": 0, | ||
"size": 0 | ||
} |
8 changes: 8 additions & 0 deletions
8
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk0/_args
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"__mem_gb": 1, | ||
"__threads": 1, | ||
"__vmem_gb": 4, | ||
"count": 2, | ||
"sentinel": "/user/test/retry_map_call_map_test/retry_map_call_map_test.runfiles/martian/test/retry_map_call_map_test/pipeline_test/SHOULD_RESTART/BEGIN/fork0/split-ue2ef9c4265/files/sentinel", | ||
"should_fail": true | ||
} |
1 change: 1 addition & 0 deletions
1
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk0/_complete
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2024-01-08 18:43:53 |
107 changes: 107 additions & 0 deletions
107
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk0/_jobinfo
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"name": "ID.pipeline_test.SHOULD_RESTART.BEGIN.fork0.chnk0", | ||
"type": "local", | ||
"cwd": "/user/test/retry_map_call_map_test/retry_map_call_map_test.runfiles/martian/test/retry_map_call_map_test/pipeline_test/SHOULD_RESTART/BEGIN/fork0/chnk0-ue2ef9c4266/files", | ||
"python": { | ||
"binpath": "/bin/python3", | ||
"version": "3.7.16 (default, Aug 30 2023, 20:37:53) \n[GCC 7.3.1 20180712 (Red Hat 7.3.1-15)]" | ||
}, | ||
"rusage": { | ||
"self": { | ||
"ru_maxrss": 13848, | ||
"ru_ixrss": 0, | ||
"ru_idrss": 0, | ||
"ru_minflt": 365, | ||
"ru_majflt": 0, | ||
"ru_nswap": 0, | ||
"ru_utime": 0.002404, | ||
"ru_stime": 0.002404, | ||
"ru_inblock": 0, | ||
"ru_oublock": 40, | ||
"ru_msgsnd": 0, | ||
"ru_msgrcv": 0, | ||
"ru_nsignals": 0, | ||
"ru_nivcsw": 0 | ||
}, | ||
"children": { | ||
"ru_maxrss": 15928, | ||
"ru_ixrss": 0, | ||
"ru_idrss": 0, | ||
"ru_minflt": 3759, | ||
"ru_majflt": 0, | ||
"ru_nswap": 0, | ||
"ru_utime": 0.047496, | ||
"ru_stime": 0.015423, | ||
"ru_inblock": 0, | ||
"ru_oublock": 40, | ||
"ru_msgsnd": 0, | ||
"ru_msgrcv": 0, | ||
"ru_nsignals": 0, | ||
"ru_nivcsw": 2 | ||
} | ||
}, | ||
"used_bytes": { | ||
"rss": 14180352, | ||
"shared": 3182592, | ||
"vmem": 1641078784, | ||
"text": 1187840, | ||
"stack": 84197376, | ||
"proc_count": 1 | ||
}, | ||
"io": { | ||
"total": { | ||
"read": { | ||
"sysc": 6, | ||
"bytes": 0 | ||
}, | ||
"write": { | ||
"sysc": 0, | ||
"bytes": 0 | ||
} | ||
}, | ||
"max": { | ||
"read": { | ||
"sysc": 1588.093533415473, | ||
"bytes": 0 | ||
}, | ||
"write": { | ||
"sysc": 0, | ||
"bytes": 0 | ||
} | ||
}, | ||
"dev": { | ||
"read": { | ||
"sysc": 0, | ||
"bytes": 0 | ||
}, | ||
"write": { | ||
"sysc": 0, | ||
"bytes": 0 | ||
} | ||
} | ||
}, | ||
"wallclock": { | ||
"start": "2024-01-08T18:43:53.344173786Z", | ||
"end": "2024-01-08T18:43:53.413277311Z", | ||
"duration_seconds": 0.069103558 | ||
}, | ||
"profile_mode": "disable", | ||
"stackvars_flag": "disable", | ||
"monitor_flag": "disable", | ||
"invocation": { | ||
"call": "SHOULD_RESTART", | ||
"args": { | ||
"count": 2 | ||
}, | ||
"mro_file": "pipeline.mro" | ||
}, | ||
"version": { | ||
"martian": "\u003cversion not embedded\u003e", | ||
"pipelines": "v4.0.11-29-g954ba393-dirty" | ||
}, | ||
"host": "bespin1.fuzzplex.com", | ||
"pid": 779123, | ||
"threads": 1, | ||
"memGB": 1, | ||
"vmemGB": 4 | ||
} |
3 changes: 3 additions & 0 deletions
3
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk0/_log
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
2024-01-08 18:43:53 [time] __start__ | ||
2024-01-08 18:43:53 [monitor] cgroup memory limit of 9223372036854771712 bytes detected | ||
2024-01-08 18:43:53 [time] __end__ |
6 changes: 6 additions & 0 deletions
6
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk0/_outs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"sentinel": "/user/test/retry_map_call_map_test/retry_map_call_map_test.runfiles/martian/test/retry_map_call_map_test/pipeline_test/SHOULD_RESTART/BEGIN/fork0/chnk0-ue2ef9c4266/files/sentinel", | ||
"sentinels": {}, | ||
"should_fail": true, | ||
"should_fail_next": {} | ||
} |
1 change: 1 addition & 0 deletions
1
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk0/_stderr
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[stderr] |
1 change: 1 addition & 0 deletions
1
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk0/_stdout
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[stdout] |
8 changes: 8 additions & 0 deletions
8
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk1/_args
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"__mem_gb": 1, | ||
"__threads": 1, | ||
"__vmem_gb": 4, | ||
"count": 2, | ||
"sentinel": "", | ||
"should_fail": false | ||
} |
1 change: 1 addition & 0 deletions
1
test/retry_map_call_map_test/expected/SHOULD_RESTART/BEGIN/fork0/chnk1/_complete
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2024-01-08 18:43:49 |
Oops, something went wrong.