-
Notifications
You must be signed in to change notification settings - Fork 4k
Updating getobjectsbyobjectId call for objectIds > 1000 #4002
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
for(int i=0; i<objectIds.Count; i+=1000) | ||
{ | ||
if((i+1000) > objectIds.Count){ | ||
adObjects = GraphClient.Objects.GetObjectsByObjectIds(new GetObjectsParameters { ObjectIds = objectIds.GetRange(i, objectIds.Count - i), IncludeDirectoryObjectReferences = true }); |
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.
objectIds.Count - i [](start = 135, length = 19)
compute the end index in "if-else" block then merge two graph calls into one line #Resolved
var adObjects = GraphClient.Objects.GetObjectsByObjectIds(new GetObjectsParameters { ObjectIds = objectIds, IncludeDirectoryObjectReferences = true }); | ||
result.AddRange(adObjects.Select(o => o.ToPSADObject())); | ||
IPage<AADObject> adObjects; | ||
for(int i=0; i<objectIds.Count; i+=1000) |
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.
1000 [](start = 47, length = 4)
it will be better to write a comment that graph only supports up to 1000 ids. #Resolved
"FxVersion/4.7.2046.0", | ||
"OSName/Windows_10_Enterprise", | ||
"OSVersion/6.3.15063", | ||
"Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0-preview" |
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.
entClient/1.6.0-preview [](start = 69, length = 23)
are these stuff related to your change? #Resolved
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 just ran the other test cases to make sure they still work in record mode since the session records had become stale( as the test cases were ran almost a year back)
In reply to: 117386585 [](ancestors = 117386585)
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 think it's better to update them in a separate PR for tracking purpose.
In reply to: 117542183 [](ancestors = 117542183,117386585)
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.
|
@shahabhijeet Is there anything blocking from my side for the pr to be merged? |
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.
This looks food. Please add a description of this change (what behavior was changed from a customer perspective) to the changelog for the resource manager cmdlets
on demand run here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1605/ signing run here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-sign/1066/ LGTM once these pass |
@markcowl The signing run is failing for 'Stop-AzureStorageBlobCopy' return type 'AzureStorageBlob'." do let me know no what can be done to get this PR merged |
@darshanhs90 This is failing due to reports of breaking change issues. Most likely this means you are not up to date with the preview branch. Please pull the latest from the preview branch and push to your fork. |
@markcowl updated the code with the latest code from the upstream |
new on demand run here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1612/ new signing run here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-sign/1082/ |
the ondemand run passed,however the signing run failed again even after i restarted it |
Description
Updating getobjectsbyobjectId call for objectIds > 1000,since they API limits only 1000 objectIds
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines