Repository navigation
Commit 9019ac1
UN-4123 [FIX] Extend the cache/client parity to Sentinel mode
The parity sweep stopped at the Sentinel branch, and I recorded the four
divergences living there as "its own ticket". That was the wrong call twice
over: a guarantee that stops at a mode boundary is a half-truth, and the reason
I gave for deferring — "changing code no test in this file executes" — was not
true. _derive's slice spans BOTH branches; it just needed an env selecting this
one. "No test executes it" and "no test was written for it" are different
statements, and only the second was ever the case.
Four divergences from create_redis_client, all pre-existing on main:
* THE SENTINEL PORT. The module-level REDIS_PORT defaults to 6379 — the
STANDALONE port — while core's Sentinel path resolves with
default_port="26379". With REDIS_PORT unset this cache looked for sentinels
on the wrong port while every other client found them. The chart always sets
REDIS_PORT, which is why it stayed hidden.
* THE USERNAME, twice. REDIS_USER defaults to "default" at module scope, so
this cache sent a two-argument ACL AUTH where core sends the one-argument
form; and it read REDIS_USER directly, so the REDIS_USERNAME spelling
platform-service ships was ignored. Both now come from the shared resolver,
and the same value reaches SENTINEL_KWARGS, the LOCATION and the Socket.IO
URL.
* TLS REACHED NEITHER CONNECTION. A TLS-only Sentinel deployment got a
plaintext cache while core encrypted both the discovery and the master
connections. Carrying it in SENTINEL_KWARGS alone would encrypt discovery and
leave the master in clear, so it goes to CONNECTION_POOL_KWARGS too — core
builds both from one env dict for exactly this reason.
BEHAVIOUR CHANGES for existing Sentinel deployments, stated rather than buried:
an unset REDIS_PORT now resolves 26379 instead of 6379; no username is sent
unless one is configured (Redis 6+ treats `AUTH default <pw>` and `AUTH <pw>`
as the same command, and redis-py retries one-arg regardless, so this is a wire
change rather than an auth change); and REDIS_SSL now applies here. Flag off is
byte-identical — asserted.
Backend 79 -> 87. Four mutations verified caught.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 815460e commit 9019ac1
2 files changed
Lines changed: 161 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
580 | 587 | | |
581 | 588 | | |
582 | 589 | | |
583 | | - | |
584 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
585 | 608 | | |
586 | 609 | | |
587 | 610 | | |
588 | 611 | | |
589 | 612 | | |
590 | | - | |
591 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
592 | 617 | | |
593 | 618 | | |
594 | 619 | | |
| |||
597 | 622 | | |
598 | 623 | | |
599 | 624 | | |
600 | | - | |
| 625 | + | |
601 | 626 | | |
602 | 627 | | |
603 | 628 | | |
| |||
608 | 633 | | |
609 | 634 | | |
610 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
611 | 640 | | |
612 | 641 | | |
613 | 642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
0 commit comments