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 v9.2.0 #2549

Merged
merged 42 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d821ea8
Bump boto3 from 1.35.76 to 1.35.82
dependabot[bot] Dec 17, 2024
0e3f54f
Bump cfn-lint from 1.21.0 to 1.22.2
dependabot[bot] Dec 17, 2024
4cfc363
Merge pull request #2530 from ASFHyP3/dependabot/pip/boto3-1.35.82
jtherrmann Dec 18, 2024
17d3212
Bump moto[dynamodb] from 5.0.22 to 5.0.23
dependabot[bot] Dec 18, 2024
3291c12
Merge pull request #2531 from ASFHyP3/dependabot/pip/cfn-lint-1.22.2
jtherrmann Dec 18, 2024
928638d
Merge pull request #2526 from ASFHyP3/dependabot/pip/moto-dynamodb--5…
jtherrmann Dec 18, 2024
6de868d
Bump ASFHyP3/actions from 0.12.0 to 0.13.2
dependabot[bot] Dec 23, 2024
7eb669b
Bump cfn-lint from 1.22.2 to 1.22.3
dependabot[bot] Dec 30, 2024
a648a44
Bump boto3 from 1.35.82 to 1.35.90
dependabot[bot] Dec 30, 2024
d4a690e
Merge pull request #2540 from ASFHyP3/dependabot/pip/boto3-1.35.90
jtherrmann Jan 2, 2025
4c78da6
Bump jinja2 from 3.1.4 to 3.1.5
dependabot[bot] Jan 2, 2025
44b12a0
make opera-disp-tms jobs available in edc-uat instead of standalone s…
asjohnston-asf Jan 7, 2025
0257560
update changelog
asjohnston-asf Jan 7, 2025
faef3c2
Merge pull request #2545 from ASFHyP3/opera-in-edc-uat
asjohnston-asf Jan 7, 2025
7d59f3a
Merge pull request #2536 from ASFHyP3/dependabot/pip/jinja2-3.1.5
asjohnston-asf Jan 7, 2025
c86cb42
Bump moto[dynamodb] from 5.0.23 to 5.0.26
dependabot[bot] Jan 7, 2025
457e213
Bump boto3 from 1.35.90 to 1.35.93
dependabot[bot] Jan 7, 2025
ea93fb6
Merge pull request #2539 from ASFHyP3/dependabot/pip/cfn-lint-1.22.3
asjohnston-asf Jan 7, 2025
85d4668
Bump setuptools from 75.6.0 to 75.7.0
dependabot[bot] Jan 7, 2025
b64cd28
add credit cost for opera-disp-tms jobs in edc
asjohnston-asf Jan 7, 2025
b8af95c
Merge branch 'develop' into opera-in-edc-uat
asjohnston-asf Jan 7, 2025
cf89ace
Merge pull request #2547 from ASFHyP3/opera-in-edc-uat
asjohnston-asf Jan 7, 2025
3817540
Merge branch 'develop' into dependabot/github_actions/ASFHyP3/actions…
asjohnston-asf Jan 7, 2025
73c5bae
Merge branch 'develop' into dependabot/pip/setuptools-75.7.0
asjohnston-asf Jan 7, 2025
8c2ae78
Merge branch 'develop' into dependabot/pip/moto-dynamodb--5.0.26
asjohnston-asf Jan 7, 2025
959b80f
Merge branch 'develop' into dependabot/pip/boto3-1.35.93
asjohnston-asf Jan 7, 2025
51a4ed9
Merge pull request #2542 from ASFHyP3/dependabot/pip/setuptools-75.7.0
asjohnston-asf Jan 7, 2025
1f0f16e
Merge pull request #2544 from ASFHyP3/dependabot/pip/moto-dynamodb--5…
asjohnston-asf Jan 7, 2025
bf2ea53
Merge pull request #2546 from ASFHyP3/dependabot/pip/boto3-1.35.93
asjohnston-asf Jan 7, 2025
0bf82bf
add mypy
jtherrmann Jan 7, 2025
8ed3967
Merge branch 'develop' into mypy
jtherrmann Jan 7, 2025
f7fe847
fix mypy errors
jtherrmann Jan 8, 2025
2224efb
upgrade to python 3.13
jtherrmann Jan 8, 2025
2914b9d
remove some type ignores
jtherrmann Jan 8, 2025
19abecb
type ignore
jtherrmann Jan 8, 2025
81be34f
fix ruff
jtherrmann Jan 8, 2025
e13c954
ruff format
jtherrmann Jan 8, 2025
29304b0
changelog
jtherrmann Jan 8, 2025
6ba9f74
add perms to static analysis
jtherrmann Jan 8, 2025
95e8127
Update CHANGELOG.md
jtherrmann Jan 8, 2025
d4c9e11
Merge pull request #2548 from ASFHyP3/mypy
jtherrmann Jan 8, 2025
6e6dec1
Merge pull request #2535 from ASFHyP3/dependabot/github_actions/ASFHy…
jtherrmann Jan 8, 2025
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/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

