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.
Update driver to support compute staging #1586
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
Update driver to support compute staging #1586
Changes from 8 commits
f5071fa
4d931b6
6aae7d2
ce810c4
db3f3d9
097e5b9
46ad7e7
13f981e
81485ea
afe6c38
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The validation of computeEndpoint could be done at the initialization layer. You could do something very similar to your enumFlag() call, where you validate the computeEndpoint string set a computeURL value (pointer) with either the value, or nil if no computeURL is provided.
This allows you to avoid needing to check for
err
here, and your function on the construction of the URL and path.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.
Rather than JoinPath, I think we should ignore the path and just construct it ourselves. This will make the logic backwards compatible for anything that a calling process that runs the driver with
--compute-endpoint
string that includes a path.You may need to update your
getPath()
function to include a leading/
character when constructing the path.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 would call this constructComputeEndpointPath, rather than getPath. The name
getPath
is genericvery generic, andget
implies we're either fetching a field from an object, or we're retrieving specific data from a higher level resource.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.
So we drop the invalid endpoint case?
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.
Yes, IMO this should be treated as input validation for the program rather than the RPC layer. Passing an invalid endpoint should crash the program, rather than cause a delayed RPC error.