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