fix(config): skip api. prefix for on-call domains in DD_SITE - #71
Merged
Conversation
On-call domains like navy.oncall.datadoghq.com are already fully-qualified API endpoints. Previously, pup always prepended "api." to DD_SITE, resulting in invalid URLs like api.navy.oncall.datadoghq.com. Now, when DD_SITE contains "oncall", the domain is used as-is for both the API client host and RawRequest URLs. Closes #66 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
navy.oncall.datadoghq.comare already fully-qualified API endpointsapi.toDD_SITE, resulting in invalid URLs likeapi.navy.oncall.datadoghq.comDD_SITEcontainsoncall, the domain is used as-isChanges
IsOnCallSite()to detect on-call domains (pkg/config/config.go:48)GetAPIHost()that returns the correct host — skippingapi.for on-call sites (pkg/config/config.go:60)GetAPIURL()to delegate toGetAPIHost()(pkg/config/config.go:54)client.goto usecfg.GetAPIHost()instead of hardcodedapi.{site}(pkg/client/client.go:108,178)IsOnCallSite,GetAPIHost, and on-call domain handling inGetAPIURLandLoadTesting
api.prefixCloses #66
🤖 Generated with Claude Code