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

[CoE Starter Kit - BUG] Admin | Gather Tenant SRs fails with The number of array items in variable 'TenantSRs' reached the limit: maximum '100000' and actual '100000'. #7838

Closed
1 task done
martintoelk opened this issue Mar 13, 2024 · 4 comments
Assignees
Labels
bug Something isn't working coe-starter-kit CoE Starter Kit issues

Comments

@martintoelk
Copy link

martintoelk commented Mar 13, 2024

Does this bug already exist in our backlog?

  • I have checked and confirm this is a new bug.

Describe the issue

The Admin | Gather Tenant SR adds all found SR into an array. For medium/ Large tenants this will to much to handle for the array and the Cloud Fails with

BadRequest. The number of array items in variable 'TenantSRs' reached the limit: maximum '100000' and actual '100000'.

image

Additional Info:
We have ~90 Environments. Some Environments are having a lot of Business Units and therefor a very big amount of Security Roles (Roles get multipled by each Business Unit)

Edit:
We also have a bunch of deprecated SR's that we did not /cant delete which makes the situation even more worse. The flow fails roughly after processing half of the Environments

Expected Behavior

Flow does not fail

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.24

What app or flow are you having the issue with?

Admin | Gather Tenant SRs

What method are you using to get inventory and telemetry?

None

Steps To Reproduce

Create a bunch of Environment + BU + Roles until you have > 100.000 Array Entries

Anything else?

No response

AB#2555

@martintoelk martintoelk added bug Something isn't working coe-starter-kit CoE Starter Kit issues labels Mar 13, 2024
@RajeevPentyala RajeevPentyala moved this to Todo ✏️ in CoE Starter Kit Mar 13, 2024
@Jenefer-Monroe
Copy link
Collaborator

Thanks for posting! I bet its all those BUs. Since they are dupes we can ignore them. Let me get you a filter to try.

@Jenefer-Monroe Jenefer-Monroe self-assigned this Mar 13, 2024
@Jenefer-Monroe Jenefer-Monroe moved this from Todo ✏️ to In Progress 🚧 in CoE Starter Kit Mar 13, 2024
@Jenefer-Monroe
Copy link
Collaborator

Unfortunately the object isnt returned in a way we can do a simple expand query filter but we will not be stopped!

To try it out for me you'll need to make these changes locally. Please let me know if you are able to do so and if it works.
If not perhaps someone else in the community who hits this can try.

Inside the Apply to each envt loop you'll add these two new actions
First a List rows from selected environment then a Compose
image

List rows from selected environment

image
Action Name: Get Parent BU for ID
Environment: @Items('Apply_to_each_envt')?['properties/linkedEnvironmentMetadata/instanceUrl']
Table name: businessunits
Select columns: businessunitid, name
Filter rows: _parentbusinessunitid_value eq null

Compose

image
Action Name: ParentBU
Inputs: @{first(outputs('Get_Parent_BU_for_ID')?['body/value'])?['businessunitid']}

Filters

Now you'll add to the filters on these two actions
image

Get SRs from envt with TIDs
Filter rows: _roletemplateid_value ne null and _businessunitid_value eq @{outputs('ParentBU')}
image

Get SRs from envt
Filter rows: _roletemplateid_value eq null and _businessunitid_value eq @{outputs('ParentBU')}
image

@martintoelk
Copy link
Author

martintoelk commented Mar 14, 2024

Awesome! It worked and it is very fast. The old version did run for over 2 hours, before it crashed.

image

image

#7838

@Jenefer-Monroe
Copy link
Collaborator

Huzzah! Thank you so much for testing for me!
Ready for April.

@Jenefer-Monroe Jenefer-Monroe moved this from In Progress 🚧 to Code complete ☑ in CoE Starter Kit Mar 14, 2024
@github-project-automation github-project-automation bot moved this from Code complete ☑ to Done ✅ in CoE Starter Kit Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working coe-starter-kit CoE Starter Kit issues
Projects
Status: Done
Development

No branches or pull requests

3 participants