fix(deployment): account for "null" response in parameter_openapi_schema #401
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
In OSS, the return value for parameter_openapi_schema is "null" instead of an empty map {}.
This leads to an inconsistent value error because the default value is the empty map "{}", but the response from the API tries to set "null".
Closes #399
Closes https://linear.app/prefect/issue/PLA-1204/resoure-prefect-deployment-error-provider-produced-inconsistent-result
Testing
We need to test against both Cloud and OSS to ensure this logic supports both cases.
For Cloud:
You should be able to successfully apply the plan.
Next, test in OSS by modifying the compose file to match the reported version of Prefect:
Then update your Terraform config to point to a local instance:
You should again be able to successfully apply the plan.
Requirements
General
Closes <issue>
, if availableDraft
status is used until ready for reviewCode-level changes
New or updated resource/datasource
make docs
from source code)- When applicable, provide a link back to the relevant page in the Prefect documentation site.
- Resource example under
examples/resources/prefect_<name>/resource.tf
- Import example under
examples/resources/prefect_<name>/import.sh
- Datasource example under
examples/data-sources,resources>/prefect_<name>/data-source.tf