Change OpenStorageSchedule API parameter type to string #2454
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.
What this PR does / why we need it:
This PR is to resolve a compilation issue on release branch where it doesn't support enum type path parameter in protobuf REST API.
This fix is to cast
Job.Type
enum type to string type in request data structures.Issue:
After I cherry pick PR #2426 onto
release-9.8
, it failed to build. It complains the following error, which meansprotoc-gen-grpc-gateway
of this version doesn't support a enum type in path parameter.Cause analysis
libopenstorage/openstorage
is built inside a container. But the images used for master branch and release branch are different. Master branch usesquay.io/openstorage/osd-proto:lastest
while release branch usesquay.io/openstorage/osd-proto:pro-gomodules
The version of
protoc-gen-grpc-gateway
isv1.16.0
on master branch while it'sv1.4.1
on release branchOn master branch, it’s able to generate the following code to parse the enum type:
On release branch, the code generated could not handle the parsing
Testing Notes
Add testing output or passing unit test output here.
Special notes for your reviewer:
Add any notes for the reviewer here.