Fix invalid api key errors when using JCasC#515
Merged
rodrigo-roca merged 1 commit intoJun 9, 2025
Conversation
rodrigo-roca
marked this pull request as ready for review
June 6, 2025 12:55
rodrigo-roca
deleted the
rodrigo.roca/fix-jcasc-invalid-api-key-on-startup
branch
June 9, 2025 07:10
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?
When initialising the Datadog client using an API key, we typically get the secret from the Jenkins credentials (see
DatadogCredentialsApiKey.javafile). If using configuration as code, the user can provide an API key from the beginning and by the time we initialise the Datadog client the credentials are not ready yet, causing invalid API Key errors (when in reality the keys may be valid). To fix it, the user had to manually go to the settings page and click onSaveorApply.Closes #514
Description of the Change
To avoid this, this PR makes the Datadog client to be initialised on
SYSTEM_CONFIG_ADAPTEDinstead ofSYSTEM_CONFIG_LOADED. At that point the credentials can be retrieved successfully.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.