Skip to content

scope TestIntakeRefreshAPIKey to the metrics endpoint instead of the global last-key - #53653

Open
s-alad wants to merge 1 commit into
mainfrom
saad/fix-get-last-api-key-test
Open

scope TestIntakeRefreshAPIKey to the metrics endpoint instead of the global last-key#53653
s-alad wants to merge 1 commit into
mainfrom
saad/fix-get-last-api-key-test

Conversation

@s-alad

@s-alad s-alad commented Jul 14, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Claude suggested fix to help alleviate rare transient E2E test failure: https://datadoghq.atlassian.net/jira/software/c/projects/AGENTCFG/boards/8668?selectedIssue=AGENTCFG-819

TestIntakeRefreshAPIKey asserts on fakeintake's GetLastAPIKey(), which is a single global field overwritten by every payload on every route. There can be a race which periodically flakes the test. Adds a route-scoped GetLastMetricPayloadAPIKey() client method and points the test at it.

Motivation

Recurring CI flake (job 1813051483)

Describe how you validated your changes

Running tests

Additional Notes

@s-alad
s-alad requested a review from rahulkaukuntla July 14, 2026 22:40
@dd-octo-sts dd-octo-sts Bot added internal Identify a non-fork PR team/agent-devx labels Jul 14, 2026
@github-actions github-actions Bot added the short review PR is simple enough to be reviewed quickly label Jul 14, 2026
@s-alad
s-alad marked this pull request as ready for review July 14, 2026 22:40
@s-alad
s-alad requested review from a team as code owners July 14, 2026 22:40
@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 0.00%
Overall Coverage: 52.34% (+0.05%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b3bcb61 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Files inventory check summary

File checks results against ancestor 623b04cb:

Results for datadog-agent_7.84.0~devel.git.58.b3bcb61.pipeline.130085113-1_amd64.deb:

No change detected

Results for datadog-iot-agent_7.84.0~devel.git.58.b3bcb61.pipeline.130085113-1_amd64.deb:

No change detected

@ofek ofek added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation labels Jul 15, 2026
@s-alad
s-alad force-pushed the saad/fix-get-last-api-key-test branch from 9a1b78a to 2af540c Compare July 20, 2026 14:58
@dd-octo-sts

dd-octo-sts Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had activity in the past 15 days.

It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window.

Thank you for your contributions!

@dd-octo-sts dd-octo-sts Bot added the stale label Aug 5, 2026
…cs endpoint instead of the global (route-unscoped) last-key
@s-alad
s-alad force-pushed the saad/fix-get-last-api-key-test branch from 2af540c to b3bcb61 Compare August 10, 2026 21:53
@s-alad
s-alad requested a review from a team as a code owner August 10, 2026 21:53
@s-alad
s-alad requested a review from san-jos August 10, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed internal Identify a non-fork PR qa/no-code-change No code change in Agent code requiring validation short review PR is simple enough to be reviewed quickly team/agent-configuration team/agent-devx team/fleet-automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants