podaac / cumulus-metadata-aggregator

1 stars 1 forks source link

PODAAC-5614: strip leading zeros from cycle and pass in validity check #59

Closed skorper closed 1 year ago

skorper commented 1 year ago

A while back a bugfix was implemented to address the leading zero issue with cycle/pass that resulted in the value being converted to octal. That fix has been working well, but we found one spot where this change is missing and causes issues for any granule where the cycle or pass contains invalid octal characters (8 or 9). In those cases, the validity check (see diff) raises an exception, so the cycle/pass extraction processing does not occur.

In this PR, I've added the UMMUtils.removeStrLeadingZeros call around the cycle and pass in the validity check as well. Also added a unit test.

Note; this has not yet been tested in a full Cumulus end-to-end test.