podaac / hydrocron

API for retreiving time series of SWOT data
https://podaac.github.io/hydrocron/
Apache License 2.0
17 stars 4 forks source link

Feature/issue 248 - Track ingest operations need to query UAT for granule files #249

Closed nikki-t closed 1 month ago

nikki-t commented 1 month ago

Github Issue: #248

Description

SIT testing #238 revealed a bug where the first query for granules in CMR was set to search in SIT and UAT by parent collection with a bearer token but the second query for granule files was not set up in the same way producing inconsistent results and sometimes not returning associated granule files. For track ingest operations running in SIT or UAT, all CMR queries need to query either SIT or UAT collections but should return file info for the UAT environment.

Overview of work done

Overview of verification done

Overview of integration done

Deployed feature branch to SIT and ran tests on reaches, nodes, and prior lakes.

Prior Lake Test Event

{
  "collection_shortname": "SWOT_L2_HR_LakeSP_prior_2.0",
  "hydrocron_table": "hydrocron-swot-prior-lake-table",
  "hydrocron_track_table": "hydrocron-swot-prior-lake-track-ingest-table",
  "temporal": "",
  "query_start": "2024-08-25T02:00:00",
  "query_end": "2024-08-25T05:00:00"
}

Track Ingest Logs

2024-10-14T14:43:41.243Z [INFO] 2024-10-14T14:43:41.243Z Querying CMR temporal range: 2024-08-25 02:00:00+00:00 to 2024-08-25 05:00:00+00:00. 
2024-10-14T14:43:44.046Z [INFO] 2024-10-14T14:43:44.046Z Located 5 granules in CMR. 
2024-10-14T14:43:44.229Z [INFO] 2024-10-14T14:43:44.229Z Located 4 granules NOT in Hydrocron. 
2024-10-14T14:43:44.251Z [INFO] 2024-10-14T14:43:44.251Z Located 4 granules with 'to_ingest' status. 
2024-10-14T14:43:44.345Z [INFO] 2024-10-14T14:43:44.344Z Located 4 granules that require ingestion. 
2024-10-14T14:43:44.345Z [INFO] 2024-10-14T14:43:44.345Z Located 0 granules that are already ingested.
...
2024-10-14T14:43:49.908Z [INFO] 2024-10-14T14:43:49.908Z Item granuleUR: SWOT_L2_HR_LakeSP_Prior_020_125_AR_20240825T025326_20240825T025648_PIC0_01.zip
2024-10-14T14:43:49.924Z [INFO] 2024-10-14T14:43:49.924Z Item granuleUR: SWOT_L2_HR_LakeSP_Prior_020_126_EU_20240825T030650_20240825T031611_PIC0_01.zip
2024-10-14T14:43:49.930Z [INFO] 2024-10-14T14:43:49.930Z Item granuleUR: SWOT_L2_HR_LakeSP_Prior_020_126_AF_20240825T031610_20240825T032511_PIC0_01.zip
2024-10-14T14:43:49.948Z [INFO] 2024-10-14T14:43:49.948Z Item granuleUR: SWOT_L2_HR_LakeSP_Prior_020_127_AR_20240825T043700_20240825T044002_PIC0_01.zip 

CNM Logs

2024-10-14T14:43:55.933Z [INFO] 2024-10-14T14:43:55.932Z Begin processing message {'identifier': 'SWOT_L2_HR_LakeSP_Prior_020_126_EU_20240825T030650_20240825T031611_PIC0_01', 'collection': 'SWOT_L2_HR_LakeSP_2.0', 'provider': 'JPL-SWOT', 'version': '1.6.0', 'submissionTime': '2024-09-19T03:30:34.731Z', 'trace': 'reproc-hydrocron-track-ingest', 'product': {'dataVersion': '2.0', 'dataProcessingType': 'reprocessing', 'files': [{'type': 'data', 'name': 'SWOT_L2_HR_LakeSP_Prior_020_126_EU_20240825T030650_20240825T031611_PIC0_01.zip', 'checksumType': 'md5', 'checksum': 'e31692ed41a407435d20c100e05c4b83', 'size': 27, 'uri': 's3://podaac-swot-uat-cumulus-protected/SWOT_L2_HR_LakeSP_2.0/SWOT_L2_HR_LakeSP_Prior_020_126_EU_20240825T030650_20240825T031611_PIC0_01.zip'}]}}

Load Granule Logs

2024-10-14T14:44:20.648Z [INFO] 2024-10-14T14:44:20.648Z Item 2160004403 size: 4696
2024-10-14T14:44:20.648Z [INFO] 2024-10-14T14:44:20.648Z Item 2160004383 size: 4696
2024-10-14T14:44:20.648Z [INFO] 2024-10-14T14:44:20.648Z Item 2310000143 size: 4696
2024-10-14T14:44:20.700Z [INFO] 2024-10-14T14:44:20.700Z Loaded data into table hydrocron-swot-prior-lake-table. 

Confirmed track ingest tables were updated as expected.

PR checklist:

See Pull Request Review Checklist for pointers on reviewing this pull request