Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v8.0.0 #2463

Merged
merged 193 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
360da7d
rough draft of SRG_TIME_SERIES.yml
jtherrmann Oct 2, 2024
49ad39d
items: granules
jtherrmann Oct 2, 2024
9a7cf51
rename steps to states
jtherrmann Oct 2, 2024
fd9fc5e
rename back to steps
jtherrmann Oct 2, 2024
f127a66
eliminate map nesting
jtherrmann Oct 2, 2024
a6f991d
simplify tasks
jtherrmann Oct 2, 2024
d31a620
construct step function json for jobs in render.py
jtherrmann Oct 3, 2024
6ff153f
render map state for step function
jtherrmann Oct 4, 2024
3cd0026
max 300 granules
jtherrmann Oct 4, 2024
c217c33
do not specify default params in Batch job definition
jtherrmann Oct 4, 2024
0dbe157
rename SRG_TIME_SERIES custom compute env
jtherrmann Oct 4, 2024
2aa1699
update hyp3-multi-burst-sandbox to match hyp3-lavas-test
jtherrmann Oct 4, 2024
603a487
set placeholder timeout and memory for srg time series
jtherrmann Oct 4, 2024
8eae234
Deploy multi-burst-sandbox from srg branch, fix sfn name collision
jtherrmann Oct 4, 2024
33e758a
fix sfn step name, use hyp3-srg dev image
jtherrmann Oct 4, 2024
4088b18
pass original array to Map state rather than stringified version
jtherrmann Oct 4, 2024
da11d26
add back job definition default params, fix image tags
jtherrmann Oct 4, 2024
6b99bbf
pass bucket prefix and other params to SRG jobs
jtherrmann Oct 4, 2024
f0c1a24
update image tag
jtherrmann Oct 4, 2024
2622ebe
add granules to bucket prefix in job spec
jtherrmann Oct 4, 2024
5281585
do not add granules to bucket prefix in job spec
jtherrmann Oct 4, 2024
e0000a4
run time series back projection step in default compute env for now
jtherrmann Oct 4, 2024
3d7337f
pass --use-granules-from-s3 to time_series workflow
jtherrmann Oct 5, 2024
bd8f4a5
image tag
jtherrmann Oct 5, 2024
b27b909
increase timeout for time series gslc step
jtherrmann Oct 5, 2024
8021bcd
image tag
jtherrmann Oct 5, 2024
f3c9ed1
image tag
jtherrmann Oct 7, 2024
fac1172
per task compute_envs
AndrewPlayer3 Oct 7, 2024
782a8c7
add `do` extension
AndrewPlayer3 Oct 7, 2024
50d0e6c
move compute env into tasks
AndrewPlayer3 Oct 7, 2024
7820251
moving SRG compute env to file
AndrewPlayer3 Oct 7, 2024
b0d52e7
Merge branch 'srg' of https://github.com/asfhyp3/hyp3 into per-task-c…
AndrewPlayer3 Oct 7, 2024
6163404
added from_file compute env capability
AndrewPlayer3 Oct 7, 2024
21aca1b
removed -vv for tests
AndrewPlayer3 Oct 7, 2024
3dfb367
dont dupe names
AndrewPlayer3 Oct 7, 2024
721394e
dont dupe envs
AndrewPlayer3 Oct 7, 2024
4a46dbf
Merge branch 'develop' into srg
jtherrmann Oct 7, 2024
a7b6c26
Merge branch 'srg' into per-task-compute-envs
jtherrmann Oct 7, 2024
5d80472
changed 'from_file' to 'import'
AndrewPlayer3 Oct 8, 2024
880dfb6
Merge branch 'per-task-compute-envs' of https://github.com/asfhyp3/hy…
AndrewPlayer3 Oct 8, 2024
bb2aad1
rename compute_environments folder
AndrewPlayer3 Oct 8, 2024
55504ff
insariscearia compute env
AndrewPlayer3 Oct 8, 2024
80a0f49
update check_processing_time to handle list of results
jtherrmann Oct 8, 2024
9ce5fdc
moved compute env logic to render_cf.py
AndrewPlayer3 Oct 8, 2024
d3d5702
refactor
AndrewPlayer3 Oct 9, 2024
fe248e5
Merge branch 'srg' into per-task-compute-envs
jtherrmann Oct 9, 2024
95c63eb
add exception to imports
AndrewPlayer3 Oct 9, 2024
f7657e1
Merge branch 'per-task-compute-envs' of https://github.com/asfhyp3/hy…
AndrewPlayer3 Oct 9, 2024
3b39f14
Update apps/render_cf.py
AndrewPlayer3 Oct 9, 2024
bc96682
compute_env_name to name
AndrewPlayer3 Oct 9, 2024
a08debc
Merge branch 'per-task-compute-envs' of https://github.com/asfhyp3/hy…
AndrewPlayer3 Oct 9, 2024
456561b
only parse compute env file if one was given
AndrewPlayer3 Oct 9, 2024
fd748b1
ensure that imported compute envs are defined
AndrewPlayer3 Oct 9, 2024
6bbb1de
Update apps/render_cf.py
AndrewPlayer3 Oct 10, 2024
9ae8fb1
Update apps/render_cf.py
AndrewPlayer3 Oct 10, 2024
76e0fc4
Update apps/render_cf.py
AndrewPlayer3 Oct 10, 2024
146769c
Update Makefile
AndrewPlayer3 Oct 10, 2024
071ce78
Update Makefile
AndrewPlayer3 Oct 10, 2024
692a8ef
Update apps/compute-cf.yml.j2
AndrewPlayer3 Oct 10, 2024
802e8b4
Update apps/render_cf.py
AndrewPlayer3 Oct 10, 2024
2a2ce44
Update apps/render_cf.py
AndrewPlayer3 Oct 10, 2024
78b8dc6
add Optional and change list to set
AndrewPlayer3 Oct 10, 2024
3f42c31
Merge branch 'develop' into srg
jtherrmann Oct 10, 2024
ae71a16
Update apps/render_cf.py
AndrewPlayer3 Oct 10, 2024
7956857
Update apps/render_cf.py
AndrewPlayer3 Oct 10, 2024
8c485e7
Merge pull request #2453 from ASFHyP3/per-task-compute-envs
jtherrmann Oct 10, 2024
c4f14fb
update srg time series job spec
jtherrmann Oct 10, 2024
6d832e4
do not overwrite original job params in start execution worker
jtherrmann Oct 10, 2024
4362d49
rename job tasks to job steps
jtherrmann Oct 11, 2024
6e1f4d6
add validators
AndrewPlayer3 Oct 11, 2024
0f585d9
add validators to job_spec
AndrewPlayer3 Oct 11, 2024
b7dcfbf
add validators to job_spec
AndrewPlayer3 Oct 11, 2024
227dc50
flake8
AndrewPlayer3 Oct 11, 2024
c84e346
Merge branch 'srg' of https://github.com/asfhyp3/hyp3 into srg-valida…
AndrewPlayer3 Oct 11, 2024
b6a7094
better bounds description
AndrewPlayer3 Oct 11, 2024
ee21a5d
Update job_spec/SRG_GSLC.yml
AndrewPlayer3 Oct 11, 2024
5515e47
Update job_spec/SRG_TIME_SERIES.yml
AndrewPlayer3 Oct 11, 2024
48045b8
Update apps/api/src/hyp3_api/validation.py
AndrewPlayer3 Oct 11, 2024
1c40c13
Update apps/api/src/hyp3_api/validation.py
AndrewPlayer3 Oct 11, 2024
aae02ac
Update apps/api/src/hyp3_api/validation.py
AndrewPlayer3 Oct 11, 2024
0a572b7
handle default bounds in check_granules_intersecting_bounds
AndrewPlayer3 Oct 11, 2024
ec9929a
handle default bounds case
AndrewPlayer3 Oct 11, 2024
7d21eb2
extra test cases
AndrewPlayer3 Oct 11, 2024
0964444
use gpu image for gslc map step
jtherrmann Oct 11, 2024
6d486a6
Update tests/test_api/test_validation.py
jtherrmann Oct 11, 2024
8d3c7c7
Merge pull request #2455 from ASFHyP3/srg-validators
jtherrmann Oct 11, 2024
2212e4a
revert image tag for time_series step back to CPU version
jtherrmann Oct 11, 2024
dd94f5d
image tags
jtherrmann Oct 11, 2024
3fe2592
image tags
jtherrmann Oct 14, 2024
77b3272
Bump cfn-lint from 1.16.0 to 1.16.1
dependabot[bot] Oct 14, 2024
e557088
Bump boto3 from 1.35.34 to 1.35.40
dependabot[bot] Oct 14, 2024
9413085
image tag
jtherrmann Oct 14, 2024
d65e906
remove old todo
jtherrmann Oct 14, 2024
dea1718
image tags
jtherrmann Oct 14, 2024
f05c6c9
increase srg time series max to 600, fix default example
jtherrmann Oct 14, 2024
6b6da4a
update processing_times api spec
jtherrmann Oct 14, 2024
11704f9
fix proc time api schema
jtherrmann Oct 14, 2024
be3d81b
add relative orbit check for srg time series
AndrewPlayer3 Oct 15, 2024
4e4d024
remove else
AndrewPlayer3 Oct 15, 2024
c02c4eb
refactor
AndrewPlayer3 Oct 15, 2024
54d898f
list to number
AndrewPlayer3 Oct 15, 2024
5c56489
flake8
AndrewPlayer3 Oct 15, 2024
1ef5d15
refactor
AndrewPlayer3 Oct 15, 2024
1684724
add relative orbit check to srg_gslc
AndrewPlayer3 Oct 15, 2024
4666bea
add reference for relative orbit calc
AndrewPlayer3 Oct 15, 2024
51fea7b
image tags
jtherrmann Oct 15, 2024
d507b45
filter batch job output in step function
jtherrmann Oct 15, 2024
d9eadf0
json path *
jtherrmann Oct 15, 2024
15c7813
refactor
AndrewPlayer3 Oct 16, 2024
61cf1d3
allow excluding job params
jtherrmann Oct 16, 2024
7585fed
fix typo
jtherrmann Oct 16, 2024
0ba47e3
fix step function batch params key
jtherrmann Oct 16, 2024
11de54a
Merge pull request #2459 from ASFHyP3/srg-validators
AndrewPlayer3 Oct 16, 2024
865308b
relative orbits unit test is failing
jtherrmann Oct 16, 2024
83a374a
automatically filter batch params in step function
jtherrmann Oct 16, 2024
e5a731d
readability
jtherrmann Oct 16, 2024
5de24c8
filter stringified batch params in start_execution_worker
jtherrmann Oct 16, 2024
dfb93fa
pass entire job
jtherrmann Oct 16, 2024
ef1efd1
gitignore
jtherrmann Oct 16, 2024
dd83213
Merge branch 'develop' into srg
jtherrmann Oct 16, 2024
88f2f06
test fix
AndrewPlayer3 Oct 17, 2024
5046575
Merge pull request #2462 from ASFHyP3/srg-validators
jtherrmann Oct 17, 2024
94eb5ec
remove job definition default param values
jtherrmann Oct 17, 2024
8e54a2a
try removing non-api-schema default job params
jtherrmann Oct 17, 2024
0b171b5
fix SRG_GSLC
jtherrmann Oct 17, 2024
06422a2
include bucket_prefix in batch params
jtherrmann Oct 17, 2024
7e2502e
assume all params have api_schema in api spec template
jtherrmann Oct 17, 2024
98727e6
finish removing non-api-schema defaults from job specs
jtherrmann Oct 17, 2024
f919149
image tag
jtherrmann Oct 17, 2024
6cdec5e
fix check_processing_time unit tests
jtherrmann Oct 17, 2024
01e4f43
fix `test_start_execution_worker.py::test_submit_jobs`
jtherrmann Oct 17, 2024
e19abb7
move a comment, delete old unit test
jtherrmann Oct 17, 2024
335457c
image tags
jtherrmann Oct 17, 2024
bd25c2b
image tags
jtherrmann Oct 18, 2024
aaa8f5c
validate job specs
jtherrmann Oct 18, 2024
2be9e83
job_step -> step
jtherrmann Oct 18, 2024
0bbbadc
time series todos, start changelog
jtherrmann Oct 18, 2024
573d956
add new srg job to lavas deployments, finish changelog
jtherrmann Oct 18, 2024
6fc0908
tweaks
jtherrmann Oct 18, 2024
5ac84a6
wording
jtherrmann Oct 18, 2024
1b8532a
flake8
jtherrmann Oct 18, 2024
2b596c5
Update job_spec/INSAR_ISCE.yml
jtherrmann Oct 18, 2024
9ec6676
Update image tags
jtherrmann Oct 18, 2024
5f10cce
Update job_spec/SRG_TIME_SERIES.yml
jtherrmann Oct 18, 2024
24856d5
Update apps/render_cf.py
jtherrmann Oct 18, 2024
b932fdc
Merge pull request #2447 from ASFHyP3/srg
jtherrmann Oct 18, 2024
80f6c0d
Merge pull request #2458 from ASFHyP3/dependabot/pip/boto3-1.35.40
jtherrmann Oct 18, 2024
a90e1c7
Merge pull request #2457 from ASFHyP3/dependabot/pip/cfn-lint-1.16.1
jtherrmann Oct 18, 2024
ab5f6af
Bump moto[dynamodb] from 5.0.16 to 5.0.17
dependabot[bot] Oct 18, 2024
20fb65d
Merge pull request #2456 from ASFHyP3/dependabot/pip/moto-dynamodb--5…
jtherrmann Oct 18, 2024
24a7703
Remove .cpu and .gpu image tags from SRG job_specs
AndrewPlayer3 Oct 18, 2024
a77eddb
Merge pull request #2464 from ASFHyP3/remove-srg-image-tags
AndrewPlayer3 Oct 18, 2024
c6dc842
refactor compute env parsing so that only used compute envs are rendered
AndrewPlayer3 Oct 18, 2024
fc926ec
Merge branch 'develop' of https://github.com/asfhyp3/hyp3 into refact…
AndrewPlayer3 Oct 18, 2024
7d0ade1
added all important documentation
AndrewPlayer3 Oct 18, 2024
5123669
re-ordered comment
AndrewPlayer3 Oct 18, 2024
4a8e490
add test for get_compute_environments
AndrewPlayer3 Oct 21, 2024
1852c36
error when user imports but doesnt provide file
AndrewPlayer3 Oct 21, 2024
2ac2480
add error cases to test_get_compute_environments
AndrewPlayer3 Oct 21, 2024
ddc4c10
flake8
AndrewPlayer3 Oct 21, 2024
c5fbbe4
flake8
AndrewPlayer3 Oct 21, 2024
ec0d26c
Update Makefile
AndrewPlayer3 Oct 21, 2024
3062516
Update Makefile
AndrewPlayer3 Oct 21, 2024
4538d57
Update apps/render_cf.py
AndrewPlayer3 Oct 21, 2024
dcad83b
Bump cryptography from 43.0.1 to 43.0.3
dependabot[bot] Oct 21, 2024
2dabafb
Bump setuptools from 75.1.0 to 75.2.0
dependabot[bot] Oct 21, 2024
0b95b53
Bump boto3 from 1.35.40 to 1.35.44
dependabot[bot] Oct 21, 2024
b0c8e43
Bump ASFHyP3/actions from 0.11.2 to 0.12.0
dependabot[bot] Oct 21, 2024
4c4802e
test parse_job_step_map
jtherrmann Oct 21, 2024
2f0b387
improve map statement parser error handling
jtherrmann Oct 21, 2024
08c72ba
placeholder tests
jtherrmann Oct 21, 2024
2161a86
restrict custom compute env defs to one file
jtherrmann Oct 21, 2024
e258b70
combine test files
jtherrmann Oct 21, 2024
7c0557e
update a test
jtherrmann Oct 22, 2024
25e91e8
implement test
jtherrmann Oct 22, 2024
25d9b7e
implement a test and improve function
jtherrmann Oct 22, 2024
7f86585
adjust newline
jtherrmann Oct 22, 2024
f000d98
Merge pull request #2472 from ASFHyP3/jth-render-tests
AndrewPlayer3 Oct 22, 2024
631e8a6
update changelog
jtherrmann Oct 22, 2024
d3afd83
Merge pull request #2465 from ASFHyP3/refactor-compute-envs
jtherrmann Oct 22, 2024
d2cb0ae
revert SRG changes to multi-burst-sandbox
jtherrmann Oct 22, 2024
da772bc
Merge pull request #2473 from ASFHyP3/multi-burst-sandbox
jtherrmann Oct 22, 2024
09f6acd
add boundsvalidationerror
AndrewPlayer3 Oct 22, 2024
6fb1c8d
remove do extension
AndrewPlayer3 Oct 22, 2024
7321873
Merge pull request #2474 from ASFHyP3/bounds-error-fix
AndrewPlayer3 Oct 22, 2024
8670bad
Merge pull request #2471 from ASFHyP3/dependabot/github_actions/ASFHy…
jtherrmann Oct 23, 2024
43135b2
Merge pull request #2469 from ASFHyP3/dependabot/pip/boto3-1.35.44
jtherrmann Oct 23, 2024
0d96051
Merge pull request #2468 from ASFHyP3/dependabot/pip/setuptools-75.2.0
jtherrmann Oct 23, 2024
b49b4e1
Bump cfn-lint from 1.16.1 to 1.18.1
dependabot[bot] Oct 23, 2024
19471a8
Bump moto[dynamodb] from 5.0.17 to 5.0.18
dependabot[bot] Oct 23, 2024
ee202a2
Merge pull request #2475 from ASFHyP3/dependabot/pip/cfn-lint-1.18.1
jtherrmann Oct 23, 2024
7789788
Merge pull request #2466 from ASFHyP3/dependabot/pip/cryptography-43.0.3
jtherrmann Oct 24, 2024
35a11ca
Merge pull request #2470 from ASFHyP3/dependabot/pip/moto-dynamodb--5…
jtherrmann Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/deploy-hyp3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ inputs:
description: "Comma separated list of Subnet IDs"
required: true
SECRET_ARN:
description: "ARN of Secret in AWS Secrets Manager containing all the credentials needed for job tasks"
description: "ARN of Secret in AWS Secrets Manager containing all the credentials needed for job steps"
required: true
CLOUDFORMATION_ROLE_ARN:
description: "The CloudFormation role to use for this deployment"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ on:

