Title: fix(atlassian): share one cached, retrying cloudId resolver across Jira, Confluence, and JSM by waleedlatif1 · Pull Request #6541 · simstudioai/sim · GitHub
Open Graph Title: fix(atlassian): share one cached, retrying cloudId resolver across Jira, Confluence, and JSM by waleedlatif1 · Pull Request #6541 · simstudioai/sim
X Title: fix(atlassian): share one cached, retrying cloudId resolver across Jira, Confluence, and JSM by waleedlatif1 · Pull Request #6541 · simstudioai/sim
Description: Summary Every Jira, Confluence, and JSM tool re-resolved its site cloudId from accessible-resources on each invocation. Four hand-rolled copies of that lookup now read through one memoized resolver in lib/atlassian/discovery.ts A transient Atlassian 500 was never retried: the shared predicate covers 429/502/503/504 but not 500, so a single blip failed a whole run. Discovery is an idempotent GET, so it now replays 5xx — scoped to this path rather than widened into the shared predicate, which also guards non-idempotent writes The cache stores the promise, not the value, so concurrent blocks join one in-flight lookup and a rejection is evicted instead of pinned for the TTL. Only an exact domain match is retained — a single-site fallback is a property of the calling token, not the domain Retry budget is tighter than the shared ~31s default (four attempts across ~3.5s), honors Retry-After, and the request carries a timeout so a wedged fetch can't strand joined callers Fixes two defects found on the way: getConfluenceCloudId never checked the response status, so a 500 surfaced as No Confluence resources found (pointing at site permissions rather than the real fault); getAssetsWorkspaceId used a bare fetch with no retry and no cache Type of Change Bug fix Testing 19 unit tests covering caching, in-flight dedup, reject-eviction, the bounded retry budget, 5xx replay, and the non-retained fallback. Verified each can fail by reverting the behavior it covers. Full apps/sim suite green (22,760), plus type-check, lint, and the boundary/api-validation gates. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Every Jira, Confluence, and JSM tool re-resolved its site cloudId from accessible-resources on each invocation. Four hand-rolled copies of that lookup now read through one memoized resolve...
X Description: Summary Every Jira, Confluence, and JSM tool re-resolved its site cloudId from accessible-resources on each invocation. Four hand-rolled copies of that lookup now read through one memoized resolve...
Opengraph URL: https://github.com/simstudioai/sim/pull/6541
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2e07a166-bfef-c20c-73f6-96a68fc44604 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CD60:1EE905:6BC33D:98CE88:6AFB47AD |
| html-safe-nonce | 83c7a7d71058f8887ceb941894175fca42ba3cb4755f0fa7a4cb50326a741f9b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDYwOjFFRTkwNTo2QkMzM0Q6OThDRTg4OjZBRkI0N0FEIiwidmlzaXRvcl9pZCI6IjU5ODI5NTAyMzE3OTQ5OTMwNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3b2b8e6ed7aa995549134c2d9d8eb1b977fa7087e3afd4a16f924e2aa3b26779 |
| hovercard-subject-tag | pull_request:4254878924 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6541/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Every Jira, Confluence, and JSM tool re-resolved its site cloudId from accessible-resources on each invocation. Four hand-rolled copies of that lookup now read through one memoized resolve... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26504db649b58525278f77a52b80ba5f10d5f4de |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width