Details

    • Type: Task
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: Marathon 1.6.322
    • Component/s: Build & CI
    • Labels:
      None

      Description

      Looks like something also changed in the format of the data returned

      KeyError: 'healthy'
      Stacktrace
      
      self = <CallInfo when='call' exception: 'healthy'>
      func = <function call_runtest_hook.<locals>.<lambda> at 0x7f3627a1f9d8>
      when = 'call'
      
          def __init__(self, func, when):
              #: context of invocation: one of "setup", "call",
              #: "teardown", "memocollect"
              self.when = when
              self.start = time()
              try:
      >           self.result = func()
      
      /usr/lib/python3.6/site-packages/_pytest/runner.py:189: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      >   return CallInfo(lambda: ihook(item=item, **kwds), when=when)
      
      /usr/lib/python3.6/site-packages/_pytest/runner.py:175: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      self = <_HookCaller 'pytest_runtest_call'>, args = ()
      kwargs = {'item': <Function 'test_pod_health_check'>}, notincall = set()
      
          def __call__(self, *args, **kwargs):
              if args:
                  raise TypeError("hook calling supports only keyword arguments")
              assert not self.is_historic()
              if self.argnames:
                  notincall = set(self.argnames) - set(['__multicall__']) - set(
                      kwargs.keys())
                  if notincall:
                      warnings.warn(
                          "Argument(s) {} which are declared in the hookspec "
                          "can not be found in this hook call"
                          .format(tuple(notincall)),
                          stacklevel=2,
                      )
      >       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
      
      /usr/lib/python3.6/site-packages/pluggy/__init__.py:617: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      self = <_pytest.config.PytestPluginManager object at 0x7f362a883780>
      hook = <_HookCaller 'pytest_runtest_call'>
      methods = [<pluggy.HookImpl object at 0x7f36288314e0>, <pluggy.HookImpl object at 0x7f36287cc710>, <pluggy.HookImpl object at 0x7f36287e2ba8>]
      kwargs = {'item': <Function 'test_pod_health_check'>}
      
          def _hookexec(self, hook, methods, kwargs):
              # called from all hookcaller instances.
              # enable_tracing will set its own wrapping function at self._inner_hookexec
      >       return self._inner_hookexec(hook, methods, kwargs)
      
      /usr/lib/python3.6/site-packages/pluggy/__init__.py:222: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      hook = <_HookCaller 'pytest_runtest_call'>
      methods = [<pluggy.HookImpl object at 0x7f36288314e0>, <pluggy.HookImpl object at 0x7f36287cc710>, <pluggy.HookImpl object at 0x7f36287e2ba8>]
      kwargs = {'item': <Function 'test_pod_health_check'>}
      
          self._inner_hookexec = lambda hook, methods, kwargs: \
              hook.multicall(
                  methods, kwargs,
      >           firstresult=hook.spec_opts.get('firstresult'),
              )
      
      /usr/lib/python3.6/site-packages/pluggy/__init__.py:216: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      item = <Function 'test_pod_health_check'>
      
          def pytest_runtest_call(item):
              _update_current_test_var(item, 'call')
              try:
      >           item.runtest()
      
      /usr/lib/python3.6/site-packages/_pytest/runner.py:106: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      self = <Function 'test_pod_health_check'>
      
          def runtest(self):
              """ execute the underlying test function. """
      >       self.ihook.pytest_pyfunc_call(pyfuncitem=self)
      
      /usr/lib/python3.6/site-packages/_pytest/python.py:1171: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      self = <_HookCaller 'pytest_pyfunc_call'>, args = ()
      kwargs = {'pyfuncitem': <Function 'test_pod_health_check'>}, notincall = set()
      
          def __call__(self, *args, **kwargs):
              if args:
                  raise TypeError("hook calling supports only keyword arguments")
              assert not self.is_historic()
              if self.argnames:
                  notincall = set(self.argnames) - set(['__multicall__']) - set(
                      kwargs.keys())
                  if notincall:
                      warnings.warn(
                          "Argument(s) {} which are declared in the hookspec "
                          "can not be found in this hook call"
                          .format(tuple(notincall)),
                          stacklevel=2,
                      )
      >       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
      
      /usr/lib/python3.6/site-packages/pluggy/__init__.py:617: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      self = <_pytest.config.PytestPluginManager object at 0x7f362a883780>
      hook = <_HookCaller 'pytest_pyfunc_call'>
      methods = [<pluggy.HookImpl object at 0x7f3628831b38>, <pluggy.HookImpl object at 0x7f36288532b0>]
      kwargs = {'pyfuncitem': <Function 'test_pod_health_check'>}
      
          def _hookexec(self, hook, methods, kwargs):
              # called from all hookcaller instances.
              # enable_tracing will set its own wrapping function at self._inner_hookexec
      >       return self._inner_hookexec(hook, methods, kwargs)
      
      /usr/lib/python3.6/site-packages/pluggy/__init__.py:222: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      hook = <_HookCaller 'pytest_pyfunc_call'>
      methods = [<pluggy.HookImpl object at 0x7f3628831b38>, <pluggy.HookImpl object at 0x7f36288532b0>]
      kwargs = {'pyfuncitem': <Function 'test_pod_health_check'>}
      
          self._inner_hookexec = lambda hook, methods, kwargs: \
              hook.multicall(
                  methods, kwargs,
      >           firstresult=hook.spec_opts.get('firstresult'),
              )
      
      /usr/lib/python3.6/site-packages/pluggy/__init__.py:216: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      pyfuncitem = <Function 'test_pod_health_check'>
      
          @hookimpl(trylast=True)
          def pytest_pyfunc_call(pyfuncitem):
              testfunction = pyfuncitem.obj
              if pyfuncitem._isyieldedfunction():
                  testfunction(*pyfuncitem._args)
              else:
                  funcargs = pyfuncitem.funcargs
                  testargs = {}
                  for arg in pyfuncitem._fixtureinfo.argnames:
                      testargs[arg] = funcargs[arg]
      >           testfunction(**testargs)
      
      /usr/lib/python3.6/site-packages/_pytest/python.py:147: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
          @shakedown.dcos_1_9
          def test_pod_health_check():
              """Tests that health checks work for pods."""
          
              pod_def = pods.ports_pod()
              pod_id = pod_def['id']
          
              client = marathon.create_client()
              client.add_pod(pod_def)
              common.deployment_wait(service_id=pod_id)
          
              tasks = common.get_pod_tasks(pod_id)
      >       c1_health = tasks[0]['statuses'][0]['healthy']
      E       KeyError: 'healthy'
      
      tests/system/marathon_pods_tests.py:402: KeyError
      

        Attachments

          Activity

            People

            • Assignee:
              alenavarkockova Alena Varkockova
              Reporter:
              alenavarkockova Alena Varkockova
              Team:
              Orchestration Team
              Watchers:
              Alena Varkockova
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: