[traceback] alembic.util.CommandError: No 'script_location' key found in configuration.

RESOLVED FIXED

Status

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: willkg, Assigned: willkg)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The tests fail on CircleCI when trying to set up the db.

Traceback:

# Set up database for alembic migrations
#
# FIXME(willkg): For some reason, this has to go first because setting up
# socorro_integration_test needs it. Does it mean that alembic is doing
# migrations in the wrong db?
$SETUPDB --database_name=socorro_migration_test --dropdb --logging.stderr_error_logging_level=40 --unlogged --createdb
+ /usr/local/bin/python /app/socorro/external/postgresql/setupdb_app.py --database_name=socorro_migration_test --dropdb --logging.stderr_error_logging_level=40 --unlogged --createdb
Traceback (most recent call last):
  File "/app/socorro/external/postgresql/setupdb_app.py", line 433, in <module>
    sys.exit(main(SocorroDBApp))
  File "/app/socorro/app/socorro_app.py", line 480, in main
    values_source_list=values_source_list
  File "/app/socorro/app/socorro_app.py", line 181, in run
    values_source_list=values_source_list
  File "/app/socorro/app/socorro_app.py", line 278, in _do_run
    return_code = fix_exit_code(app_to_run.main())
  File "/app/socorro/external/postgresql/setupdb_app.py", line 411, in main
    command.stamp(alembic_cfg, "heads")
  File "/usr/local/lib/python2.7/site-packages/alembic/command.py", line 335, in stamp
    script = ScriptDirectory.from_config(config)
  File "/usr/local/lib/python2.7/site-packages/alembic/script/base.py", line 103, in from_config
    raise util.CommandError("No 'script_location' key "
alembic.util.CommandError: No 'script_location' key found in configuration.
make: *** [dockertest] Error 1
The tests run for me, but I'm betting I've got some state on my machine that's not in the image or missing from an environment variable or something.

Grabbing this to look into next.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Miles says this happens on his machine, too. It's almost certainly state on my machine. Maybe I've got an .ini file I'm not aware of or something.

Comment 4

a year ago
Commit pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/ea43c233c613d99d5c0bb2a3ef07a8283d060c6d
Fixes bug 1366051 - fix alembic issues in "make dockertest" (#3786)

This fixes alembic issues in "make dockertest" which came about from a lack of
alembic.ini file.

Updated

a year ago
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.