Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/pip/moto-dynamodb--5.0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
jtherrmann authored Feb 4, 2025
2 parents dea1f24 + 323a053 commit 30f1ddf
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 14 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy-opera-disp-sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
deploy_ref: refs/heads/develop
job_files: >-
job_spec/OPERA_DISP_TMS.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [9.4.0]

### Changed
- The `OPERA_DISP_TMS` job type is now a fan-out/fan-in workflow.

### Fixed
- Previously there was a bug in which fan-out job steps, defined using the `map: for item in items` syntax, would fail if `items` was an array of non-string values, because AWS Batch SubmitJob expects string parameters. This bug has been fixed by converting each value to a string before passing it to SubmitJob.

## [9.3.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion apps/render_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_batch_job_parameters(job_spec: dict, step: dict, map_item: str | None =
batch_params = {}
for param in step_params:
if param == map_item:
batch_params[f'{map_item}.$'] = '$$.Map.Item.Value'
batch_params[f'{map_item}.$'] = "States.Format('{}', $$.Map.Item.Value)"
else:
if param not in job_params:
raise ValueError(f"job parameter '{param}' has not been defined")
Expand Down
29 changes: 23 additions & 6 deletions job_spec/OPERA_DISP_TMS.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPERA_DISP_TMS:
required_parameters:
- measurement_type
- frames
- frame_ids
- start_date
- end_date
parameters:
Expand All @@ -14,7 +14,7 @@ OPERA_DISP_TMS:
- secant_velocity
- velocity
example: displacement
frames:
frame_ids:
api_schema:
description: List of frame IDs to include in mosaic
type: array
Expand Down Expand Up @@ -52,21 +52,38 @@ OPERA_DISP_TMS:
cost: 1.0
validators: []
steps:
- name: ''
- name: CREATE_MEASUREMENT_GEOTIFF
map: for frame_id in frame_ids
image: ghcr.io/asfhyp3/opera-disp-tms
command:
- ++process
- create_measurement_geotiff
- Ref::frame_id
- Ref::measurement_type
- Ref::frames
- Ref::start_date
- Ref::end_date
- --bucket
- '!Ref Bucket'
- --bucket-prefix
- Ref::bucket_prefix
timeout: 21600 # 6 hr
timeout: 1800 # 30 min
compute_environment: Default
vcpu: 1
memory: 31500
memory: 7600
secrets:
- EARTHDATA_USERNAME
- EARTHDATA_PASSWORD
- name: CREATE_TILE_MAP
image: ghcr.io/asfhyp3/opera-disp-tms
command:
- ++process
- create_tile_map
- Ref::measurement_type
- --bucket
- '!Ref Bucket'
- --bucket-prefix
- Ref::bucket_prefix
timeout: 21600 # 6 hr
compute_environment: Default
vcpu: 1
memory: 31500
4 changes: 2 additions & 2 deletions requirements-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-r requirements-apps-start-execution-worker.txt
-r requirements-apps-disable-private-dns.txt
-r requirements-apps-update-db.txt
boto3==1.36.2
boto3==1.36.11
jinja2==3.1.5
moto[dynamodb]==5.0.28
pytest==8.3.4
Expand All @@ -15,4 +15,4 @@ ruff
mypy
setuptools==75.8.0
openapi-spec-validator==0.7.1
cfn-lint==1.22.5
cfn-lint==1.23.1
2 changes: 1 addition & 1 deletion requirements-apps-disable-private-dns.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
boto3==1.36.2
boto3==1.36.11
2 changes: 1 addition & 1 deletion requirements-apps-start-execution-manager.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
boto3==1.36.2
boto3==1.36.11
./lib/dynamo/
./lib/lambda_logging/
2 changes: 1 addition & 1 deletion requirements-apps-start-execution-worker.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
boto3==1.36.2
boto3==1.36.11
./lib/lambda_logging/
2 changes: 1 addition & 1 deletion tests/test_render_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_get_batch_job_parameters():
assert render_cf.get_batch_job_parameters(job_spec, step, map_item='param5') == {
'param2.$': '$.batch_job_parameters.param2',
'param3.$': '$.batch_job_parameters.param3',
'param5.$': '$$.Map.Item.Value',
'param5.$': "States.Format('{}', $$.Map.Item.Value)",
}

step = {'command': ['foo', 'Ref::param2', 'Ref::param3', 'bar', 'Ref::param5']}
Expand Down

0 comments on commit 30f1ddf

Please sign in to comment.