From 4c901b3898f9be0d0cad7499ce57c775c160f671 Mon Sep 17 00:00:00 2001 From: cmspeed Date: Mon, 13 Apr 2026 17:56:53 -0700 Subject: [PATCH 1/4] Update ARIA_AUTORIFT job spec for Element84 L2A --- job_spec/ARIA_AUTORIFT.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/job_spec/ARIA_AUTORIFT.yml b/job_spec/ARIA_AUTORIFT.yml index ddbf7667b..221627884 100644 --- a/job_spec/ARIA_AUTORIFT.yml +++ b/job_spec/ARIA_AUTORIFT.yml @@ -36,6 +36,12 @@ AUTORIFT: minLength: 60 maxLength: 60 example: S2A_MSIL1C_20200627T150921_N0209_R025_T22WEB_20200627T170912 + - description: The name of the Sentinel-2 L2A STAC granule to process (Element84 naming convention) + type: string + pattern: "^S2[ABCD]_T[A-Z0-9]{5}_[0-9]{8}T[0-9]{6}_L2A$" + minLength: 30 + maxLength: 30 + example: S2A_T52JFR_20260226T012311_L2A - description: The name of the Landsat 4, 5, 7, 8 or 9 Collection 2 granule to process type: string pattern: "^L([CO]0[89]|E07|T0[45])_L1" @@ -77,6 +83,12 @@ AUTORIFT: minLength: 60 maxLength: 60 example: S2A_MSIL1C_20200627T150921_N0209_R025_T22WEB_20200627T170912 + - description: The name of the Sentinel-2 L2A STAC granule to process (Element84 naming convention) + type: string + pattern: "^S2[ABCD]_T[A-Z0-9]{5}_[0-9]{8}T[0-9]{6}_L2A$" + minLength: 30 + maxLength: 30 + example: S2A_T52JFR_20260226T012311_L2A - description: The name of the Landsat 4, 5, 7, 8 or 9 Collection 2 granule to process type: string pattern: "^L([CO]0[89]|E07|T0[45])_L1" @@ -113,6 +125,12 @@ AUTORIFT: minLength: 60 maxLength: 60 example: S2A_MSIL1C_20200627T150921_N0209_R025_T22WEB_20200627T170912 + - description: The name of the Sentinel-2 L2A STAC granule to process (Element84 naming convention) + type: string + pattern: "^S2[ABCD]_T[A-Z0-9]{5}_[0-9]{8}T[0-9]{6}_L2A$" + minLength: 30 + maxLength: 30 + example: S2A_T52JFR_20260226T012311_L2A - description: The name of the Landsat 4, 5, 7, 8 or 9 Collection 2 granule to process type: string pattern: "^L([CO]0[89]|E07|T0[45])_L1" From 080fc440c1dca544175306d62ff5148dbe056ebb Mon Sep 17 00:00:00 2001 From: cmspeed Date: Mon, 13 Apr 2026 18:04:51 -0700 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2dbca2ff..57cc6ec34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ 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). +## [10.16.5] + +### Added +- Added support for Element84 Sentinel-2 L2A STAC IDs to the `ARIA_AUTORIFT` job spec. + ## [10.16.4] ### Added From 02f24389860a575d5d6256e1a3eb96ea2f460f71 Mon Sep 17 00:00:00 2001 From: Andrew Johnston Date: Tue, 19 May 2026 12:14:20 -0800 Subject: [PATCH 3/4] do not include cost offests from EC2 Savings Plans when computing month-to-date spending --- CHANGELOG.md | 5 +++++ apps/scale-cluster/src/scale_cluster.py | 10 ++++++---- tests/test_scale_cluster.py | 8 ++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2dbca2ff..0a4a14be5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ 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). +## [10.16.5] + +### Changed +- Do not include cost offsets from EC2 Savings Plans when computing month-to-date spending in scale-cluster lambda + ## [10.16.4] ### Added diff --git a/apps/scale-cluster/src/scale_cluster.py b/apps/scale-cluster/src/scale_cluster.py index bfb41e28b..36cbe2031 100644 --- a/apps/scale-cluster/src/scale_cluster.py +++ b/apps/scale-cluster/src/scale_cluster.py @@ -17,10 +17,12 @@ def get_time_period(today: date) -> dict: def get_month_to_date_spending(today: date) -> float: - time_period = get_time_period(today) - granularity = 'MONTHLY' - metrics = ['UnblendedCost'] - response = COST_EXPLORER.get_cost_and_usage(TimePeriod=time_period, Granularity=granularity, Metrics=metrics) + response = COST_EXPLORER.get_cost_and_usage( + TimePeriod=get_time_period(today), + Granularity='MONTHLY', + Metrics=['UnblendedCost'], + Filter={'Not': {'Dimensions': {'Key': 'RECORD_TYPE', 'Values': ['SavingsPlanNegotiation']}}}, + ) return float(response['ResultsByTime'][0]['Total']['UnblendedCost']['Amount']) diff --git a/tests/test_scale_cluster.py b/tests/test_scale_cluster.py index fd91f5a3d..cc6d6628b 100644 --- a/tests/test_scale_cluster.py +++ b/tests/test_scale_cluster.py @@ -160,6 +160,14 @@ def test_get_month_to_date_spending(cost_explorer_stubber): 'Start': '2022-07-01', 'End': '2022-08-01', }, + 'Filter': { + 'Not': { + 'Dimensions': { + 'Key': 'RECORD_TYPE', + 'Values': ['SavingsPlanNegotiation'], + }, + }, + }, } mock_service_response = { 'ResultsByTime': [ From 5e944a529904af8d03e619ec43fe33737b78b421 Mon Sep 17 00:00:00 2001 From: Andrew Johnston Date: Tue, 19 May 2026 13:12:24 -0800 Subject: [PATCH 4/4] use correct record type value --- apps/scale-cluster/src/scale_cluster.py | 2 +- tests/test_scale_cluster.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/scale-cluster/src/scale_cluster.py b/apps/scale-cluster/src/scale_cluster.py index 36cbe2031..18007853b 100644 --- a/apps/scale-cluster/src/scale_cluster.py +++ b/apps/scale-cluster/src/scale_cluster.py @@ -21,7 +21,7 @@ def get_month_to_date_spending(today: date) -> float: TimePeriod=get_time_period(today), Granularity='MONTHLY', Metrics=['UnblendedCost'], - Filter={'Not': {'Dimensions': {'Key': 'RECORD_TYPE', 'Values': ['SavingsPlanNegotiation']}}}, + Filter={'Not': {'Dimensions': {'Key': 'RECORD_TYPE', 'Values': ['SavingsPlanNegation']}}}, ) return float(response['ResultsByTime'][0]['Total']['UnblendedCost']['Amount']) diff --git a/tests/test_scale_cluster.py b/tests/test_scale_cluster.py index cc6d6628b..65d6da626 100644 --- a/tests/test_scale_cluster.py +++ b/tests/test_scale_cluster.py @@ -164,7 +164,7 @@ def test_get_month_to_date_spending(cost_explorer_stubber): 'Not': { 'Dimensions': { 'Key': 'RECORD_TYPE', - 'Values': ['SavingsPlanNegotiation'], + 'Values': ['SavingsPlanNegation'], }, }, },