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 error when scrubbing non-org secrets #5827

Merged
merged 1 commit into from
Feb 21, 2020
Merged

Fix error when scrubbing non-org secrets #5827

merged 1 commit into from
Feb 21, 2020

Conversation

ofek
Copy link
Contributor

@ofek ofek commented Feb 21, 2020

Motivation

(I added a print)

ofek@ozone ~\Desktop $ ddev config set jira.token
Value for `jira.token`:
{'jira': {'token': '************************'}}
Traceback (most recent call last):
  File "C:\Users\ofek\AppData\Local\Programs\Python\Python38\Scripts\ddev-script.py", line 11, in <module>
    load_entry_point('datadog-checks-dev', 'console_scripts', 'ddev')()
  File "c:\users\ofek\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\ofek\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\users\ofek\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\ofek\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\ofek\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\ofek\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\ofek\appdata\local\programs\python\python38\lib\site-packages\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\users\ofek\desktop\code\integrations-core\datadog_checks_dev\datadog_checks\dev\tooling\commands\config.py", line 134, in set_value
    output_config = scrub_secrets(branch_config_root) if scrubbing else branch_config_root
  File "c:\users\ofek\desktop\code\integrations-core\datadog_checks_dev\datadog_checks\dev\tooling\config.py", line 126, in scrub_secrets
    for data in config['orgs'].values():
KeyError: 'orgs'

Copy link
Contributor

@sarah-witt sarah-witt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 I think I've seen this error before too

@codecov
Copy link

codecov bot commented Feb 21, 2020

Codecov Report

Merging #5827 into master will decrease coverage by 4.95%.
The diff coverage is n/a.

Impacted Files Coverage Δ
datadog_checks_dev/tests/tooling/test_dep.py 95.09% <0%> (ø) ⬆️
...ts/tooling/configuration/consumers/test_example.py 100% <0%> (ø) ⬆️
...checks_dev/tests/plugin/test_environment_runner.py 100% <0%> (ø) ⬆️
datadog_checks_dev/datadog_checks/dev/warn.py 63.63% <0%> (ø) ⬆️
datadog_checks_dev/tests/common.py 100% <0%> (ø) ⬆️
...hecks_dev/tests/tooling/configuration/test_load.py 100% <0%> (ø) ⬆️
datadog_checks_dev/datadog_checks/dev/terraform.py 0% <0%> (ø) ⬆️
...tadog_checks/dev/tooling/configuration/template.py 100% <0%> (ø) ⬆️
...cks/dev/tooling/configuration/consumers/example.py 100% <0%> (ø) ⬆️
datadog_checks_dev/tests/test_docker.py 100% <0%> (ø) ⬆️
... and 891 more

@ofek ofek merged commit 41d15ae into master Feb 21, 2020
@ofek ofek deleted the ofek/ss branch February 21, 2020 21:21
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.

2 participants