Skip to content

Fix(discovery/aws): Create Copies of Default Config#17769

Merged
SuperQ merged 1 commit intoprometheus:mainfrom
matt-gp:aws-sd-bug-fix
Jan 22, 2026
Merged

Fix(discovery/aws): Create Copies of Default Config#17769
SuperQ merged 1 commit intoprometheus:mainfrom
matt-gp:aws-sd-bug-fix

Conversation

@matt-gp
Copy link
Collaborator

@matt-gp matt-gp commented Jan 2, 2026

Which issue(s) does the PR fix:

When multiple jobs use aws_sd_configs with different configurations (like different ports/filters/clusters), they were all sharing the same underlying configuration object. This happened because the code was assigning pointers to global default configuration variables instead of making copies. This meant that when configuration was changed for one job, it was also change it for others.

Does this PR introduce a user-facing change?

NONE

@matt-gp
Copy link
Collaborator Author

matt-gp commented Jan 2, 2026

@SuperQ you might be a good person to review

@roidelapluie
Copy link
Member

Thanks! We would need a test for this.

@matt-gp
Copy link
Collaborator Author

matt-gp commented Jan 2, 2026

Updated to include a test TestMultipleSDConfigsDoNotShareState

Signed-off-by: matt-gp <small_minority@hotmail.com>
@matt-gp
Copy link
Collaborator Author

matt-gp commented Jan 22, 2026

@roidelapluie anyway we can push this forward??? Thanks

@SuperQ SuperQ requested a review from roidelapluie January 22, 2026 09:25
@SuperQ SuperQ merged commit 39e5240 into prometheus:main Jan 22, 2026
28 checks passed
@matt-gp matt-gp deleted the aws-sd-bug-fix branch February 11, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants