epugh opened a new pull request, #5241:
URL: https://github.com/apache/solr/pull/5241
## Summary
- Admin UI's Replication screen and core overview page now call `GET
/api/cores/{coreName}/replication` (v2) instead of v1's `?command=details`, via
a new `ReplicationV2` Angular service mirroring the existing `NodeV2` pattern.
- v1 always rendered booleans (`isLeader`, `isFollower`,
`replicationEnabled`, `isPollingDisabled`, `isReplicating`) as the strings
`"true"`/`"false"`, while v2 exposes them as real JSON booleans.
`follower.leaderDetails` is populated via an internal NamedList round-trip to
the leader's own v1 endpoint though, so its nested booleans stay string-typed
regardless of API version. Added a small `isTruthy()` helper (duplicated
locally per-controller, matching this codebase's existing per-file helper
convention) that accepts either form.
- Fixed a latent caching bug surfaced by this migration: the generated v2 JS
client defaults to browser-cacheable GET requests (no cache-busting param,
unlike v1's `$resource` `'_':Date.now()`), which made the replication screen
show stale status after actions like disable/enable polling, since repeated
refreshes hit the identical URL. Set `ApiClient.instance.cache = false` for the
`ReplicationV2` service to fix it.
## Test plan
- [x] `AdminUiReplicationScreenTest` (cloud-mode screen render) passes
- [x] `AdminUiReplicationStandaloneTest.testReplicationScreenAndActions`
(leader/follower polling, replicate-now, abort) passes — this test actually
caught the caching regression before the fix was added
- [x] `AdminUiCoreAdminStandaloneTest` / `AdminUiCoreAdminScreenTest` (core
overview page, which also uses replication details) pass
- [x] All JS files pass `node --check`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]