-
Notifications
You must be signed in to change notification settings - Fork 320
[Storage] delete/set_immutability_policy for BlobClient
#3342
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
Draft
vincenttran-msft
wants to merge
4
commits into
Azure:main
Choose a base branch
from
vincenttran-msft:vincenttran/set_immut_policy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8113772
Fully fleshed out, but will need to iterate after other 2x PRs go thr…
vincenttran-msft b62b814
Strip nanoseconds
vincenttran-msft e00eafd
Fully fleshed, pending other PRs to get playback-only decorator, and …
vincenttran-msft c8552fb
PR feedback rename to expiry
vincenttran-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
30 changes: 15 additions & 15 deletions
30
sdk/storage/azure_storage_blob/src/generated/models/enums_impl.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| directory: specification/storage/Microsoft.BlobStorage | ||
| commit: 6b5a0fdadca03abe0b8e91a68a62cd1e639ed55e | ||
| commit: 64da9cf708dfbae0ff9ca2cde6829b123d9966bb | ||
| repo: Azure/azure-rest-api-specs | ||
| additionalDirectories: |
Oops, something went wrong.
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.
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.
Testing against a regular Storage account yields:
Testing against versioned without immutable storage on:
So, as a result, had to use a versioned account + immutable storage with versioning enabled.
As a result, having the same issues with deleting the container as
set_legal_hold: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.
Mark as playback only for now, I guess. Open an issue to track getting proper clean up on this and the legal hold tests so we can enable them to run Live.
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.
#3358
Done, will mark playback only once we get
set_legal_holdmerged since I unfortunately did not base it off of that PR.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.
Why can't you update your
test-resources.bicepfile? That's the whole reason it's there and you should be using it, just like in all other languages (I wrote those original scripts for every Azure SDK language). I'd rather we don't have a confusing concept of "playback-only" tests. That implies you have to record them at some point which means modifying source which means people have to manually interject at least a couple times. Just use a#[tokio::test]with aMockHttpClientfrom ourazure_core_testcrate instead. I do that in lots of places. Pretty easy to use.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.
@heaths, we need to mark these tests as playback only because containers with immutability policies (and legal holds) are very difficult to clean up. They require the management plane to do so which we don't have yet in Rust. We will try and figure out a way to delete them and change them to regular recorded tests later. There is nothing that can be changed in the bicep to accomplish this.
We have the concept of playback only in every other language and we use it sparingly for situations like this. It would be nice to have that concept available in Rust. Mocking would require extra effort and means these tests will work and look different than the rest of our tests.