Skip to content
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

Resetting position of RetriableStream not working #18115

Closed
abhaldar opened this issue Jan 21, 2021 · 3 comments
Closed

Resetting position of RetriableStream not working #18115

abhaldar opened this issue Jan 21, 2021 · 3 comments
Assignees
Labels
App Configuration Azure.ApplicationModel.Configuration Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@abhaldar
Copy link

abhaldar commented Jan 21, 2021

Throwing out error
System.NotSupportedException: Specified method is not supported. at Azure.Core.Pipeline.RetriableStream.RetriableStreamImpl.set_Position(Int64 value)
While trying to discardBuffer and reset stream position back to 0.

How can we achieve the same here without creating a copy in memory stream?

Code snippet:

using (var reader = new StreamReader(stream))
.....
......
try { .... }
catch (JsonSerializationException serializationException)
{
      reader.DiscardBufferedData();
      reader.BaseStream.Position = 0;
}
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 21, 2021
@jsquire jsquire added App Configuration Azure.ApplicationModel.Configuration Azure.Core Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Jan 21, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 21, 2021
@jsquire
Copy link
Member

jsquire commented Jan 21, 2021

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@pakrym
Copy link
Contributor

pakrym commented Jan 22, 2021

What method do you use to get the stream?

@pakrym
Copy link
Contributor

pakrym commented May 13, 2021

Closing, please reopen if you still have the issue.

@pakrym pakrym closed this as completed May 13, 2021
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-net that referenced this issue Mar 22, 2022
Review request for Microsoft.ContainerService to add version 2022-02-01 (Azure#18324)

* Adds base for updating Microsoft.ContainerService from version stable/2022-01-01 to version 2022-02-01

* Updates readme

* Updates API version in new specs and examples

* Update readmes for the 2022-02-01 dev branch of container service (Azure#17887)

* update readme

* remove useless -only tags

* Fix violated rule R2026 for 2022-02-01 managedCluster swagger (Azure#18024)

* fix allof

* add missing type

* GA alias minor version (Azure#18038)

* GA alias minor version

* polish more details on kubernetesVersion and currentKubernetesVersion

* Update specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2022-02-01/managedClusters.json

minor revision

Co-authored-by: Matthew Christopher <matthchr@microsoft.com>

Co-authored-by: Matthew Christopher <matthchr@microsoft.com>

* add missing type object (Azure#18115)

* Revert "GA alias minor version (Azure#18038)" (Azure#18291)

This reverts commit 3a99cda3cb48e05c74923f5467c0737014322b0f.

* Align modifications of several common definitions with 2022-02-02-preview for container service 2022-02-01 (Azure#18216)

* sync modification

* fix ref

Co-authored-by: Jianping Zeng <zjpjack@users.noreply.github.com>
Co-authored-by: Matthew Christopher <matthchr@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
App Configuration Azure.ApplicationModel.Configuration Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants