HARMONY-1499: Added ability to use conditional step in services.yml based on native file format info in umm-c. #438
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira Issue ID
HARMONY-1499
Description
Added ability to use conditional step in services.yml based on native file format info in umm-c. Here is the proposed conditional step that is requested by @owenlittlejohns :
The
umm_c
conditional withnative_format
compares with the value of the collection UMM-C field:ArchiveAndDistributionInformationType.FileArchiveInformation.Format
when the siblingFormatType = 'Native'
.Since the NetCDF to COG service is still in development, we can't test the desired configuration in Harmony. But tests have been run with stubbed setup to prove that once the new service is available, the setup will work.
Local Test Steps
Run Harmony locally and verify a regular harmony request works.
Manually set up a service chain with the new conditional umm_c native_format step (see description for an example) in services.yml.
For example, I set up this configuration with a conditional bad step for harmony/service-example service:
Verify the conditional step is not scheduled when the collection's native-format is not
netcdf-4
, the request has two workflow steps and the request runs successfully.Verify the conditional step is scheduled when the collection's native-format is
netcdf-4
, the request has three workflow steps and the request fails on the bad netcdf to zarr step. (I replaced line 16 in cmr-umm-collection-reader.ts withreq.operation.ummcollections = await getUmmCollectionsByIds(['C1239324659-POCUMULUS'], req.accessToken);
to fake the collection native_format to netcdf-4 for the test.)You don't have to follow exactly what I did to create the fake condition to test this PR. You could add the umm_c native_format conditional step to a real service chain and with real collection if you want.
PR Acceptance Checklist