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

Fix getblocks long #19078

Merged
merged 12 commits into from
Mar 1, 2021
Merged

Conversation

jaschrep-msft
Copy link
Member

Incorporates Azure/azure-rest-api-specs#13188.

All properties in BlobBlock moved to handwritten class due to compile errors regarding properties across partial structs. Facade property maintained for backwards compatibility.

Regenerated with new swagger to present block size on a GetBlocks call
as long instead of int, while preserving backwards compatibility.
Currently build error CS0282 due to a mix of generated and handwritten
properties.
Moved all BlobBlock properties into handwritten partial file to avoid
compile error CS0282.
@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Feb 26, 2021
@jaschrep-msft
Copy link
Member Author

Need to pull this change in an environment that can handle a put block this big to verify.

Comment on lines 1516 to 1518
[Test]
[Explicit]
[Ignore("https://github.com/Azure/azure-sdk-for-net/issues/12312")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this test LiveOnly. We've invested quite a bit in fine tuning of live test runtime that this shouldn't be problem anymore (and if it is we'll keep fine tuning rather than disabling coverage).

@@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
input-file:
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/011761be1285d14feb41796b5d97df1126495c5c/specification/storage/data-plane/Microsoft.BlobStorage/preview/2020-06-12/blob.json
- https://github.com/Azure/azure-rest-api-specs/blob/8c1f9b739165035d9ced32761cebb19125bce233/specification/storage/data-plane/Microsoft.BlobStorage/preview/2020-06-12/blob.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it not matter if it's the link to the raw format?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I managed to generate off it, though I'll change back just in case.

@jaschrep-msft
Copy link
Member Author

/azp run net - storage - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@seanmcc-msft seanmcc-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

/// supported values.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public int Size => checked((int)SizeLong);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does checked do? Ensure we didn’t wrap around?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Without this, the extra bits are just discarded. Here, we actually throw the OverflowException.

@seanmcc-msft
Copy link
Member

seanmcc-msft commented Mar 1, 2021

Build Analyze CI step is failing. To fix, re-generate. I think this might be being caused by the url you are using in Blob autorest.md.

It’s also possible we need to re-generate for one or more of the other Storage packages.

@check-enforcer
Copy link

check-enforcer bot commented Mar 1, 2021

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them. In order to bootstrap pipelines for a new service, please perform following steps:

For data-plane/track 2 SDKs Issue the following command as a pull request comment:

/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run net - [service] - ci

For track 1 management-plane SDKs

Please open a separate PR and to your service SDK path in this file. Once that PR has been merged, you can re-run the pipeline to trigger the verification.

@jaschrep-msft
Copy link
Member Author

/azp run net - storage - ci

@azure-pipelines
Copy link

Pull request contains merge conflicts.

@jaschrep-msft jaschrep-msft merged commit 4128795 into Azure:master Mar 1, 2021
@jaschrep-msft jaschrep-msft deleted the fix-getblocks-long branch August 3, 2022 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants