Opened 2 months ago

Last modified 2 months ago

#33709 assigned defect

BridgeDB's deployment scripts are broken

Reported by: phw Owned by: phw
Priority: Medium Milestone:
Component: Circumvention/BridgeDB Version:
Severity: Normal Keywords:
Cc: cohosh, phw Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When running ~/bridgedb-admin/bin/deploy on polyanthum, I suddenly get:

[...]
"$BIN_DIR"/run-bridgedb
+ /srv/bridges.torproject.org/bin/run-bridgedb
Starting BridgeDB...            [OK]
exit $?
+ exit 0
(bridgedb) [21:23:16] bridgedb@polyanthum ~$ Traceback (most recent call last):
  File "/home/bridgedb/virtualenvs/bridgedb/bin/bridgedb", line 4, in <module>
    __import__('pkg_resources').run_script('bridgedb==0.9.4+0.g9a7ae57c.dirty', 'bridgedb')
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python3.7/site-packages/pkg_resources/__init__.py", line 667, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1455, in run_script
    .format(**locals()),
pkg_resources.ResolutionError: Script 'scripts/bridgedb' not found in metadata at '/srv/bridges.torproject.org/home/bridgedb/bridgedb.egg-info'

...and BridgeDB won't start. This may have something to do with the setuptools package.

Child Tickets

Change History (2)

comment:1 Changed 2 months ago by phw

Reverting bridgedb-admin to commit 9a23dff and bridgedb to commit 7b142b89 makes it possible to deploy BridgeDB again. These commits were the last before our migration to Python 3. I don't think that the problem is just Python 3: the deployment scripts worked fine after the migration.

comment:2 Changed 2 months ago by phw

Priority: ImmediateMedium

What looked like one problem is actually two. The second problem I wasn't aware of is a syntax error I just discovered in bridgedb.conf:

# A mapping of whitelisted email addresses to GnuPG key fingerprints:
EMAIL_WHITELIST = {
    'testbridgestorbrowser@gmail.com': 'ThisIsABogusFingerprint'}
}

The trailing curly bracket is the reason why BridgeDB wouldn't start because it broke while trying to parse its configuration file.

The stack trace that's quoted in the top post is still happening but we can work around it by manually running ~/bridgedb-admin/bin/run-bridgedb after ~/bridgedb-admin/bin/deploy. I'm reducing this ticket's priority.

Note: See TracTickets for help on using tickets.