jobs:
call-changelog-check-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.11.2
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.12.0
2 changes: 1 addition & 1 deletion .github/workflows/create-jira-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
call-create-jira-issue-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.11.2
uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.12.0
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-daac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ jobs:
call-bump-version-workflow:
if: github.ref == 'refs/heads/main'
needs: deploy
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.11.2
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.12.0
secrets:
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
1 change: 1 addition & 0 deletions .github/workflows/deploy-enterprise-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
job_files: >-
job_spec/INSAR_ISCE_BURST.yml
job_spec/SRG_GSLC.yml
job_spec/SRG_TIME_SERIES.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
default_max_vcpus: 640
expanded_max_vcpus: 640
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ jobs:
job_files: >-
job_spec/INSAR_ISCE_BURST.yml
job_spec/SRG_GSLC.yml
job_spec/SRG_TIME_SERIES.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
default_max_vcpus: 640
expanded_max_vcpus: 640
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ on:

jobs:
call-labeled-pr-check-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.11.2
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.12.0
2 changes: 1 addition & 1 deletion .github/workflows/release-template-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
call-release-checklist-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.11.2
uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.12.0
permissions:
pull-requests: write
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.11.2
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.12.0
with:
release_prefix: HyP3
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ jobs:
snyk iac test --severity-threshold=high

