Commit 072f1a6
committed
fix: harden deployment list sync and SQLite timestamp storage
- Filter list/count and sync by deployment_type in SQL so type-scoped
sync can prune provider-unknown rows without a Python type skip.
- Keep list sync alive on provider round failures; backfill remaining
page slots from local rows after sync (may be stale; tune batch size /
max rounds to reduce padding).
- Bind attachment cleanup/recount to provider-confirmed IDs only (no
needless snapshot copy before backfill).
- Soften DELETE rowcount handling with UnknownDeleteCount when the
driver does not report an int.
- Document that deployment_list_sync_batch_size should stay within the
provider's ID-filtered list limit.
- Stop writing deployment-family timestamps with server_default=func.now();
use Column default/onupdate=utc_now (Field stays default=None) so SQLite
stores microsecond DateTime strings matching later query parameters.
- Add SQLite migration a8f3c2d1e4b5: rewrite existing second-level timestamp
strings through DateTime binds, and drop CURRENT_TIMESTAMP server defaults
on all dialects.
- Cover type filter, keyset after rewrite, ORM microsecond writes, sync
backfill/failure paths, and the server_default drop in unit tests; extend
integration coverage for the sync path.1 parent 1ee78f1 commit 072f1a6
6 files changed
Lines changed: 663 additions & 89 deletions
File tree
- src
- backend
- base/langflow
- api/v1/mappers/deployments
- services/database/models/deployment
- tests
- integration
- unit
- api/v1
- services/database
- lfx/src/lfx/services/settings/groups
Lines changed: 83 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
895 | | - | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
896 | 898 | | |
897 | 899 | | |
898 | 900 | | |
| |||
915 | 917 | | |
916 | 918 | | |
917 | 919 | | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
932 | 936 | | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
952 | 957 | | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
958 | 971 | | |
959 | 972 | | |
960 | 973 | | |
| |||
964 | 977 | | |
965 | 978 | | |
966 | 979 | | |
967 | | - | |
| 980 | + | |
968 | 981 | | |
969 | 982 | | |
970 | 983 | | |
| |||
982 | 995 | | |
983 | 996 | | |
984 | 997 | | |
985 | | - | |
| 998 | + | |
| 999 | + | |
986 | 1000 | | |
987 | 1001 | | |
988 | 1002 | | |
| |||
1005 | 1019 | | |
1006 | 1020 | | |
1007 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1008 | 1049 | | |
1009 | 1050 | | |
1010 | 1051 | | |
1011 | 1052 | | |
1012 | 1053 | | |
1013 | 1054 | | |
| 1055 | + | |
1014 | 1056 | | |
1015 | 1057 | | |
1016 | 1058 | | |
| |||
Lines changed: 57 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
39 | 54 | | |
40 | 55 | | |
41 | 56 | | |
| |||
365 | 380 | | |
366 | 381 | | |
367 | 382 | | |
| 383 | + | |
368 | 384 | | |
369 | 385 | | |
370 | 386 | | |
| |||
381 | 397 | | |
382 | 398 | | |
383 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
384 | 404 | | |
385 | 405 | | |
386 | | - | |
| 406 | + | |
387 | 407 | | |
388 | 408 | | |
389 | 409 | | |
| |||
394 | 414 | | |
395 | 415 | | |
396 | 416 | | |
397 | | - | |
| 417 | + | |
398 | 418 | | |
399 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
400 | 423 | | |
401 | 424 | | |
402 | 425 | | |
| |||
423 | 446 | | |
424 | 447 | | |
425 | 448 | | |
426 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
427 | 453 | | |
428 | 454 | | |
429 | | - | |
430 | 455 | | |
431 | | - | |
432 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
433 | 460 | | |
434 | 461 | | |
435 | 462 | | |
| |||
571 | 598 | | |
572 | 599 | | |
573 | 600 | | |
| 601 | + | |
574 | 602 | | |
575 | 603 | | |
576 | 604 | | |
577 | 605 | | |
578 | 606 | | |
579 | 607 | | |
580 | 608 | | |
| 609 | + | |
581 | 610 | | |
582 | 611 | | |
583 | 612 | | |
584 | 613 | | |
585 | 614 | | |
586 | 615 | | |
587 | 616 | | |
| 617 | + | |
| 618 | + | |
588 | 619 | | |
589 | 620 | | |
590 | 621 | | |
| |||
713 | 744 | | |
714 | 745 | | |
715 | 746 | | |
716 | | - | |
717 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
718 | 754 | | |
719 | 755 | | |
720 | 756 | | |
| |||
735 | 771 | | |
736 | 772 | | |
737 | 773 | | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
0 commit comments