Skip to content

Commit

Permalink
Remove a special case where the appengine-pipeline generate task_target
Browse files Browse the repository at this point in the history
improperly when module == 'default'.

The sepecial case is causing a failure after a recent changes to
dev_appserver (Taskqueue 'target' made compatible with dev_appserver)
when taskqueue.py tries to parse module name.

For background see cl/126706214.
  • Loading branch information
aozarov committed Jul 6, 2016
1 parent b18ab02 commit 2f1930b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions python/src/pipeline/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def _get_task_target():

version = os.environ["CURRENT_VERSION_ID"].split(".")[0]
module = os.environ["CURRENT_MODULE_ID"]
if module == "default":
return version
return "%s.%s" % (version, module)


Expand Down
4 changes: 2 additions & 2 deletions python/test/util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def testGetTaskTarget(self):

def testGetTaskTargetDefaultModule(self):
os.environ["CURRENT_MODULE_ID"] = "default"
self.assertEqual("v7", util._get_task_target())
self.assertEqual("v7.default", util._get_task_target())
task = taskqueue.Task(url="/relative_url",
target=util._get_task_target())
self.assertEqual("v7", task.target)
self.assertEqual("v7.default", task.target)


if __name__ == '__main__':
Expand Down

0 comments on commit 2f1930b

Please sign in to comment.