call-secrets-analysis-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.11.2
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.12.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apps/api/src/hyp3_api/api-spec/job_parameters.yml
apps/api/src/hyp3_api/job_validation_map.yml
apps/step-function.json
apps/**/*-cf.yml
apps/start-execution-worker/src/batch_params_by_job_type.json
lib/dynamo/dynamo/*.json
lib/dynamo/dynamo/*.yml

Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ 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).

## [8.0.0]

### Added
- A job step can now be applied to every item in a list using a new `map: for <item> in <items>` syntax. For example, given a job spec with a `granules` parameter, a step that includes a `map: for granule in granules` field is applied to each item in the `granules` list and can refer to `Ref::granule` within its `command` field.
- If a job contains a `map` step, the processing time value for that step (in the `processing_times` list in the job's API response) is a sub-list of processing times for the step's iterations, in the same order as the items in the input list.
- A new `SRG_TIME_SERIES` job type has been added to the `hyp3-lavas` and `hyp3-lavas-test` deployments. This workflow uses the new `map` syntax described above to produce a GSLC for each level-0 Sentinel-1 granule passed via the `granules` parameter and then produces a time series product from the GSLCs. See the [HyP3 SRG](https://github.com/ASFHyP3/hyp3-srg) plugin.
- The `SRG_GSLC` job type now includes parameter validation.

### Changed
- Changes to custom compute environments:
- Custom compute environments are now applied to individual job steps rather than to entire jobs. The `compute_environment` field is now provided at the step level rather than at the top level of the job spec.
- If the value of the `compute_environment` field is `Default`, then the step uses the deployment's default compute environment. Otherwise, the value must be the name of a custom compute environment defined in `job_spec/config/compute_environments.yml`.
- Other changes to the job spec syntax:
- The `tasks` field has been renamed to `steps`.
- Job parameters no longer contain a top-level `default` field. The `default` field within each parameter's `api_schema` mapping is still supported.
- Job specs no longer explicitly define a `bucket_prefix` parameter. Instead, `bucket_prefix` is automatically defined and can still be referenced as `Ref::bucket_prefix` within each step's `command` field.

## [7.12.0]

### Changed
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
API = ${PWD}/apps/api/src
APPS = ${PWD}/apps
CHECK_PROCESSING_TIME = ${PWD}/apps/check-processing-time/src
GET_FILES = ${PWD}/apps/get-files/src
HANDLE_BATCH_EVENT = ${PWD}/apps/handle-batch-event/src
Expand All @@ -10,7 +11,7 @@ DISABLE_PRIVATE_DNS = ${PWD}/apps/disable-private-dns/src
UPDATE_DB = ${PWD}/apps/update-db/src
UPLOAD_LOG = ${PWD}/apps/upload-log/src
DYNAMO = ${PWD}/lib/dynamo
export PYTHONPATH = ${API}:${CHECK_PROCESSING_TIME}:${GET_FILES}:${HANDLE_BATCH_EVENT}:${SET_BATCH_OVERRIDES}:${SCALE_CLUSTER}:${START_EXECUTION_MANAGER}:${START_EXECUTION_WORKER}:${DISABLE_PRIVATE_DNS}:${UPDATE_DB}:${UPLOAD_LOG}:${DYNAMO}
export PYTHONPATH = ${API}:${CHECK_PROCESSING_TIME}:${GET_FILES}:${HANDLE_BATCH_EVENT}:${SET_BATCH_OVERRIDES}:${SCALE_CLUSTER}:${START_EXECUTION_MANAGER}:${START_EXECUTION_WORKER}:${DISABLE_PRIVATE_DNS}:${UPDATE_DB}:${UPLOAD_LOG}:${DYNAMO}:${APPS}


build: render
Expand All @@ -36,11 +37,12 @@ install:
python -m pip install -r requirements-all.txt

files ?= job_spec/*.yml
compute_env_file ?= job_spec/config/compute_environments.yml
security_environment ?= ASF
api_name ?= local
cost_profile ?= DEFAULT
render:
@echo rendering $(files) for API $(api_name) and security environment $(security_environment); python apps/render_cf.py -j $(files) -s $(security_environment) -n $(api_name) -c $(cost_profile)
@echo rendering $(files) for API $(api_name) and security environment $(security_environment); python apps/render_cf.py -j $(files) -e $(compute_env_file) -s $(security_environment) -n $(api_name) -c $(cost_profile)

static: flake8 openapi-validate cfn-lint

Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/hyp3_api/api-spec/job_parameters.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ components:
description: Parameters for running {{ job_type }} jobs
type: object
additionalProperties: false
{% for parameter, parameter_spec in job_spec['parameters'].items() if 'api_schema' in parameter_spec and parameter in job_spec.get('required_parameters', []) %}
{% for parameter, parameter_spec in job_spec['parameters'].items() if parameter in job_spec.get('required_parameters', []) %}
{% if loop.first %}
required:
{% endif %}
- {{ parameter }}
{% endfor %}
{% for parameter, parameter_spec in job_spec['parameters'].items() if 'api_schema' in parameter_spec %}
{% for parameter, parameter_spec in job_spec['parameters'].items() %}
{% if loop.first %}
properties:
{% endif %}
Expand Down
17 changes: 11 additions & 6 deletions apps/api/src/hyp3_api/api-spec/openapi-spec.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -408,20 +408,25 @@ components:

processing_times:
description: >
A list of run times for the job's processing steps in the order that they were executed. For example,
a job comprised of a single processing step would yield a list containing one processing time, while a job
comprised of three processing steps would yield a list containing three processing times. An empty list
represents a failure to calculate processing times.
List of run times for the job's processing steps in the order that they were executed.
An empty list represents a failure to calculate processing times.
type: array
items:
$ref: '#/components/schemas/processing_time_in_seconds'
oneOf:
- type: array
items:
$ref: '#/components/schemas/processing_time_in_seconds'
example: [200, 100, 150]
- $ref: '#/components/schemas/processing_time_in_seconds'


processing_time_in_seconds:
description: >
Run time in seconds for a particular processing step's final attempt (regardless of whether it succeeded).
Run time in seconds for a processing step's final attempt (regardless of whether it succeeded).
A value of zero indicates that there were no attempts.
type: number
minimum: 0
example: 50

securitySchemes:
EarthDataLogin:
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/hyp3_api/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import dynamo
from dynamo.exceptions import AccessCodeError, InsufficientCreditsError, UnexpectedApplicationStatusError
from hyp3_api import util
from hyp3_api.validation import GranuleValidationError, validate_jobs
from hyp3_api.validation import BoundsValidationError, GranuleValidationError, validate_jobs


def problem_format(status, message):
Expand All @@ -28,7 +28,7 @@ def post_jobs(body, user):
validate_jobs(body['jobs'])
except requests.HTTPError as e:
print(f'WARN: CMR search failed: {e}')
except GranuleValidationError as e:
except (BoundsValidationError, GranuleValidationError) as e:
abort(problem_format(400, str(e)))

try:
Expand Down
60 changes: 60 additions & 0 deletions apps/api/src/hyp3_api/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class GranuleValidationError(Exception):
pass


class BoundsValidationError(Exception):
pass


with open(Path(__file__).parent / 'job_validation_map.yml') as f:
JOB_VALIDATION_MAP = yaml.safe_load(f.read())

Expand Down Expand Up @@ -136,6 +140,62 @@ def get_multipolygon_from_geojson(input_file):
return MultiPolygon(polygons)


def check_bounds_formatting(job, _):
bounds = job['job_parameters']['bounds']
if bounds == [0.0, 0.0, 0.0, 0.0]:
return

if bounds[0] >= bounds[2] or bounds[1] >= bounds[3]:
raise BoundsValidationError(
'Invalid order for bounds. Bounds should be ordered [min lon, min lat, max lon, max lat].'
)

def bad_lat(lat):
return lat > 90 or lat < -90

def bad_lon(lon):
return lon > 180 or lon < -180

if any([bad_lon(bounds[0]), bad_lon(bounds[2]), bad_lat(bounds[1]), bad_lat(bounds[3])]):
raise BoundsValidationError(
'Invalid lon/lat value(s) in bounds. Bounds should be ordered [min lon, min lat, max lon, max lat].'
)


def check_granules_intersecting_bounds(job, granule_metadata):
bounds = job['job_parameters']['bounds']
if bounds == [0.0, 0.0, 0.0, 0.0]:
bounds = granule_metadata[0]['polygon']
else:
bounds = Polygon.from_bounds(*bounds)
bad_granules = []
for granule in granule_metadata:
bbox = granule['polygon']
if not bbox.intersection(bounds):
bad_granules.append(granule['name'])
if bad_granules:
raise GranuleValidationError(
f'The following granules do not intersect the provided bounds: {bad_granules}.'
)


def check_same_relative_orbits(job, granule_metadata):
previous_relative_orbit = None
for granule in granule_metadata:
name_split = granule['name'].split('_')
absolute_orbit = name_split[7]
# "Relationship between relative and absolute orbit numbers": https://sentiwiki.copernicus.eu/web/s1-products
offset = 73 if name_split[0] == 'S1A' else 27
relative_orbit = ((int(absolute_orbit) - offset) % 175) + 1
if not previous_relative_orbit:
previous_relative_orbit = relative_orbit
if relative_orbit != previous_relative_orbit:
raise GranuleValidationError(
f'Relative orbit number for {granule["name"]} does not match that of the previous granules: '
f'{relative_orbit} is not {previous_relative_orbit}.'
)


def convert_single_burst_jobs(jobs: list[dict]) -> list[dict]:
jobs = deepcopy(jobs)
for job in jobs:
Expand Down
24 changes: 14 additions & 10 deletions apps/check-processing-time/src/check_processing_time.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
from typing import Union


def get_time_from_attempts(attempts: list[dict]) -> float:
Expand All @@ -9,15 +10,18 @@ def get_time_from_attempts(attempts: list[dict]) -> float:
return (final_attempt['StoppedAt'] - final_attempt['StartedAt']) / 1000


def get_time_from_result(result: dict) -> float:
if 'Attempts' in result:
attempts = result['Attempts']
else:
attempts = json.loads(result['Cause'])['Attempts']
return get_time_from_attempts(attempts)
def get_time_from_result(result: Union[list, dict]) -> Union[list, float]:
if isinstance(result, list):
return [get_time_from_result(item) for item in result]

if 'start' in result:
attempts = [{'StartedAt': start, 'StoppedAt': stop} for start, stop in zip(result['start'], result['stop'])]
return get_time_from_attempts(attempts)

def lambda_handler(event, context) -> list[float]:
results_dict = event['processing_results']
results = [results_dict[key] for key in sorted(results_dict.keys())]
return list(map(get_time_from_result, results))
return get_time_from_attempts(json.loads(result['Cause'])['Attempts'])


def lambda_handler(event, _) -> list[Union[list, float]]:
processing_results = event['processing_results']
result_list = [processing_results[key] for key in sorted(processing_results.keys())]
return get_time_from_result(result_list)
9 changes: 3 additions & 6 deletions apps/compute-cf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ Outputs:
JobQueueArn:
Value: !Ref BatchJobQueue

{% for job_type, job_spec in job_types.items() if 'Default' != job_spec['compute_environment']['name'] %}
{% set name = job_spec['compute_environment']['name'] %}
{% for name in compute_envs %}
{{ name }}ComputeEnvironmentArn:
Value: !Ref {{ name }}ComputeEnvironment

{{ name }}JobQueueArn:
Value: !Ref {{ name }}JobQueue
{% endfor %}

{% endfor %}
TaskRoleArn:
Value: !GetAtt TaskRole.Arn

Expand Down Expand Up @@ -106,9 +105,7 @@ Resources:
SchedulingPolicy:
Type: AWS::Batch::SchedulingPolicy

{% for job_type, job_spec in job_types.items() if 'Default' != job_spec['compute_environment']['name'] %}
{% set env = job_spec['compute_environment'] %}
{% set name = env['name'] %}
{% for name, env in compute_envs.items() %}
{% set instance_types = env['instance_types'].split(',') if 'instance_types' in env else '!Ref InstanceTypes' %}
{% set ami_id = env['ami_id'] if 'ami_id' in env else '!Ref AmiId' %}
{% set type = env['allocation_type'] if 'allocation_type' in env else 'SPOT' %}
Expand Down
8 changes: 4 additions & 4 deletions apps/handle-batch-event/handle-batch-event-cf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Parameters:
JobQueueArn:
Type: String

{% for job_type, job_spec in job_types.items() if 'Default' != job_spec['compute_environment']['name'] %}
{{ job_spec['compute_environment']['name'] }}JobQueueArn:
{% for name in compute_envs %}
{{ name }}JobQueueArn:
Type: String
{% endfor %}

Expand Down Expand Up @@ -100,8 +100,8 @@ Resources:
detail:
jobQueue:
- !Ref JobQueueArn
{% for job_type, job_spec in job_types.items() if 'Default' != job_spec['compute_environment']['name'] %}
- !Ref {{ job_spec['compute_environment']['name'] }}JobQueueArn
{% for name in compute_envs %}
- !Ref {{ name }}JobQueueArn
{% endfor %}
status:
- RUNNING
Expand Down
Loading
Loading