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

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

Merged
merged 5 commits into from
Oct 17, 2024

Conversation

nikki-t
Copy link
Collaborator

@nikki-t nikki-t commented Oct 14, 2024

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

  • Modified _query_granule_files to query SIT or UAT and return files associated with the SWOT-UAT environment. This is consistent with the query_cmr method.

Overview of verification done

  • Modified existing tests to accomodate query updates.
  • Existing unit tests pass.

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:

  • Linted
  • Updated unit tests
  • Updated changelog
  • Integration testing

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

@nikki-t nikki-t self-assigned this Oct 14, 2024
@nikki-t nikki-t requested a review from torimcd October 16, 2024 12:32
@nikki-t nikki-t marked this pull request as ready for review October 16, 2024 12:32
Copy link
Collaborator

@torimcd torimcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@torimcd torimcd merged commit baa3b09 into feature/issue-235 Oct 17, 2024
5 checks passed
@torimcd torimcd deleted the feature/issue-248 branch October 17, 2024 18:15
torimcd pushed a commit that referenced this pull request Oct 17, 2024
… that aren't loaded into Hydrocron (#245)

* Raise an error if collection shortname does not match Hydrocron table names

* Raise an error unsupported lake data in load granule operations

* Remove trailing whitespace

* Fix code formatting

* Update CHANGELOG with issue

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

* Query to return granule files should query UAT when running in SIT or UAT environments

* SIT execution should return UAT files for load granule operations

* Set venue environment variable before running test of query_cmr

* Add issue to CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants