Skip to content

fix(deep-clone): remove org-scoped app installations query [EXT-7458]#10997

Merged
Jared Jolton (jjolton-contentful) merged 2 commits into
masterfrom
fix/deep-clone-remove-org-installations-query
May 21, 2026
Merged

fix(deep-clone): remove org-scoped app installations query [EXT-7458]#10997
Jared Jolton (jjolton-contentful) merged 2 commits into
masterfrom
fix/deep-clone-remove-org-installations-query

Conversation

@jjolton-contentful
Copy link
Copy Markdown
Contributor

@jjolton-contentful Jared Jolton (jjolton-contentful) commented May 21, 2026

Summary

  • Removes the unnecessary appInstallation.getForOrganization() call from useInstallationParameters that fetched ALL org installations on every sidebar mount
  • Uses sdk.parameters.installation directly (already available synchronously via the App SDK)
  • Eliminates a significant contributor to the INC-1276 cascading failure — in large orgs, this single call triggers O(N-spaces) fan-out on the backend

Context

We traced an anomalous load pattern back to GET /app_definitions/41ggGmfuNUErRXQhTdGlpu/app_installations being called 625 times/hour from a single org. Part of that traffic came from this hook firing on every sidebar mount. The parameters it fetches (cloneText, cloneTextBefore, automaticRedirect) are already available via the SDK — the CMA call was a redundant "freshness check."

Test plan

  • All 17 existing tests pass (vitest run)
  • Verify sidebar still displays correct clone text prefix/suffix in staging
  • Confirm no network call to appInstallation.getForOrganization in browser devtools

Jira: EXT-7458

🤖 Generated with Claude Code

…stallationParameters [EXT-7458]

The hook was calling appInstallation.getForOrganization() on every sidebar
mount to fetch ALL installations across the org, just to find the current
space's parameters. In large orgs this triggers O(N-spaces) fan-out to CIA,
contributing to the INC-1276 cascading failure. sdk.parameters.installation
already provides the parameters synchronously via the App SDK.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jjolton-contentful Jared Jolton (jjolton-contentful) force-pushed the fix/deep-clone-remove-org-installations-query branch from 67e3d76 to 5939401 Compare May 21, 2026 15:40
…ers [EXT-7458]

When installation parameters are not yet saved (e.g., fresh install before
config screen is submitted), sdk.parameters.installation is empty. Fall back
to sensible defaults matching the ConfigScreen initial state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deletion PRs are my favorite type of PRs

@jjolton-contentful Jared Jolton (jjolton-contentful) merged commit d6916c2 into master May 21, 2026
16 checks passed
@jjolton-contentful Jared Jolton (jjolton-contentful) deleted the fix/deep-clone-remove-org-installations-query branch May 21, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants