-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Storage] Support create storage context with OAuth #5960
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
Conversation
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.
@blueww it looks like this line is causing build errors -- would you mind taking a look?
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.
@blueww please remove all instances of app.config that were added in this PR and not used
|
@cormacpayne Besides that, there's only 1 commit in the PR is from me: "[Storage] Support Oauth in Storage Context " |
|
@blueww Can you make a separate PR to update the branch? |
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.
As discussed, we should not make this change, instead we should add this into the ExtendedProperties for AzureEnvironemnt, as we did for DataLake OAuth support
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.
fixed
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.
Again, this should not be here
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.
fixed.
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.
You will need to make the identical change in Commands.Storage.Netcore.csproj in this directory
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.
It seems "Commands.Management.Storage.Netcore.csproj" don't reference the changed dll (XSCL) currently. Should I add it?
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.
I am not sure you cna remove these
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.
I don't see any negative impact by removing it.
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.
You will need to add these dependencies to Commands.Storage.Netcore, in the same directory
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.
"Commands.Storage.Netcore.csproj" only has DMlib and XSCL as reference, I will change these 2.
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.
does this belong on the cmdlet? seems like you should have this in the StorageContext, or use a closure to capture the value
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.
removed, use a closure.
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.
I don't think this method needs to be async. Also, the 'accessToken' variable in this should not come from the cmdlet - it should probably be stored in the context, or be a closure (for example, you could have a method on this cmdlet that returned a renewer).
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.
The XSCL define the renew function is async as below, so we must use async.
public TokenCredential(string initialToken, RenewTokenFuncAsync periodicTokenRenewer, object state, TimeSpan renewFrequency);
I will change the access token as closure.
|
Besides that, could we see the static analysis failure in the PR build check log? It's very inconvenience to find the static analysis failure. |
d19b765 to
3b1cb3a
Compare
|
@blueww The current issue is a nuget restore issue, noit a static analysis issue. It looks liek the new storage management package is actually invalid, It shows two files that resolve to the same name:
How did you create this package? If you used a very old version of Nuget, you may need to upgrade. |
1d1deae to
2a6c4b2
Compare
dfa41d9 to
6788195
Compare
|
@blueww the travis build is broken : https://travis-ci.org/Azure/azure-powershell/builds/376683272#L1537 |
|
@praries880 I have get the latest nuget for XSCL, and updated the PR. |
|
Now the travis build fail since following error. It seems not caused by my code change but some environment issue. Please help to look at it. I have re-start the test, and it seems pass now.
|
|
@praries880 |
This commit moves PR Azure#5960 from the branch Azure.Storage.Oauth to Azure.Storage.Location which is the branch we will be releasing all the preview releases off of.
|
I have reviewed #6210. Looks good to me. |
[Storage] Support OAuth (moves PR #5960) to AzureRM.Storage.Location
Description
Support create Storage Context with OAuth.
The PR pending change:
The design is in: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/37
Checklist
CONTRIBUTING.mdplatyPSmodule