prometheus/scrape
bwplotka f44bba31b3 config: Remove validation GetScrapeConfigs; require using config.Load.
We should never modify (or even shallow copy) Config after config.Load;
added comments and modified GetScrapeConfigs to do so. For GetScrapeConfigs
the validation (even repeated) was likely doing writes (because global fields was 0). We GetScrapeConfigs concurrently
in tests and ApplyConfig causing test races. In prod there were
races but likelyt only to replace 0 with 0, so not too severe.

I removed validation since I don't see anyone using our config.Config without Load.
I had to refactor one test that was doing it, all others use yaml config.

Fixes #15538
Previous attempt: https://github.com/prometheus/prometheus/pull/15634

Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-12-11 13:31:01 +00:00
..
testdata Include test CA text info (#14699) 2024-08-20 19:41:02 +02:00
clientprotobuf.go lint: Revamp our linting rules, mostly around doc comments 2024-08-22 17:36:11 +02:00
helpers_test.go TSDB: Fix some edge cases when OOO is enabled (#14710) 2024-10-23 17:34:28 +02:00
manager.go chore: Remove dead code 2024-11-04 13:00:22 -03:00
manager_test.go config: Remove validation GetScrapeConfigs; require using config.Load. 2024-12-11 13:31:01 +00:00
metrics.go Scraping: add metric for symbol table size 2024-07-05 10:16:22 +01:00
scrape.go Merge pull request #15563 from GiedriusS/fix_setting_field 2024-12-10 15:33:56 +00:00
scrape_test.go Merge pull request #15563 from GiedriusS/fix_setting_field 2024-12-10 15:33:56 +00:00
target.go Remove no-default-scrape-port featureFlag 2024-09-25 10:13:19 -05:00
target_test.go test: add TestTargetsFromGroupWithLabelKeepDrop to reinforce a relabelling behaviour. 2024-12-04 17:17:10 +01:00