jobs:
call-changelog-check-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.13.2

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
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,10 +6,10 @@

jobs:
call-create-jira-issue-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.13.2
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
JIRA_FIELDS: ${{ secrets.JIRA_FIELDS }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
5 changes: 3 additions & 2 deletions .github/workflows/deploy-daac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
job_spec/INSAR_GAMMA.yml
job_spec/RTC_GAMMA.yml
job_spec/INSAR_ISCE_BURST.yml
job_spec/OPERA_DISP_TMS.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
default_max_vcpus: 1500
expanded_max_vcpus: 3000
Expand All @@ -77,7 +78,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13

- uses: ./.github/actions/deploy-hyp3
if: github.ref == matrix.deploy_ref
Expand Down Expand Up @@ -111,6 +112,6 @@ jobs:
call-bump-version-workflow:
if: github.ref == 'refs/heads/main'
needs: deploy
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.13.2
secrets:
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy-enterprise-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13

- uses: ./.github/actions/deploy-hyp3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13

- uses: ./.github/actions/deploy-hyp3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-multi-burst-sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13

- uses: ./.github/actions/deploy-hyp3
with:
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/deploy-opera-disp-sandbox.yml

This file was deleted.

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 @@

jobs:
call-labeled-pr-check-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.13.2

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
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.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.13.2
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,8 +7,8 @@

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.13.2
with:
release_prefix: HyP3
secrets:
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
18 changes: 12 additions & 6 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: Static code analysis

permissions:
contents: read

on: push

jobs:
call-ruff-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
uses: ASFHyP3/actions/.github/workflows/[email protected]

call-mypy-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]

cfn-lint:
runs-on: ubuntu-latest
Expand All @@ -17,7 +23,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13
- run: |
python -m pip install --upgrade pip
make install
Expand All @@ -31,7 +37,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13
- run: |
python -m pip install --upgrade pip
make install
Expand All @@ -48,7 +54,7 @@ jobs:
- run: gem install statelint
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13
- run: |
python -m pip install --upgrade pip
make install
Expand All @@ -65,7 +71,7 @@ jobs:
- uses: snyk/actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13
- run: |
python -m pip install --upgrade pip
make install
Expand All @@ -78,4 +84,4 @@ jobs:
snyk iac test --severity-threshold=high

call-secrets-analysis-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.12.0
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.13.2
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13

- run: |
python -m pip install --upgrade pip
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ 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.2.0]

### Added
- Add `mypy` to [`static-analysis`](.github/workflows/static-analysis.yml) workflow
- `OPERA_DISP_TMS` job type is now available in EDC UAT deployment

### Changed
- Upgrade to Python 3.13

### Removed
- Remove `hyp3-opera-disp-sandbox` deployment

## [9.1.1]

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ From the repository root,
make install
```

- Install Python dependencies for AWS Lambda functions (requires pip for python 3.9)
- Install Python dependencies for AWS Lambda functions (requires pip for python 3.13)
```sh
make build
```
Expand Down
2 changes: 1 addition & 1 deletion apps/api/api-cf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Resources:
Handler: hyp3_api.lambda_handler.handler
MemorySize: 3008
Role: !GetAtt LambdaRole.Arn
Runtime: python3.9
Runtime: python3.13
Timeout: 30
{% if security_environment == 'EDC' %}
VpcConfig:
Expand Down
3 changes: 1 addition & 2 deletions apps/api/src/hyp3_api/auth.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import time
from os import environ
from typing import Optional

import jwt


def decode_token(token) -> Optional[dict]:
def decode_token(token) -> dict | None:
try:
return jwt.decode(token, environ['AUTH_PUBLIC_KEY'], algorithms=environ['AUTH_ALGORITHM'])
except (jwt.ExpiredSignatureError, jwt.DecodeError):
Expand Down
13 changes: 7 additions & 6 deletions apps/api/src/hyp3_api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from decimal import Decimal
from os import environ
from pathlib import Path
from typing import Any

import yaml
from flask import abort, g, jsonify, make_response, redirect, render_template, request
Expand Down Expand Up @@ -98,10 +99,10 @@ def default(self, o):


class CustomJSONProvider(JSONProvider):
def dumps(self, o):
return json.dumps(o, cls=CustomEncoder)
def dumps(self, obj: Any, **kwargs) -> str:
return json.dumps(obj, cls=CustomEncoder)

def loads(self, s):
def loads(self, s: str | bytes, **kwargs) -> Any:
return json.loads(s)


Expand All @@ -111,15 +112,15 @@ def __init__(self):

def __call__(self, errors):
response = super().__call__(errors)
error = response.json['errors'][0]
error = response.json['errors'][0] # type: ignore[index]
return handlers.problem_format(error['status'], error['title'])


app.json = CustomJSONProvider(app)

openapi = FlaskOpenAPIViewDecorator(
api_spec,
response_cls=None,
response_cls=None, # type: ignore[arg-type]
errors_handler_cls=ErrorHandler,
)

Expand All @@ -138,7 +139,7 @@ def jobs_post():
@app.route('/jobs', methods=['GET'])
@openapi
def jobs_get():
parameters = request.openapi.parameters.query
parameters = request.openapi.parameters.query # type: ignore[attr-defined]
start = parameters.get('start')
end = parameters.get('end')
return jsonify(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Resources:
Handler: check_processing_time.lambda_handler
MemorySize: 128
Role: !GetAtt Role.Arn
Runtime: python3.9
Runtime: python3.13
Timeout: 30
{% if security_environment == 'EDC' %}
VpcConfig:
Expand Down
7 changes: 2 additions & 5 deletions apps/check-processing-time/src/check_processing_time.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
from typing import Union


def get_time_from_result(result: Union[list, dict]) -> Union[list, float]:
def get_time_from_result(result: list | dict) -> list | float:
if isinstance(result, list):
return [get_time_from_result(item) for item in result]

return (result['StoppedAt'] - result['StartedAt']) / 1000


def lambda_handler(event, _) -> list[Union[list, float]]:
def lambda_handler(event, _) -> 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)
2 changes: 1 addition & 1 deletion apps/disable-private-dns/disable-private-dns-cf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Resources:
Handler: disable_private_dns.lambda_handler
MemorySize: 128
Role: !GetAtt Role.Arn
Runtime: python3.9
Runtime: python3.13
Timeout: 5
Environment:
Variables:
Expand Down
2 changes: 1 addition & 1 deletion apps/get-files/get-files-cf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Resources:
Handler: get_files.lambda_handler
MemorySize: 128
Role: !GetAtt Role.Arn
Runtime: python3.9
Runtime: python3.13
Timeout: 30
{% if security_environment == 'EDC' %}
VpcConfig:
Expand Down
Loading
Loading