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.
Summary:
This pull request addresses the discrepancy in the type definition for the resources field in the microservice model. The current implementation uses an array type, which causes issues during deployment. The correct type should be a plain JSON object.
Details:
The ent CLI does not perform any validation on the microservice model during
pack
execution, leading to potential errors during deployment.Examples:
Example 1:
Example 2:
Both examples work during the pack phase. However, if the deployed bundle is installed with the microservice defined as in Example 1, the error "plugin/testms.yaml invalid [...]" appears when clicking the install button in AppBuilder. On the other hand, the deployed bundle with the microservice defined as in Example 2 will also fail:
The "cm" pod logs a null pointer exception due to the missing "storage" parameter in the "resources" object. Could this parameter be made optional? Some containers do not require storage.
NPE detail
Changes: