-
Notifications
You must be signed in to change notification settings - Fork 10k
Sarah's updates to radek/pss-read-write #37642
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
Sarah's updates to radek/pss-read-write #37642
Conversation
… Add test case about handling grpc errors from CloseSend.
… data alongside the warning and have a normal closing of the stream after EOF
if err == io.EOF { | ||
// End of stream, we're done | ||
if chunk != nil { | ||
// TODO: The EOF error could be just returned alongside the last chunk? | ||
resp.Diagnostics = resp.Diagnostics.Append(convert.ProtoToDiagnostics(chunk.Diagnostics)) | ||
} | ||
// No chunk is returned alongside an EOF. | ||
// And as EOF is a sentinel error it isn't wrapped as a diagnostic. | ||
break | ||
} |
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.
Please see this comment in our terraform-plugin-go PR explaining why we will never see a chunk alongside the EOF error here: https://github.com/hashicorp/terraform-plugin-go/pull/563/files#r2362735975
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.
Thank you for all the work and the tests! 👍🏻
* Update code to not expect a chunk when EOF encountered * Return early if any grpc errors are encountered during ReadStateBytes * Close the stream with CloseSend once everything's read without error. Add test case about handling grpc errors from CloseSend. * Fix test case about warnings: We would expect to receive a chunk with data alongside the warning and have a normal closing of the stream after EOF * Add log line, remove unneeded type info
* Update code to not expect a chunk when EOF encountered * Return early if any grpc errors are encountered during ReadStateBytes * Close the stream with CloseSend once everything's read without error. Add test case about handling grpc errors from CloseSend. * Fix test case about warnings: We would expect to receive a chunk with data alongside the warning and have a normal closing of the stream after EOF * Add log line, remove unneeded type info
This PR moves some fixes to the radek/pss-read-write branch out of #37323
I tested the process of initialising a working directory end to end using the
pss
provider and our changes to the terraform-plugin-go repo, and in the process made these changes to the Core-side ofReadStateBytes
.The main changes in this PR are:
Target Release
N/A
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry