-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use next link from group membership request #14305
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
|
Can one of the admins verify this patch? |
78a2aeb to
0275571
Compare
|
the check-enforcer has been running for over 20h. Some CI jobs are failing because the spring/pom.xml is dependent on com.microsoft.azure:azure-servicebus-jms:0.0.4 which is in turn dependent on org.apache.geronimo.specs:geronimo-jms_2.0_spec:LATEST which is why the maven enforcer is complaining about non-release dependency versions. I didn't add those dependencies in my PR... How can I work around this? |
|
@ppartarr Oh, Check-enforcer only completes when all the other checks pass. It's a bit deceiving in its behaviour. At the moment, it won't complete because some of those java-spring-ci tests are failing. |
|
This repo uses a mechanism to centralize the version for dependencies. If a new dependency is being added then it should also be in the external_dependency.txt file. That's why the Also, there were some AAD related unit tests failing. |
|
@saragluna thanks for the info. It seems like the dependency I added is already in the external_depency.txt in master: https://github.com/Azure/azure-sdk-for-java/blob/master/eng/versioning/external_dependencies.txt#L8 My mistake was that I had I'm still working on resolving the Jackson deserialisation issue that's causing the tests to fail 😃 |
|
@ppartarr I have a concern that if the organization has thousands of groups, then the |
|
@zhoufenqin Aside: if an organisation assigns their AD users to thousands of groups they probably aren't using group nesting correctly. Nevertheless, from my experience, it isn't uncommon for users to be a part of hundreds of groups. |
...ring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java
Outdated
Show resolved
Hide resolved
...ring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java
Outdated
Show resolved
Hide resolved
|
/azp run java - spring - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
...ring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java
Outdated
Show resolved
Hide resolved
...ring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java
Outdated
Show resolved
Hide resolved
.../azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java
Outdated
Show resolved
Hide resolved
...azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java
Outdated
Show resolved
Hide resolved
|
/azp run java - spring - ci |
|
Commenter does not have sufficient privileges for PR 14305 in repo Azure/azure-sdk-for-java |
|
@chenrujun can you have a look at the failing tests please? It says that the TodoListController requires 2 parameters but this is clearly not the case from the changes in my pr: failing TodoListController line & UserGroup constructor |
|
Hi, @ppartarr . |
|
/azp run java - spring - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
loadUser only gets the first 100 groups a user belongs to rather than using the odata.nextLink in the response to get the full list of groups. Fix this by checking if the response contains an odata.nextLink and then build the URL appropriately for the configured API version. For V1, odata.nextLink contains a skip token which we extract. More information here: https://docs.microsoft.com/en-us/previous-versions/azure/ad/graph/api/users-operations#get-a-users-manager-- For V2, odata.nextLink can be used directly as the URL for the request as specified here: https://docs.microsoft.com/en-us/graph/paging fix Azure#14222
Change the type of the odata.nextLink from Optional<String> to String
|
@chenrujun all tests are passing, are you okay to merge this branch in? |
chenrujun
left a comment
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.
LGTM. Thank you for your effort.
loadUsers()only gets the first 100 groups a user belongs to rather thanusing the odata.nextLink in the response to get the full list of groups.
Fix this by checking if the response contains an odata.nextLink and then
build the URL appropriately for the configured API version.
For V1 odata.nextLink contains a skip token which we extract. More
information here: https://docs.microsoft.com/en-us/previous-versions/azure/ad/graph/api/users-operations#get-a-users-manager--
For V2 odata.nextLink can be used directly as the URL for the request
as specified here: https://docs.microsoft.com/en-us/graph/paging
fix #14222