This is an archive of the discontinued LLVM Phabricator instance.

Remove `lnt update` command.
ClosedPublic

Authored by fhahn on Dec 1 2017, 1:58 AM.

Details

Summary

lnt update is broken because of a missing import and there should be
no need for it anymore, because databases are upgraded when starting
the server. It is not mentioned in the docs.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Dec 1 2017, 1:58 AM
MatzeB edited edge metadata.Dec 1 2017, 10:40 AM

I wonder: Is this functionality good for anything nowadays? LNT always performs an upgrade when the server is started, so I don't see why one would want to do it manually. So the better fix may be to just remove the whole function :)

When not removing it, it would be nice to add at least a small sanity test to tests/lnttool.

fhahn added a comment.Dec 1 2017, 10:45 AM

I used

I wonder: Is this functionality good for anything nowadays? LNT always performs an upgrade when the server is started, so I don't see why one would want to do it manually. So the better fix may be to just remove the whole function :)

I just used it to initialize the tables in multiple postgresql databases, as there is no createdb command anymore (I am running a LNT instance with multiple databases). But maybe there is a better way to do that? AFAIK lnt create only initializes a single database, and the empty databases I added additionally where not recognized until I ran lnt update on them.

I used

I wonder: Is this functionality good for anything nowadays? LNT always performs an upgrade when the server is started, so I don't see why one would want to do it manually. So the better fix may be to just remove the whole function :)

I just used it to initialize the tables in multiple postgresql databases, as there is no createdb command anymore (I am running a LNT instance with multiple databases). But maybe there is a better way to do that? AFAIK lnt create only initializes a single database, and the empty databases I added additionally where not recognized until I ran lnt update on them.

I would have expected that you can just setup the postgresql connection in lnt.cfg and the tables get created on first server startup. Though admittedly I haven't setup any production servers, so I may be missing something...

fhahn added a comment.Dec 1 2017, 3:27 PM

I would have expected that you can just setup the postgresql connection in lnt.cfg and the tables get created on first server startup. Though admittedly I haven't setup any production servers, so I may be missing something...

Ok I tried it again and indeed the databases are created when starting the server. Should I remove update?

MatzeB added a comment.Dec 1 2017, 3:43 PM

I would have expected that you can just setup the postgresql connection in lnt.cfg and the tables get created on first server startup. Though admittedly I haven't setup any production servers, so I may be missing something...

Ok I tried it again and indeed the databases are created when starting the server. Should I remove update?

That would be great.

fhahn updated this revision to Diff 125518.Dec 5 2017, 6:45 AM
fhahn retitled this revision from Import db.migrate module in update command. to Remove `lnt update` command..
fhahn edited the summary of this revision. (Show Details)

Remove lnt update instead of fixing it.

MatzeB accepted this revision.Dec 6 2017, 2:35 PM

LGTM, thanks!

This revision is now accepted and ready to land.Dec 6 2017, 2:35 PM
fhahn closed this revision.Dec 6 2017, 2:55 PM
This revision was automatically updated to reflect the committed changes.