Project

General

Profile

Actions

Bug #4158

closed

[ce, ee] pylons.config is missing settings

Added by Daniel D over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
10.08.2016
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

Problem seems to be after the settings refactor, some of the settings that load_enviromnent() was adding such as 'vcs.hooks.direct_calls' are now not getting added to the pylons.config (from pylons import config) - which is breaking code that depends on this - it is hard to say which parts of code are affected, the @vcsconnection celery decorator for example showed this problem - there may be other places.

Celery Traceback:

[2016-08-09 21:19:55,904: ERROR/MainProcess] Task rhodecode.lib.celerylib.tasks.create_repo_fork[7d3a210e-d20f-4216-bc8d-99fcdf69947d] raised exception: KeyError('vcs.hooks.direct_calls',)
Traceback (most recent call last):
  File "/nix/store/gjgiaqj5n9kvvmabxk79i3yf9m9172yf-python2.7-celery-2.2.10/lib/python2.7/site-packages/celery/execute/trace.py", line 34, in trace
    return cls(states.SUCCESS, retval=fun(*args, **kwargs))
  File "/nix/store/dxvzsgk8skfvl7pp14wjn8v9sh97r776-python2.7-rhodecode-enterprise-ce-4.3.0+20160809x150712xcbe557819f37/lib/python2.7/site-packages/rhodecode/lib/celerylib/__init__.py", line 130, in __call__
    return super(RhodecodeCeleryTask, self).__call__(*args, **kwargs)
  File "/nix/store/gjgiaqj5n9kvvmabxk79i3yf9m9172yf-python2.7-celery-2.2.10/lib/python2.7/site-packages/celery/task/base.py", line 241, in __call__
    return self.run(*args, **kwargs)
  File "/nix/store/gjgiaqj5n9kvvmabxk79i3yf9m9172yf-python2.7-celery-2.2.10/lib/python2.7/site-packages/celery/app/__init__.py", line 141, in run
    return fun(*args, **kwargs)
  File "<string>", line 2, in create_repo_fork
  File "/nix/store/dxvzsgk8skfvl7pp14wjn8v9sh97r776-python2.7-rhodecode-enterprise-ce-4.3.0+20160809x150712xcbe557819f37/lib/python2.7/site-packages/rhodecode/lib/celerylib/__init__.py", line 203, in __wrapper
    ret = func(*fargs, **fkwargs)
  File "<string>", line 2, in create_repo_fork
  File "/nix/store/dxvzsgk8skfvl7pp14wjn8v9sh97r776-python2.7-rhodecode-enterprise-ce-4.3.0+20160809x150712xcbe557819f37/lib/python2.7/site-packages/rhodecode/lib/celerylib/__init__.py", line 221, in __wrapper
    utils.configure_vcs(config)
  File "/nix/store/dxvzsgk8skfvl7pp14wjn8v9sh97r776-python2.7-rhodecode-enterprise-ce-4.3.0+20160809x150712xcbe557819f37/lib/python2.7/site-packages/rhodecode/config/utils.py", line 59, in configure_vcs
    conf.settings.HOOKS_DIRECT_CALLS = config['vcs.hooks.direct_calls']
  File "/nix/store/sb9n37049lc5dgny1jnhi92gxpxz134y-python2.7-Paste-2.0.2/lib/python2.7/site-packages/paste/registry.py", line 146, in __getitem__
    return self._current_obj()[key]
KeyError: 'vcs.hooks.direct_calls'
None
Actions #1

Updated by Martin Bornhold over 7 years ago

  • Status changed from New to In Progress

The setup of these settings is moved from load_environment to load_pyramid_environment. It looks like the setup of celery does not setup the pyramid layer correctly. This error does not occur on my local mashine. Do you have any hints on how to reproduce it? I assume that i have to activate celery in my config to get the error. Will try that but have to setup celeryd first ;)

Actions #2

Updated by Martin Bornhold over 7 years ago

  • Status changed from In Progress to Resolved

The celery module now uses the fully prepared and sanitized settings from app init. Fix is included in https://internal-code.rhodecode.com/rhodecode-enterprise-ce/pull-request/2551

Actions #3

Updated by Johannes Bornhold over 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF