Production scripts use ftest helpers

Bug #285808 reported by Gary Poster
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Francis J. Lacoste

Bug Description

Launchpad scripts and script infrastructure (production code) use ftest helpers `login` and `login_person`. These should use production helpers, not ftest helpers that can change to better support testing (and in fact do in a branch of mine). See the following files.

lib/canonical/codehosting/codeimport/workermonitor.py
lib/canonical/launchpad/scripts/__init__.py
lib/canonical/launchpad/scripts/base.py
lib/canonical/launchpad/xmlrpc/codehosting.py
scripts/bugzilla-import.py
scripts/sourceforge-import.py

Related branches

Curtis Hovey (sinzui)
Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Aaron Bentley (abentley) wrote :

I think this needs to be re-examined, because this sort of thing causes new and interesting ways for our scripts to fail. For example:

Traceback (most recent call last):
  File "/home/abentley/launchpad/stable/scripts/branch-rewrite.py", line 22, in <module>
    from canonical.launchpad.database import account
  File "/home/abentley/launchpad/stable/lib/canonical/launchpad/database/__init__.py", line 11, in <module>
    from lp.soyuz.model.sourcepackagerelease import *
  File "/home/abentley/launchpad/stable/lib/lp/soyuz/model/sourcepackagerelease.py", line 47, in <module>
    from lp.soyuz.model.build import Build
  File "/home/abentley/launchpad/stable/lib/lp/soyuz/model/build.py", line 68, in <module>
    from lp.soyuz.model.publishing import SourcePackagePublishingHistory
  File "/home/abentley/launchpad/stable/lib/lp/soyuz/model/publishing.py", line 61, in <module>
    from lp.soyuz.scripts.changeoverride import ArchiveOverriderError
  File "/home/abentley/launchpad/stable/lib/lp/soyuz/scripts/changeoverride.py", line 18, in <module>
    from lp.soyuz.scripts.ftpmasterbase import (
  File "/home/abentley/launchpad/stable/lib/lp/soyuz/scripts/ftpmasterbase.py", line 22, in <module>
    from lp.services.scripts.base import (
  File "/home/abentley/launchpad/stable/lib/lp/services/scripts/base.py", line 27, in <module>
    from lp.testing import ANONYMOUS
  File "/home/abentley/launchpad/stable/lib/lp/testing/__init__.py", line 58, in <module>
    from windmill.authoring import WindmillTestClient
  File "/home/abentley/launchpad/stable/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/__init__.py", line 17, in <module>
    import authoring, bin, browser, server, conf, tools, sys
  File "/home/abentley/launchpad/stable/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/authoring/__init__.py", line 17, in <module>
    from windmill.bin import admin_lib
  File "/home/abentley/launchpad/stable/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/bin/admin_lib.py", line 25, in <module>
    from windmill.dep import functest
  File "/home/abentley/launchpad/stable/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/dep/__init__.py", line 15, in <module>
    import _mozrunner as mozrunner
  File "/home/abentley/launchpad/stable/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/dep/_mozrunner/__init__.py", line 45, in <module>
    import global_settings
  File "/home/abentley/launchpad/stable/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/dep/_mozrunner/global_settings.py", line 42, in <module>
    def findInPath(fileName, path=os.environ['PATH']):
  File "/usr/lib/python2.5/UserDict.py", line 22, in __getitem__
    raise KeyError(key)
KeyError: 'PATH'

Changed in launchpad-foundations:
assignee: nobody → Francis J. Lacoste (flacoste)
status: Triaged → In Progress
Revision history for this message
Ursula Junque (ursinha) wrote : Bug fixed by a commit
Changed in launchpad-foundations:
milestone: none → 10.04
status: In Progress → Fix Committed
tags: added: qa-needstesting
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.