-
Notifications
You must be signed in to change notification settings - Fork 50
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
HARMONY-1958: Allow service chains to skip validating variables exist in the CMR #684
Conversation
…ariable metadata from the CMR.
… are explicitly specified in services.yml.
…yml configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested successfully locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally
* in most cases the sequence of minimum longitude, minimum latitude, | ||
* maximum longitude and maximum latitude. | ||
*/ | ||
function parseBbox(value: string | string[] | number[]): number[] | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I don't think this function ever returns null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went to change it, but if the value is null/undefined/empty it will not return a value, which I think means it returns null. It's the same signature as a similar function used elsewhere for parsing an EDR bbox.
Jira Issue ID
HARMONY-1958
Description
Allows service chains to skip validating variables exist in the CMR. This was requested by the Giovanni team to support their future time and area averaging services.
Local Test Steps
Since no service chains are currently configured to skip validation you will need to manually modify one of the service chains.
First test without changing services.yml to make sure you get a validation error with something like:
http://localhost:3000/C1233800302-EEDTEST/ogc-api-coverages/1.0.0/collections/bad_var/coverage/rangeset?subset=lat(20%3A60)&subset=lon(-140%3A-50)&granuleId=G1233800343-EEDTEST&outputCrs=EPSG%3A31975&format=image%2Fpng&subset=time(%222002-09-15T00%3A00%3A00.000Z%22%3A%222022-09-25T00%3A00%3A00Z%22)
Then modify the harmony-service-example chain for UAT and add
validate_variables: false
to the service chain definition. Repeat the request. This time the request should be accepted and you should see it in the workflow-ui. It will fail because the service will not be able to findbad_var
, but does confirm that the validation is being skipped.PR Acceptance Checklist