Skip to content

Comments

chore(calm-hub-ui): migrate from fetch to axios#2137

Open
selwyntheo wants to merge 1 commit intofinos:mainfrom
selwyntheo:chore/issue-979-migrate-fetch-to-axios
Open

chore(calm-hub-ui): migrate from fetch to axios#2137
selwyntheo wants to merge 1 commit intofinos:mainfrom
selwyntheo:chore/issue-979-migrate-fetch-to-axios

Conversation

@selwyntheo
Copy link

@selwyntheo selwyntheo commented Feb 15, 2026

Summary

  • Converts calm-service.tsx from standalone fetch-based functions to a CalmService class with injectable AxiosInstance, following the existing AdrService pattern
  • Replaces the fetch call in authService.tsx (checkAuthorityService) with axios.head()
  • Updates TreeNavigation.tsx and its tests to consume the new class-based API
  • Adds comprehensive tests for CalmService (20 tests) and checkAuthorityService (2 tests)

Closes #979

Test plan

  • All 196 existing + new tests pass (npm test in calm-hub-ui/)
  • Build compiles without errors (npm run build in calm-hub-ui/)
  • No remaining fetch( calls in calm-hub-ui/src/service/ or calm-hub-ui/src/authService.tsx

@selwyntheo selwyntheo requested a review from a team as a code owner February 15, 2026 13:37
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 15, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: selwyntheo / name: Selwyn (71323fd)

Replace native fetch calls with axios in calm-service and authService
for better testability via dependency injection. Convert calm-service
from standalone functions to a CalmService class following the existing
AdrService pattern, and add comprehensive tests for both services.
@selwyntheo selwyntheo force-pushed the chore/issue-979-migrate-fetch-to-axios branch from a23c7a3 to 71323fd Compare February 15, 2026 13:44
@markscott-ms
Copy link
Contributor

@selwyntheo thanks for the contribution! We'll take a look over this soon as we have some other PRs pending or coming up for calm-hub-ui. FYI @aamanrebello

@selwyntheo
Copy link
Author

@markscott-ms - Thanks much!. Let me know how I can help on other issues.

@markscott-ms
Copy link
Contributor

@selwyntheo if able, come along to an Office Hours meeting, every Thursday 1530 UK / 1030 EST. See https://github.com/finos/architecture-as-code?tab=readme-ov-file#getting-involved for details and #2136 for this week's - where we intend to agree what's next from #2075 as a focus area.

If unable, you can always drop a comment on an office hours issue letting us know that you might pick up any issue from the backlog. It's definitely worth commenting before picking up anything just in case someone else is working on it or about to introduce a conflicting change. We will usually get back to any comments promptly.

@selwyntheo
Copy link
Author

#2075

Thanks @markscott-ms . Will definitely try to attend office hours. Appreciate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate from fetch to HTTP library/axios

2 participants