Overview
Comment: | attached area_id to the pgdb runs and updated the unique constraint or runs table to have that information. this should let runs from multiple users with same name and targets get synced without any issues |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.65 |
Files: | files | file ages | folders |
SHA1: |
c3d314c7c50116890ecf8cb6155c6ca7 |
User & Date: | pjhatwal on 2017-09-12 12:19:23 |
Other Links: | branch diff | manifest | tags |
Context
2017-09-12
| ||
12:21 | added web tables to mt-pg.sql check-in: 5c94f3c919 user: pjhatwal tags: v1.65 | |
12:19 | attached area_id to the pgdb runs and updated the unique constraint or runs table to have that information. this should let runs from multiple users with same name and targets get synced without any issues check-in: c3d314c7c5 user: pjhatwal tags: v1.65 | |
2017-09-08
| ||
17:49 | Updated install script to work with 4.12.0 and newest iup check-in: 25f400c8f8 user: jmoon18 tags: v1.65 | |
Changes
Modified cgisetup/models/pgdb.scm from [e2b1190070] to [875743c283].
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | - - - + + + - + - + - + - - - + + + - + - - - + + + | ;;====================================================================== ;; R U N S ;;====================================================================== ;; given a target spec id, target and run-name return the run-id ;; if no run found return #f ;; |
︙ |
Modified mt-pg.sql from [538f0610d2] to [820a01ba44].
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + | owner TEXT DEFAULT '', event_time INTEGER DEFAULT extract(epoch from now()), comment TEXT DEFAULT '', fail_count INTEGER DEFAULT 0, pass_count INTEGER DEFAULT 0, last_update INTEGER DEFAULT extract(epoch from now()), area_id INTEGER DEFAULT 0, |
︙ |
Modified tasks.scm from [e0260cf53c] to [4926b0b4a0].
︙ | |||
619 620 621 622 623 624 625 | 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | - + - + + | ((none)(loop (conc (current-user-name) "_" area-name) 'user)) ((user)(loop (conc (substring (common:get-area-path-signature) 0 4) area-name) 'areasig)) (else #f)))))) ;; give up ;; gets mtpg-run-id and syncs the record if different ;; |
︙ | |||
645 646 647 648 649 650 651 | 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | - + - + - - + + | db-contour (args:get-arg "-contour")))) (keytarg (if (or (args:get-arg "-prepend-contour") (args:get-arg "-prefix-target")) (conc "MT_CONTOUR/MT_AREA/" (string-intersperse (rmt:get-keys) "/")) (string-intersperse (rmt:get-keys) "/"))) ;; e.g. version/iteration/platform (target (if (or (args:get-arg "-prepend-contour") (args:get-arg "-prefix-target")) (conc (or (args:get-arg "-prefix-target") (conc contour "/" (common:get-area-name) "/")) (rmt:get-target run-id)) (rmt:get-target run-id))) ;; e.g. v1.63/a3e1/ubuntu (spec-id (pgdb:get-ttype dbh keytarg)) |
︙ | |||
707 708 709 710 711 712 713 | 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | - | (print "Error: Test not cashed"))) (print "Error: Could not get test step info for step id " test-step-id )))) ;; this is a wierd senario need to debug test-step-ids))) (define (tasks:sync-test-gen-data dbh cached-info test-data-ids) (let ((test-ht (hash-table-ref cached-info 'tests)) (data-ht (hash-table-ref cached-info 'data))) |
︙ | |||
747 748 749 750 751 752 753 | 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | - + - + | (print "Error: Test not in pgdb")))) (print "Error: Could not get test data info for data id " test-data-id )))) ;; this is a wierd senario need to debug test-data-ids))) |
︙ | |||
814 815 816 817 818 819 820 821 822 823 | 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 | + - + - + + - + - - + - | (changed (rmt:get-changed-record-ids last-sync-time)) (run-ids (alist-ref 'runs changed)) (test-ids (alist-ref 'tests changed)) (test-step-ids (alist-ref 'test_steps changed)) (test-data-ids (alist-ref 'test_data changed)) (run-stat-ids (alist-ref 'run_stats changed))) (print "area-info: " area-info) (if (not (null? test-ids)) (begin (print "Syncing " (length test-step-ids) " changed tests") |