-
Notifications
You must be signed in to change notification settings - Fork 21
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
[AERIE-1691] Return default arguments alongside effective argument failures #50
[AERIE-1691] Return default arguments alongside effective argument failures #50
Conversation
68db1b3
to
0c612ca
Compare
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 this locally and implemented a change on top of it in the UI. LGTM!
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.
Looks good to me overall. One minor issue to fix, and one comment to address, but nothing showstopping, so approved!
...essor/src/main/java/gov/nasa/jpl/aerie/merlin/processor/generator/MissionModelGenerator.java
Outdated
Show resolved
Hide resolved
merlin-server/src/main/java/gov/nasa/jpl/aerie/merlin/server/http/MerlinBindings.java
Show resolved
Hide resolved
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.
Looks good to me! I was a bit skeptical of the exception with a builder pattern, but then I looked at the generated code, and it looked quite elegant. Good job.
0c612ca
to
0592816
Compare
0592816
to
8bf23d8
Compare
Good point, and I think it should get some skepticism. I'm not too fond of using an exception as a required part of our UI <-> mission model workflow. The only alternative I could think of was to split I guess the argument for the pattern this PR uses is that we're not developing the mission model interface with UI concerns as the 1st priority, and that'll sometimes result in the UI relying on an exception to get ancillary data (such as returning default arguments when required args. are missing). |
Description
Adds default arguments alongside the
getModelEffectiveArguments
/getActivityEffectiveArguments
failure response. This will allow the UI to implement default values within forms with thegetModelEffectiveArguments
/getActivityEffectiveArguments
workflow.See AERIE-1691 for more context.
Verification
Expand
Success Responses
With
examples/banananation
's all optional arguments:→
Failure Responses
With
BakeBananaBread
, where only thetemperature
parameter has a default value:→
With
examples/config-without-defaults
's all required arguments:→
Documentation
Updated Aerie GQL API documentation: https://github.com/NASA-AMMOS/aerie/wiki/Aerie-GraphQL-API-Software-Interface-Specification#query-for-activity-effective-arguments
Future work
None.