sqlalchemy-bot / test_alembic_1

0 stars 0 forks source link

Confusing upgrade log #498

Closed sqlalchemy-bot closed 6 years ago

sqlalchemy-bot commented 6 years ago

Migrated issue, originally created by Samuel Carlsson (vidstige)

As a new user I would like to be impressed by alembic. However, upon first meeting alembic, it emitts the following confusing info logging. I don't really know how this is relevant to me. Perhaps these messages could be changed to DEBUG to allow new users to be more impressed and less confused? It should be a small fix, with huge impact.

#!python-log

$ alembic upgrade head
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
sqlalchemy-bot commented 6 years ago

Samuel Carlsson (vidstige) wrote:

See the following issue for example. https://github.com/miguelgrinberg/Flask-Migrate/issues/201

sqlalchemy-bot commented 6 years ago

Michael Bayer (zzzeek) wrote:

I'm sorry you're not impressed by Alembic. However, as a new user, how do you know that those messages aren't relevant to you? I find it strange that someone would, in their first hours of using a new software product, decide that particular program informational output is not relevant (even though they don't understand it) and that it should be removed?

Have you ever used Sphinx? (http://www.sphinx-doc.org/en/master/) Here's the start of its output:

#!

Running Sphinx v1.7.0
loading pickled environment... done
loading intersphinx inventory from http://www.sqlalchemy.org/docs/objects.inv...
intersphinx inventory has moved: http://www.sqlalchemy.org/docs/objects.inv -> http://docs.sqlalchemy.org/en/latest/objects.inv
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 24 source files that are out of date
updating environment: [config changed] 21 added, 0 changed, 4 removed
reading changelog note files (version 0.9.10)...[100%] drop_repr.rst                                                                                              
reading sources... [100%] unreleased/drop_repr                                                                                                                    
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/classic/dev/alembic/docs/build/unreleased/drop_repr.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [100%] unreleased/drop_repr                      

Woud you similarly see the need to request that Sphinx remove information about steps it's performing such as "loading pickled environment", after all, as a new user, I have no idea what that means, or "checking consistency...", what does that mean? The nature of log output is that various significant but not-necessarily-familiar-to-the-new-user are displayed. I'm not really sure what to do with this request.

sqlalchemy-bot commented 6 years ago

Samuel Carlsson (vidstige) wrote:

I have never used sphinx and fail to see how that's relevant. I think the point here is that if you make a very simple hello world app, why is there a need to log those things? It just leave the impression that alembic is not very thought through and made for developers who actually read the log. So we have two things logged at INFO level, why are those so important to know? The first one seems useless as I already configured SQLite, it just restates that fact with a bit of extra that makes it hard to read "Impl". And then the second one I also fail to understand why that is super important to know right of the bat. If it is so important, perhaps it should be at WARN instead? Basically, everything that's always logged that you must learn to ignore, I feel is better to leave out. Perhaps there could be a setting to let alembic know you want "non-transactional DDL", whatever that means. At the very least, perhaps the wording can be changed to be more helpful.

sqlalchemy-bot commented 6 years ago

Michael Bayer (zzzeek) wrote:

I apologize but I'm very busy and I don't have the resources to engage in this style of discussion over a cosmetic concern. I hope you can find a solution to your problem in some other way.

sqlalchemy-bot commented 6 years ago

Samuel Carlsson (vidstige) wrote:

Oh well. I think you underestimate the importance of "cosmetic" problems. Today, developers are very used to lean and slick tools. I think most people will just be annoyed, at least I took the time to write to you here. I'm a maintainer myself and completely understand you. I just want to emphasize I'm not nagging here, just trying to push this great library to the next level, and further more I'm willing to help out here in any way I can. I persist in my opinion that confusing/needless logging is not the best way to greet new users that are just trying it out, and I'm here to help out with prs or what-not, if you so wish. Anyway, thanks for your time and for a great library.

sqlalchemy-bot commented 6 years ago

Changes by Michael Bayer (zzzeek):