Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type error #5904

Merged
merged 2 commits into from
Feb 27, 2020
Merged

Fix type error #5904

merged 2 commits into from
Feb 27, 2020

Conversation

celenechang
Copy link
Contributor

@celenechang celenechang commented Feb 27, 2020

What does this PR do?

Fixes a pickle error introduced for py2 in #5447

kubernetes_state (5.2.0)
    ------------------------
      Instance ID: kubernetes_state:d52437eab9dd94d4 [ERROR]
      Configuration Source: file:/etc/datadog-agent/conf.d/kubernetes_state.d/auto_conf.yaml
      Total Runs: 95
      Metric Samples: Last Run: 0, Total: 0
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 0s
      Last Execution Date : 2020-02-26 18:59:57.000000 UTC
      Last Successful Execution Date : Never
      Error: can't pickle dictionary-keyiterator objects
      Traceback (most recent call last):
        File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/datadog_checks/base/checks/base.py", line 693, in run
          instance = copy.deepcopy(self.instances[0])
        File "/opt/datadog-agent/embedded/lib/python2.7/copy.py", line 163, in deepcopy
          y = copier(x, memo)
        File "/opt/datadog-agent/embedded/lib/python2.7/copy.py", line 257, in _deepcopy_dict
          y[deepcopy(key, memo)] = deepcopy(value, memo)
        File "/opt/datadog-agent/embedded/lib/python2.7/copy.py", line 163, in deepcopy
          y = copier(x, memo)
        File "/opt/datadog-agent/embedded/lib/python2.7/copy.py", line 230, in _deepcopy_list
          y.append(deepcopy(a, memo))
        File "/opt/datadog-agent/embedded/lib/python2.7/copy.py", line 182, in deepcopy
          rv = reductor(2)
      TypeError: can't pickle dictionary-keyiterator objects

observed from the output of agent status

Motivation

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@celenechang celenechang merged commit 8071050 into master Feb 27, 2020
@celenechang celenechang deleted the celene/ksm_check_typeerror branch February 27, 2020 16:44
@ofek ofek changed the title [kubernetes_state] rm six.iterkeys Fix type error Feb 27, 2020
ofek pushed a commit that referenced this pull request Feb 27, 2020
* rm iterkeys

* fix telemetry test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants