fix: return ContractVerificationResult on upload failure in verify_co…#2736
Open
reachsridhard wants to merge 2 commits into
Open
fix: return ContractVerificationResult on upload failure in verify_co…#2736reachsridhard wants to merge 2 commits into
reachsridhard wants to merge 2 commits into
Conversation
…ntract_on_runner; add unit test
for more information, see https://pre-commit.ci
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description
[]on upload failure, while the function is annotated (and expected) to return aContractVerificationResult. This could cause runtime errors or subtle type bugs for callers handling the result.Problem being solved
fileIdin response), verify_contract_on_runner() returned[]instead of aContractVerificationResult.Expected impact on downstream packages/services
Changes
In soda-core/src/soda_core/common/soda_cloud.py:
fileIdafter uploading the contract YAML, setverification_result.sending_results_to_soda_cloud_failed = Trueand returnverification_resultinstead of[].Tests:
fileId(upload failure).ContractVerificationResultis returned andsending_results_to_soda_cloud_failedisTrue.How I verified
Affected areas
Backward compatibility and risks
[]was a bug.Files changed
Checklist
Release notes
ContractVerificationResult(withsending_results_to_soda_cloud_failed=True) when the contract upload fails, instead of returning[].