[AGENTONB-1702] Early exit if no credentials despite controllers requiring them#2387
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2387 +/- ##
==========================================
+ Coverage 36.90% 36.97% +0.06%
==========================================
Files 286 286
Lines 24116 24125 +9
==========================================
+ Hits 8900 8920 +20
+ Misses 14518 14507 -11
Partials 698 698
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
fanny-jiang
approved these changes
Dec 9, 2025
3 tasks
fanny-jiang
added a commit
that referenced
this pull request
Jan 29, 2026
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.
What does this PR do?
Errors out and quits the manager process if credentials are not present despite being required for controllers to work
Motivation
This pattern existed for
DatadogMonitorsolely, but other resource controllers can benefit from itAdditional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
make deploy) without creds and ensure manager process runs since no resource controllers but Agent is enabled ootb{"level":"ERROR","ts":"2025-12-09T14:56:10.809Z","logger":"setup","msg":"Unable to retrieve Datadog API credentials required by one or more enabled controllers","DatadogMonitor":false,"DatadogDashboard":false,"DatadogSLO":false,"DatadogGenericResource":true,"error":"empty API key and/or App key","stacktrace":"main.setupErrorf\n\t/workspace/cmd/main.go:509\nmain.run\n\t/workspace/cmd/main.go:265\nmain.main\n\t/workspace/cmd/main.go:204\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:285"}Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel