]> scripts.mit.edu Git - wizard.git/blob - TODO
Fill out missing documentation.
[wizard.git] / TODO
1 The Git Autoinstaller
2
3 TODO NOW:
4
5 - Symlinked rerere to get awesomeness. Problems:
6     - Permissions
7     - Might not make a huge difference; how does it handle empty file
8       and removed file cases?
9     - Need to manually run git rerere subsequently to reap benefits
10     - Majority of resolutions have to happen pre-merge (see below)
11     - Consider workflow: run wizard mass-upgrade, and then begin
12       resolving working copies one by one.  Each time we resolve
13       a copy, it should cause other copies to start magically resolving.
14       So, ordering should be:
15         1. Perform merge
16         2. If it fails, merge the rr-cache with central rr-cache
17            (this operation needs to be atomic) and replace it
18            with a symlink.  File permissions preferably should
19            be made correct, but don't have to be since only root
20            will be touching subsequently.  If the hash already exists,
21            don't do anything (maybe record this for the benefit
22            of Mister Kite aka so we don't have to do a full traversal,
23            this optimization might be essential)
24         3. When a human is resolving the merges, they are "low
25            concurrency", i.e. only one commit recording rerere will
26            happen at a time.  This means that rr-cache does not
27            need to be concurrent safe.  Some number of hashes in
28            the rr-cache will start having postimages; we'll use
29            a full-scan to figure that out.  Then cross-reference those
30            with the recorded pending resolutions, and figure out which
31            checkouts we can run rerere on (this gets permissions kind
32            of tricky).  We'll try an alternative plan: manually require
33            the user run some sort of retry command that does this as
34            root; presumably they'd run this every ten installs or
35            something.  A user can run git rerere to get a resolution
36            early.
37       This requires some new data-structures:
38         - Besides the merge.txt file (which should never ever change),
39           we should have an outstanding.txt file which gets modified
40           as our scripts do resolutions behind our back.  Those modifications
41           might a little annoying for a human to keep up with, so we should
42           recommend something like watch -n2 "head file" or something
43         - We need to keep track of the hashes and the cross-referencing.
44           A very small sqlite database might be a good idea here, although
45           the type of information we're interested in a somewhat unnatural
46           query.  Alternatively, we just have a very simple text file.
47 - Make it possible to say certain classes of missing files are ok
48
49 - Wizard needs a correct arch/ setup
50 - The wizard command, when not on scripts, should automatically SSH to
51   scripts and start executing there?
52 - Write the code to make Wordpress figure out its URL from the database
53
54 - Remerges aren't reflected in the parent files, so `git diff` output is
55   spurious.  Not sure how to fix this w/o tree hackery.
56 - Sometimes users remove files. Well, if those files change, they automatically
57   get marked as conflicted.  Maybe we should say for certain files "if they're
58   gone, they're gone forever"?  What is the proper resolution?
59
60 - Parse output HTML for class="error" and give those errors back to the user (done),
61   then boot them back into configure so they can enter in something different
62
63 - Replace gaierror with a more descriptive name (this is a DNS error)
64
65 - Pre-emptively check if daemon/scripts-security-upd
66   is not on scripts-security-upd list (/mit/moira/bin/blanche)
67 - If you try to do an install on scripts w/o sql, it will sign you up but fail to write
68   the sql.cnf file. This sucks.
69
70 - Web application for installing autoinstalls has a hard problem
71   with credentials (as well as installations that are not conducted
72   on an Athena machine.)  We have some crazy ideas involving a signed
73   Java applet that uses jsch to SSH into athena.dialup and perform
74   operations.
75
76 - Pay back code debt
77     - Tidy up common code in callAsUser and drop_priviledges in shell;
78       namely cooking up the sudo and environment variable lines
79     - Summary script should be more machine friendly, and should not
80       output summary charts when I increase specificity
81     - Report code in wizard/command/__init__.py is ugly as sin.  Also,
82       the Report object should operate at a higher level of abstraction
83       so we don't have to manually increment fails. (in fact, that should
84       probably be called something different).  The by-percent errors should
85       also be automated.
86     - Move resolutions in mediawiki.py to a text file? (the parsing overhead
87       may not be worth it)
88     - PHP end of file allows omitted semicolon, can result in parse error
89       if merge resolutions aren't careful.  `php -l` can be a quick stopgap
90
91 - Other stuff
92     - Figure out why Sphinx sometimes fails to crossref :func: but wil
93       crossref :meth:, even though the dest is very clearly a function.
94       Example: :func:`wizard.app.php.re_var`
95     - The TODO extension for Sphinx doesn't properly force a full-rebuild
96     - Code annotation!
97     - Make single user mass-migrate work when not logged in as root.  The
98       primary difficulty is making the parallel-find information easily
99       accessible to individual users: perhaps we can do a single-user
100       parallel-find on the fly.
101     - Don't use the scripts heuristics unless we're on scripts with the
102       AFS patch.  Check with `fs sysname`
103     - Make 'wizard summary' generate nice pretty graphs of installs by date
104       (more histograms, will need to check actual .scripts-version files.)
105     - It should be able to handle installs like Django where there's a component
106       that gets installed in web_scripts and another directory that gets installed
107       in Scripts.
108
109 - ACLs is a starting point for sending mail to users, but it has
110   several failure modes:
111     - Old maintainers who don't care who are still on the ACL
112     - Private AFS groups that aren't mailing lists and that we
113       can't get to
114   A question is whether or not sending mail actually helps us:
115   many users will probably have to come back to us for help; many
116   other users won't care.
117
118 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
119
120 advancedpoll: Template file to fill out
121 django: Noodles of template files
122 gallery2: Multistage install process
123 joomla: Template file
124 mediawiki: One-step install process
125 phpbb: Multistage install process
126 phpical: Template file
127 trac: NFC
128 turbogears: NFC
129 wordpress: Multistage install process
130
131 COMMIT MESSAGE FIELDS:
132
133 Installed-by: username@hostname
134 Pre-commit-by: Real Name <username@mit.edu>
135 Upgraded-by: Real Name <username@mit.edu>
136 Migrated-by: Real Name <username@mit.edu>
137 Wizard-revision: abcdef1234567890
138 Wizard-args: /wizard/bin/wizard foo bar baz
139
140 GIT COMMIT FIELDS:
141
142 Committer: Real Name <username@mit.edu>
143 Author: lockername locker <lockername@scripts.mit.edu>
144
145 NOTES:
146
147 - It is not required nor expected for update scripts to exist for all
148   intervening versions that were present pre-migration; only for it
149   to work on the most recent migration.
150
151 - Currently all repositories are initialized with --shared, which
152   means they have basically ~no space footprint.  However, it
153   also means that /mit/scripts/wizard/srv MUST NOT lose revs after
154   deployment.
155
156 OVERALL PLAN:
157
158 * Some parts of the infrastructure will not be touched, although I plan
159   on documenting them.  Specifically, we will be keeping:
160
161     - parallel-find.pl, and the resulting
162       /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
163
164 * The new procedure for generating an update is as follows:
165   (check out the mass-migration instructions for something in this spirit,
166   although uglier in some ways; A indicates the step /should/ be automated)
167
168     0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
169        bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
170
171     1. [ see doc/upgrade.rst ]
172
173     [ENTER HERE FROM CREATING A NEW REPO]
174
175     9. Push all of your changes in a public place, and encourage others
176        to test, using --srv-path and a full path.
177
178 [ XXX: doc/deploy.rst ]
179       GET APPROVAL BEFORE PROCEEDING ANY FURTHER;
180       THIS IS PUSHING THE CHANGES TO THE PUBLIC
181
182       NOTE: The following commands are to be run on not-backward.mit.edu.
183       You'll need to add daemon.scripts-security-upd to
184       scripts-security-upd to get bits to do this.  Make sure you remove
185       these bits when you're done.
186
187    10. Run `wizard research appname`
188        which uses Git commands to check how many
189        working copies apply the change cleanly, and writes out a logfile
190        with the working copies that don't apply cleanly.  It also tells
191        us about "corrupt" working copies, i.e. working copies that
192        have over a certain threshold of changes.
193
194    11. Run `wizard mass-upgrade appname`, which applies the update to all working
195        copies possible.
196
197    12. Run parallel-find.pl to update our inventory
198
199 [ XXX: doc/upgrade.rst ]
200 * For mass importing into the repository, there are a few extra things:
201
202     * When mass producing updates, if the patch has changed you will have to
203       do a special procedure for your merge:
204
205         git checkout pristine
206         # NOTE: Now, the tricky part (this is different from a real update)
207         git symbolic-ref HEAD refs/heads/master
208         # NOTE: Now, we think we're on the master branch, but we have
209         # pristine copy checked out
210         # NOTE: -p0 might need to be twiddled
211         patch -p0 < ../app-1.2.3/app-1.2.3.patch
212         git add .
213         # reconstitute .scripts directory
214         git checkout v1.2.2-scripts -- .scripts
215         git add .scripts
216         # NOTE: Fake the merge
217         git rev-parse pristine > .git/MERGE_HEAD
218
219       You could also just try your luck with a manual merge using the patch
220       as your guide.
221
222 [ XXX: doc/layout.rst ]
223 * The repository for a given application will contain the following files:
224
225     - The actual application's files, as from the official tarball
226
227     - A .scripts directory, with the intent of holding Scripts specific files
228       if they become necessary.
229
230         - .scripts/dsn, overriding database source name
231