Repository navigation
OCSDV-453 (PR-B): demand execution include/exclude filters + hash-stable serializer - #55
Conversation
Filters set on a param in DemandExecutionParameters.params previously died at
one of four hops between user input and the data sync request, because every
hop drops anything it does not explicitly know about. This carries them the
whole way:
* ResolvableBase gains include/exclude, plus a filter_config property that
re-exposes them as the DataSyncFilterConfig the sync layer consumes. The
wire format stays flat ({"remote": ..., "local": ..., "exclude": [...]}),
and the wrapping model_serializer/model_validator pair that injects and
pops `action` keeps working.
* ResolvableJobParam (and its Downloadable/Uploadable subclasses) carry the
fields, so the plain-dataclass hop no longer truncates to name/value/
remote_value. _param_to_job_params__build_input/__build_output now route
through from_resolvable rather than rebuilding positionally.
* sanitize_serialized_params emits to_dict() for a Resolvable only when
filters are present, and to_str() otherwise.
That last conditional is the entire backwards-compatibility mechanism, not a
stylistic choice. get_execution_hash hashes the *sanitized* params, and that
hash drives job_definition_name (strict=False) and job_name (strict=True) for
every demand execution. Serializing the dict form unconditionally would change
the hash of every unfiltered execution in the system and silently re-register
every existing job definition. has_filters() treats an empty list as no filter
for the same reason -- it would otherwise force the dict form while filtering
nothing.
test_filters.py pins a fixed payload against hashes captured before this
change, for both the dict-param and Resolvable-object forms, so a regression
fails loudly instead of drifting. Verified by mutation: making the conditional
unconditional fails the pinned assertions.
Filter patterns are deliberately kept out of find_references() and __hash__.
Reference resolution substitutes ${...} over param values, and regex syntax
legitimately contains $, { and } -- scanning filters risks mangling a valid
pattern. Covered by tests over patterns like ^data/\d{2}/.*$ and
(?:a|b){2,}\$\{NOT_A_REF\}.
Note for callers: on an Uploadable, filtering means "do not upload", not
"keep locally" -- excluded outputs are still cleaned off EFS.
Refs OCSDV-453 (PR-B).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
PR #55 changes 4 files with +504/−5 LOC. Of the additions, 407 lines (81%) are tests, 67 lines (13%) are production docstrings, and 28 lines (6%) are functional production code. The functional changes add include/exclude filter fields and adapters, propagate filters through job parameters, and conditionally serialize filtered resolvables while preserving legacy hashes for unfiltered executions. No standalone documentation files are changed.
|
There was a problem hiding this comment.
Pull request overview
This PR extends demand-execution “resolvable” parameters to carry per-parameter include/exclude filters end-to-end (wire format → job params → serialized execution JSON) while preserving execution-hash stability for unfiltered executions.
Changes:
- Added
include/excludefields toResolvableBaseand propagated them throughResolvableJobParamconstruction (from_resolvable) so the dataclass hop no longer truncates filters. - Updated
DemandExecutionParameters.sanitize_serialized_paramsto conditionally serialize resolvables asto_str()when unfiltered vsto_dict()when filtered to preserve backwards-compatible hashing. - Added a comprehensive new test suite that pins pre-change execution hashes and verifies round-trips and reference-resolution behavior with “hostile” regex patterns.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/aibs_informatics_core/models/demand_execution/test_filters.py | New regression and round-trip tests to pin hash stability and verify filter carriage/reference behavior. |
| src/aibs_informatics_core/models/demand_execution/resolvables.py | Adds flat include/exclude filter fields and exposes them via filter_config/has_filters(). |
| src/aibs_informatics_core/models/demand_execution/parameters.py | Uses from_resolvable() for job params and conditionally serializes filtered resolvables to dict to preserve filter data without breaking legacy hashes. |
| src/aibs_informatics_core/models/demand_execution/job_param.py | Extends ResolvableJobParam with include/exclude, ensures references are not scanned/replaced in filter patterns, and exposes filter_config. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| They sit next to the path they filter rather than in a nested object so the | ||
| wire format stays flat:: | ||
|
|
||
| {"remote": "s3://bucket/run1/", "local": "aligned", "exclude": [".*\\\\.bam"]} |
…/OCSDV-453-demand-execution-filters
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/OCSDV-452-data-sync-filter-models #55 +/- ##
=============================================================================
+ Coverage 97.09% 97.17% +0.07%
=============================================================================
Files 58 58
Lines 3412 3428 +16
Branches 391 391
=============================================================================
+ Hits 3313 3331 +18
+ Misses 54 53 -1
+ Partials 45 44 -1
🚀 New features to boost your workflow:
|
| exclude: str | list[str] | None = None | ||
|
|
||
| @property | ||
| def filter_config(self) -> DataSyncFilterConfig | None: |
There was a problem hiding this comment.
Not sure if this is a weird question, what happens if we add another filter field to DataSyncFilterConfig but not to this base class? it seems like this class manually builds the filter_config part every time it gets called.
There was a problem hiding this comment.
Mmm rereading this I feel like my comment didn't make sense. I was thinking two things:
- The
DataSyncFilterConfigclass doesn't have the newfilterfield, it's manually constructed here. - This
ResolvableBase, along with theResolveableJobParamclass, seem to be doing the same thing with the filters. I'm wondering if there's a way to propagate the filter fields so they're not being constructed twice within two classes
There was a problem hiding this comment.
Yeah I considered nesting the DataSyncFilterConfig field but I held off for a few reasons.
- include/exclude read as
resolvableconcepts - nesting the filter config model couples these models to the data sync schema. This is not terrible, but I want to try to keep decoupled for now.
At this point I can't think of many other filter configuration fields that I would want to add. Instead, I'd rather defer the fuller consolidation (making it a nested filter_config field) to a later date if and when we think of a scenario. I believe it should be easy enough to migrate to such a model without causing a breaking change with the help of pydantic.
| include: str | list[str] | None = None | ||
| exclude: str | list[str] | None = None |
There was a problem hiding this comment.
If this comment about the manual construction of filters is a true concern, would it be better to do:
| include: str | list[str] | None = None | |
| exclude: str | list[str] | None = None | |
| filter_config: DataSyncFilterConfig | None = None |
There was a problem hiding this comment.
I wrote above about the reason for not going with your suggested approach. I felt like the simplicity of the flat structure was preferable because it avoids coupling, and these concepts naturally live at the resolvable class. I am also confident that if we do need to expand fields, we can migrate to a nested structure without backwards incompatible changes
schristinelin
left a comment
There was a problem hiding this comment.
LGTM, one question about how the filter param is getting constructed. I do think we can handle them in a follow up PR even if it's indeed a cause for concern down the road
…/OCSDV-453-demand-execution-filters
Review feedback (schristinelin on #55): the "do these filters filter anything" check is written in more than one place, and differently -- `bool(x) or bool(y)` in one, `not x and not y` in another. Logically equivalent today, which is how drift starts. from_patterns() is now the one definition, returning None when nothing is actually filtered so that empty reads as absent. That distinction is load-bearing: sanitize_serialized_params branches on filter presence and feeds an execution hash, so an empty-but-present config must not read as filtered. Also adds a parity test that fails if DataSyncFilterConfig gains a field. ResolvableBase and ResolvableJobParam mirror include/exclude as their own flat fields rather than nesting this model -- deliberately, to keep the demand execution models independent of the data sync schema -- so a new field here would be silently absent there and a value-comparing test would stay green. The test's docstring carries the migration note, including that a bare field swap to a nested config would silently drop filters from flat payloads, since PydanticBaseModel sets extra="ignore". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…/OCSDV-453-demand-execution-filters
Review feedback (schristinelin on #55): ResolvableBase and ResolvableJobParam each hand-built a DataSyncFilterConfig and each re-derived "are these filters filtering anything" -- and did it differently (`bool(x) or bool(y)` vs `not x and not y`). Both now delegate to from_patterns, so the rule and the construction each exist once. ResolvableJobParam also gains has_filters() for symmetry. include/exclude deliberately stay flat fields on these models rather than nesting DataSyncFilterConfig. They are resolvable-level concepts -- a resolvable describes what to move, and filters narrow what to move -- and keeping them flat keeps the demand execution models independent of the data sync schema. The property is the boundary translation. A parity test in PR-A fails if DataSyncFilterConfig grows a field, and carries the migration note. Also corrects the rationale on sanitize_serialized_params. It claimed that emitting the dict form unconditionally would silently re-register every job definition. That is wrong: params are hashed only under strict=True, and job_definition_name uses get_execution_hash(strict=False), which covers only execution_type, execution_image and command. The exposed value is job_name. Verified by comparing hashes against the pre-filter baseline, where the non-strict hash is identical across every variant. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Jira: OCSDV-453 — PR-B of 5, release R1.
Important
Based on
feature/OCSDV-452-data-sync-filter-models(#54), notmain. PR-B reusesDataSyncFilterConfig, which #54 introduces and which is not yet onmain. GitHub will retarget this tomainautomatically once #54 merges; the diff below is PR-B's changes only. Merge #54 first.This is the
aibs-informatics-corehalf of OCSDV-453 — the risky half. No version bump; core releases once, after this lands.The problem
A filter set on a param has to survive four hops to reach a sync request, and each one drops what it doesn't explicitly know about. The last hop is the trap:
sanitize_serialized_paramscollapses aResolvableto"remote @ local"viato_str(), and sinceDemandExecutioncrosses the state machine boundary as JSON, anything lost there is gone for good.What's here
1.
ResolvableBase.include/.excludeFlat fields, matching the wire format in the ticket:
{"remote": "s3://bucket/run1/", "local": "aligned", "exclude": [".*\\.bam"]}A
filter_configproperty re-exposes them as theDataSyncFilterConfigthe sync layer consumes — that's where the reuse lives, while the user-facing JSON stays flat. The wrapping@model_serializer(injectsaction) and@model_validator(pops it) keep working;to_dict()already runsexclude_none=True, so unfiltered resolvables serialize exactly as before.2. Filters on the job param dataclasses
ResolvableJobParam(and itsDownloadable/Uploadablesubclasses) gain the fields._param_to_job_params__build_input/__build_outputnow route throughfrom_resolvableinstead of rebuilding positionally fromlocal/remote, so the dataclass hop stops truncating.3. The conditional serializer — the load-bearing bit
This conditional is the entire backwards-compatibility mechanism.
get_execution_hashhashes the sanitized params, and that hash drivesjob_definition_name(strict=False) andjob_name(strict=True) for every demand execution in the system. Emitting the dict form unconditionally would change the hash of every unfiltered execution and silently re-register every existing job definition.has_filters()treats an empty list as no filter for the same reason — an emptyexclude: []would otherwise force the dict form, and a new hash, while filtering nothing.Hash regression testing
test_filters.pypins a fixed payload and asserts literal hash strings captured by runningget_execution_hashagainst that payload on the commit before this change. A computed expectation would drift silently alongside the regression it's meant to catch, so the values are hardcoded.Both param forms are pinned, because they take different paths through the serializer:
strict=Truestrict=Falseparamsca65e415…4e7644a99a39…661cResolvableobjects inparams(theto_str()path)f60365ce…202644a99a39…661cAlso asserted: a filtered execution hashes differently from the otherwise-identical unfiltered one, and empty/
Nonefilters do not perturb the hash.Verified by mutation — replacing the conditional with an unconditional
to_dict()fails 5 tests, including both pinned hashes. The guard bites.Round trips
to_dict()→from_dict()covered with and without filters, for both dict-form andResolvable-object params, asserting filters survive intact and that noinclude/excludekeys leak into unfiltered output.resolve_referencesdoes not mangle patterns (ticket checklist item)Confirmed, and now enforced.
JobParamResolver.resolve_referencessubstitutes${...}overvalueandremote_valueviafind_references()/replace_references(). Filter patterns are deliberately kept out of both, and out of__hash__— they're literal data, not templated values, and regex syntax legitimately contains$,{and}.Tests round-trip patterns chosen to be hostile to that substitution, alongside a param that does resolve a real reference:
^data/\d{2}/.*$— brace quantifier and anchors.*\{tmp\}.*— literal bracessample_[A-Z]{1,3}\$.*— dollar plus quantifier(?:a|b){2,}\$\{NOT_A_REF\}— an escaped${...}lookalikeCaveat worth carrying into PR-E
On an
Uploadable, output filtering means "do not upload", not "keep locally" —post_execution_data_sync_requestssetsretain_source_data=Falseandcleanup_working_dirdefaults toTrue, so excluded outputs are still deleted from EFS. Documented onResolvableBase.Out of scope
models/data_sync.pyandutils/filters.pyare untouched — PR-A owns those. The diff is three source files plus one new test file.Testing
make format && make lint && make testall clean — ruff, mypy (65 files), and 1131 tests passing, with no existing test modified.🤖 Generated with Claude Code
End-to-end verification (dev)
This PR contributes the
include/excludefilters onResolvableBase/ResolvableJobParamand the hash-stable conditional serializer that carries them through to the sync requests exercised below.Four DemandExecutions were run against the deployed
dev-deenvironment (account051791135335,us-west-2) using a shared 12-object / 541,610-byte S3 fixture. All four Step Functions executions reachedSUCCEEDED, and in every case the set of objects that landed in S3 matches the declared include/exclude filters exactly — no missing matches and no leaked non-matches.Because a single demand execution exercises the whole chain — the data-sync request/filter model in
aibs-informatics-core, the S3 transfer and filtering implementation inaibs-informatics-aws-utils, and the Batch/EFS execution wiring inaibs-informatics-aws-lambda— this same evidence block is attached to every PR in the set rather than split across them.Related PRs
These five PRs are one change set and are intended to merge in release order (R1 first, then R2, then R3), since each release depends on the one before it.
Fixture
s3://dev-de-core-us-west-2-051791135335/test_data/ocsdv-452-filters/input/(moved here from an orphaned bucket that no CloudFormation stack owns, so the fixture now lives in the environment's own bucket and inputs and outputs share one bucket) — 12 objects, 541,610 bytes total (aws s3 ls --recursive --summarizereportsTotal Objects: 12 / Total Size: 541610):README.mdmetadata.jsonsampleA/aligned.bamsampleA/aligned.bam.baisampleA/qc_summary.txtsampleA/reads_R1.fastqsampleA/reads_R2.fastqsampleB/aligned.bamsampleB/aligned.bam.baisampleB/qc_summary.txtsampleB/reads_R1.fastqsampleB/reads_R2.fastqEach case runs the same container command: list
${INPUT_DATA},cp -R ${INPUT_DATA}/. ${OUTPUT_DATA}/, list${OUTPUT_DATA}. The container itself does no filtering, so any difference between the fixture and the uploaded set is attributable to the data-sync filters.Results
Counts are objects. "In" is the fixture, "localized" is what survived the input filter and was present under
${INPUT_DATA}in the container, "uploaded" is what was observed in S3 under the case prefix.tc1-input-exclude-bamexclude: [".*\\.bam", ".*\\.bam\\.bai"]tc2-input-include-fastqinclude: [".*\\.fastq"]tc3-output-exclude-fastqexclude: [".*\\.fastq"]tc4-both-ends-filteredinclude: ["sampleA/.*"]include: [".*\\.txt"]Across the four cases: 21 objects, 551,275 bytes written under
s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/.Two independent confirmations worth noting:
.fastqfiles and nothing else. Uploaded file sizes are byte-identical to their sources, so nothing was truncated in transit.jobId 7f83fd65-6e9e-4817-a48d-e6e796b1cedf) prints all 12 files under--- localized input (post input-filter) ---and all 12 again under--- staged for upload (pre output-filter) ---, yet only 8 objects reached S3. That rules out the output filter being misapplied at localization time, which an object count alone could not.Note on attribution for tc1 and tc2: because the container copies
${INPUT_DATA}wholesale into${OUTPUT_DATA}, the final S3 state for an input-side filter is indistinguishable from an equivalent output-side filter. For those two cases the input-side attribution rests on the payload (filters declared oninput_data,output_databare) plus the container'sfindoutput, not on the S3 listing alone. tc3 and tc4 are unambiguous.Directory structure is preserved end to end in all cases — the
sampleA/andsampleB/prefixes survive the round trip, so patterns are matched against the same relative path that is used to construct the destination key.tc1-input-exclude-bam — input-side exclude, 8 objects uploaded (9,202 bytes)
Uploaded (relative to
s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc1-input-exclude-bam/;aws s3 ls --recursive --summarizereportsTotal Objects: 8 / Total Size: 9202):Correctly not uploaded — these four match one of the two input-side exclude patterns (
.*\.bam,.*\.bam\.bai), so they were never localized and therefore never staged:sampleA/aligned.bam.*\.bamsampleA/aligned.bam.bai.*\.bam\.baisampleB/aligned.bam.*\.bamsampleB/aligned.bam.bai.*\.bam\.baiEvery excluded object matches a declared pattern, and every object matching a declared pattern is excluded. Step Functions execution
d247218f-34e6-47cc-ad4b-a175180b2e45onarn:aws:states:us-west-2:051791135335:stateMachine:dev-de-demand-execution,SUCCEEDED, 2026-08-12 14:46:07 → 14:51:02 (-07:00); object timestamps (14:50:37) fall inside that window.{ "execution_type": "ocsdv452", "execution_id": "ocsdv452-tc1-input-exclude-bam", "execution_image": "public.ecr.aws/ubuntu/ubuntu:22.04", "execution_parameters": { "command": [ "set", "-eu", "&&", "echo", "'=== tc1-input-exclude-bam ==='", "&&", "echo", "'--- localized input (post input-filter) ---'", "&&", "find", "${INPUT_DATA}", "-type", "f", "|", "sort", "&&", "mkdir", "-p", "${OUTPUT_DATA}", "&&", "cp", "-R", "${INPUT_DATA}/.", "${OUTPUT_DATA}/", "&&", "echo", "'--- staged for upload (pre output-filter) ---'", "&&", "find", "${OUTPUT_DATA}", "-type", "f", "|", "sort" ], "params": { "input_data": { "remote": "s3://dev-de-core-us-west-2-051791135335/test_data/ocsdv-452-filters/input/", "local": "input_data", "exclude": [ ".*\\.bam", ".*\\.bam\\.bai" ] }, "output_data": { "local": "output_data", "remote": "s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc1-input-exclude-bam/" } }, "inputs": [ "input_data" ], "outputs": [ "output_data" ], "output_s3_prefix": "s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc1-input-exclude-bam/" }, "execution_platform": { "aws_batch": { "job_queue_name": "dev-de-demand-on-demand-job-queue" } }, "resource_requirements": { "vcpus": 1, "memory": 2048 } }tc2-input-include-fastq — input-side include, 4 objects uploaded (7,932 bytes)
Uploaded (
Total Objects: 4 / Total Size: 7932; 4 × 1,983 = 7,932, matching source sizes exactly):Correctly not uploaded — the input side declares a single include pattern
.*\.fastqand no exclude, so any key that does not match is not localized. None of these eight keys end in.fastq:All four fixture keys that do match
.*\.fastqare present, so membership is correct in both directions. Step Functions executionarn:aws:states:us-west-2:051791135335:execution:dev-de-demand-execution:ocsdv452-tc2-input-include-fastq,SUCCEEDED, 2026-08-12 15:37:27 → 15:42:09 (-07:00).{ "execution_type": "ocsdv452", "execution_id": "ocsdv452-tc2-input-include-fastq", "execution_image": "public.ecr.aws/ubuntu/ubuntu:22.04", "execution_parameters": { "command": [ "set", "-eu", "&&", "echo", "'=== tc2-input-include-fastq ==='", "&&", "echo", "'--- localized input (post input-filter) ---'", "&&", "find", "${INPUT_DATA}", "-type", "f", "|", "sort", "&&", "mkdir", "-p", "${OUTPUT_DATA}", "&&", "cp", "-R", "${INPUT_DATA}/.", "${OUTPUT_DATA}/", "&&", "echo", "'--- staged for upload (pre output-filter) ---'", "&&", "find", "${OUTPUT_DATA}", "-type", "f", "|", "sort" ], "params": { "input_data": { "remote": "s3://dev-de-core-us-west-2-051791135335/test_data/ocsdv-452-filters/input/", "local": "input_data", "include": [ ".*\\.fastq" ] }, "output_data": { "local": "output_data", "remote": "s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc2-input-include-fastq/" } }, "inputs": [ "input_data" ], "outputs": [ "output_data" ], "output_s3_prefix": "s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc2-input-include-fastq/" }, "execution_platform": { "aws_batch": { "job_queue_name": "dev-de-demand-on-demand-job-queue" } }, "resource_requirements": { "vcpus": 1, "memory": 2048 } }tc3-output-exclude-fastq — output-side exclude, 8 objects uploaded (533,678 bytes)
Uploaded (
Total Objects: 8 / Total Size: 533678):Correctly not uploaded — the input side is unfiltered, so all 12 objects were localized and all 12 were staged under
${OUTPUT_DATA}. These four were dropped at upload because they match the output-side exclude.*\.fastq:This is the case that distinguishes output-side filtering from input-side filtering by observation rather than by declaration: the container log lists all 12 files at both checkpoints, yet only 8 objects reached S3. Step Functions execution
ocsdv452-tc3-output-exclude-fastq,SUCCEEDED, 2026-08-12 15:38:21 → 15:41:58 (-07:00); Batch job7f83fd65-6e9e-4817-a48d-e6e796b1cedfondev-de-demand-on-demand-job-queue,SUCCEEDED.{ "execution_type": "ocsdv452", "execution_id": "ocsdv452-tc3-output-exclude-fastq", "execution_image": "public.ecr.aws/ubuntu/ubuntu:22.04", "execution_parameters": { "command": [ "set", "-eu", "&&", "echo", "'=== tc3-output-exclude-fastq ==='", "&&", "echo", "'--- localized input (post input-filter) ---'", "&&", "find", "${INPUT_DATA}", "-type", "f", "|", "sort", "&&", "mkdir", "-p", "${OUTPUT_DATA}", "&&", "cp", "-R", "${INPUT_DATA}/.", "${OUTPUT_DATA}/", "&&", "echo", "'--- staged for upload (pre output-filter) ---'", "&&", "find", "${OUTPUT_DATA}", "-type", "f", "|", "sort" ], "params": { "input_data": { "remote": "s3://dev-de-core-us-west-2-051791135335/test_data/ocsdv-452-filters/input/", "local": "input_data" }, "output_data": { "local": "output_data", "remote": "s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc3-output-exclude-fastq/", "exclude": [ ".*\\.fastq" ] } }, "inputs": [ "input_data" ], "outputs": [ "output_data" ], "output_s3_prefix": "s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc3-output-exclude-fastq/" }, "execution_platform": { "aws_batch": { "job_queue_name": "dev-de-demand-on-demand-job-queue" } }, "resource_requirements": { "vcpus": 1, "memory": 2048 } }tc4-both-ends-filtered — include on both ends, 1 object uploaded (463 bytes)
Uploaded (verbatim from
aws s3 ls ... --recursive):Correctly not uploaded — two stages, in order:
sampleA/.*admits only the 5 objects undersampleA/. Dropped at localization (7 objects):README.mdandmetadata.json(top level, nosampleA/prefix), and all 5sampleB/*objects..*\.txtadmits onlyqc_summary.txtof the 5 that were staged. Dropped at upload (4 objects):sampleA/aligned.bam,sampleA/aligned.bam.bai,sampleA/reads_R1.fastq,sampleA/reads_R2.fastq.Each of the 11 absent files is absent for a reason one of the two filters calls for, and the single present file is the only one both filters admit. The
sampleA/path component survives into the destination key, confirming the include pattern is matched against the same relative path that is preserved on upload. Step Functions executionarn:aws:states:us-west-2:051791135335:execution:dev-de-demand-execution:ocsdv452-tc4-both-ends-filtered,SUCCEEDED, 2026-08-12 15:38:39 → 15:42:23 (-07:00); the object'sLastModifiedfalls inside that window.{ "execution_type": "ocsdv452", "execution_id": "ocsdv452-tc4-both-ends-filtered", "execution_image": "public.ecr.aws/ubuntu/ubuntu:22.04", "execution_parameters": { "command": [ "set", "-eu", "&&", "echo", "'=== tc4-both-ends-filtered ==='", "&&", "echo", "'--- localized input (post input-filter) ---'", "&&", "find", "${INPUT_DATA}", "-type", "f", "|", "sort", "&&", "mkdir", "-p", "${OUTPUT_DATA}", "&&", "cp", "-R", "${INPUT_DATA}/.", "${OUTPUT_DATA}/", "&&", "echo", "'--- staged for upload (pre output-filter) ---'", "&&", "find", "${OUTPUT_DATA}", "-type", "f", "|", "sort" ], "params": { "input_data": { "remote": "s3://dev-de-core-us-west-2-051791135335/test_data/ocsdv-452-filters/input/", "local": "input_data", "include": [ "sampleA/.*" ] }, "output_data": { "local": "output_data", "remote": "s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc4-both-ends-filtered/", "include": [ ".*\\.txt" ] } }, "inputs": [ "input_data" ], "outputs": [ "output_data" ], "output_s3_prefix": "s3://dev-de-core-us-west-2-051791135335/test_results/ocsdv-452-filters/tc4-both-ends-filtered/" }, "execution_platform": { "aws_batch": { "job_queue_name": "dev-de-demand-on-demand-job-queue" } }, "resource_requirements": { "vcpus": 1, "memory": 2048 } }Note on the first attempt
The first attempt at these four runs failed before the container started, with an
efs-utilserror reportingFile name too long. The cause was the generated ECS volume name: it made the mount helper's CA database path exceed OpenSSL's 256-byteBSIZEguard by 4 characters. It was worked around for the run above by shorteningexecution_typetoocsdv452. PR-E addresses it properly by condensing the generated volume name from 50 characters to 16, which puts the path back under the limit without relying on short caller-supplied names.Scope
This is a dev-environment functional check of four small cases against a 12-object fixture. It demonstrates that the filter semantics behave as declared on both the input and output sides of a real demand execution; it is not a performance or scale test, and it does not cover large transfers, multipart uploads, or concurrent executions. Verification was read-only (
s3 ls,s3api list-objects-v2,sts get-caller-identity,stepfunctions list/describe-execution,batch list/describe-jobs,logs get-log-events).Addendum: container logs confirm the input filter runs on the download, not just the upload
The S3 result alone cannot fully separate input-side from output-side filtering for
tc1andtc2, because the container copies its input directory wholesale into the output directory — an unfiltered download plus an equivalent output-side exclude would produce the same uploaded set.tc3andtc4disambiguate by construction (tc3uploads the.bamfiles thattc1drops, from the same fixture), but it is worth closing directly.The container prints its localized input before copying. From
/aws/batch/job, streamdev-de-ocsdv452-43c8f938.../bc357a293a09432681668be032cb1cb3(tc1-input-exclude-bam):Eight files, not twelve. The four
.bam/.bam.baiobjects never reached the container's EFSworking directory — the filter was applied during the download, so the 524 KB of alignment data
was never transferred. That is the behavior the feature exists to provide, and it is what
distinguishes filtering from post-hoc pruning.
Only this one stream was still retained in CloudWatch when the logs were pulled, so this direct
confirmation covers
tc1; the other three cases rest on the S3 results and their Step Functionsexecutions above.