Fix setting Datadog API key credentials with configuration as code#438
Merged
Conversation
nikita-tkachenko-datadog
marked this pull request as ready for review
July 10, 2024 13:45
sarah-witt
reviewed
Jul 10, 2024
| @@ -0,0 +1,9 @@ | |||
| unclassified: | |||
sarah-witt
approved these changes
Jul 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements for Contributing to this repository
What does this PR do?
Fixes setting Datadog APU key credential ID with Configuration-as-Code Jenkins plugin.
Description of the Change
When configuring Datadog plugin with configuration as code,
targetCredentialsApiKeyfield is set, but not theusedApiKeywhich refers to the actual API key used by the plugin (could be either the credential or the API key supplied in text input).The workaround is to check whether the used key field is initialised when the plugin attempts to read it.
If the field is not initialised, both "target" fields are checked to see if the key was supplied using one of them.
This is a temporary workaround that will be removed later when the plugin configuration is refactored to have only one field for key.
Alternate Designs
Possible Drawbacks
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/label attached. If applicable it should have thebackward-incompatiblelabel attached.do-not-merge/label attached.kind/andseverity/labels attached at least.