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 the type of bearer_token_auth #11144

Merged
merged 1 commit into from
Jan 18, 2022
Merged

Conversation

L3n41c
Copy link
Member

@L3n41c L3n41c commented Jan 14, 2022

What does this PR do?

Update the type of the bearer_token_auth parameter of the openmetrics base check from boolean to boolean or string.

Motivation

The change was initiated by #10706, but it was incomplete.

In particular, the kube_apiserver_metrics is currently failing with the following error:

      Error: Detected 1 error while loading configuration model `InstanceConfig`:
bearer_token_auth
  value could not be parsed to a boolean
      Traceback (most recent call last):
        File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 1008, in run
          initialization()
        File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 423, in load_configuration_models
          instance_config = self.load_configuration_model(package_path, 'InstanceConfig', raw_instance_config)
        File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 463, in load_configuration_model
          raise_from(ConfigurationError('\n'.join(message_lines)), None)
        File "<string>", line 3, in raise_from
      datadog_checks.base.errors.ConfigurationError: Detected 1 error while loading configuration model `InstanceConfig`:
      bearer_token_auth
        value could not be parsed to a boolean

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

@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

clamoriniere
clamoriniere previously approved these changes Jan 14, 2022
maycmlee
maycmlee previously approved these changes Jan 14, 2022
Copy link
Contributor

@maycmlee maycmlee left a comment

Choose a reason for hiding this comment

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

Small change from docs.

@L3n41c L3n41c dismissed stale reviews from maycmlee and clamoriniere via 04a03a4 January 17, 2022 13:30
@L3n41c L3n41c force-pushed the lenaic/fix_tls_only_bearer_token branch from 4210916 to 04a03a4 Compare January 17, 2022 13:30
@L3n41c
Copy link
Member Author

L3n41c commented Jan 17, 2022

/azp run PR Changes (Linux)

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@L3n41c
Copy link
Member Author

L3n41c commented Jan 17, 2022

/azp help

@azure-pipelines
Copy link

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@L3n41c
Copy link
Member Author

L3n41c commented Jan 17, 2022

/azp list

@L3n41c
Copy link
Member Author

L3n41c commented Jan 17, 2022

/azp run PR Changes

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yzhan289 yzhan289 merged commit 945d005 into master Jan 18, 2022
@yzhan289 yzhan289 deleted the lenaic/fix_tls_only_bearer_token branch January 18, 2022 14:36
@yzhan289 yzhan289 changed the title openmetrics: Fix the type of bearer_token_auth Fix the type of bearer_token_auth Jan 18, 2022
yzhan289 pushed a commit that referenced this pull request Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment