Skip to content

ScrapeConfig status update at reconcillation#7964

Merged
simonpasquier merged 9 commits intoprometheus-operator:mainfrom
yp969803:issue7960
Oct 2, 2025
Merged

ScrapeConfig status update at reconcillation#7964
simonpasquier merged 9 commits intoprometheus-operator:mainfrom
yp969803:issue7960

Conversation

@yp969803
Copy link
Contributor

@yp969803 yp969803 commented Oct 1, 2025

Description

ScrapeConfig status update at reconcillation

Closes: #7960

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Verification

Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.


@yp969803 yp969803 requested a review from a team as a code owner October 1, 2025 05:51
@yp969803
Copy link
Contributor Author

yp969803 commented Oct 1, 2025

@simonpasquier PTAL

@simonpasquier
Copy link
Contributor

We have (legit) CI failures.

@yp969803
Copy link
Contributor Author

yp969803 commented Oct 1, 2025

@simonpasquier solved

simonpasquier
simonpasquier previously approved these changes Oct 1, 2025
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

require.NoError(t, err)

// Create a first scrapeConfig to check that the operator only updates the binding when needed.
sc1 := framework.MakeBasicScrapeConfig("sc1", ns)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sc1 := framework.MakeBasicScrapeConfig("sc1", ns)
sc1 := framework.MakeBasicScrapeConfig(ns, "sc1")

require.NotEqual(t, "", ts)

// Create a second scrapeConfig to check that the operator updates the binding when the condition changes.
sc2 := framework.MakeBasicScrapeConfig("sc2", ns)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@yp969803
Copy link
Contributor Author

yp969803 commented Oct 1, 2025

@simonpasquier merge request

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonpasquier simonpasquier merged commit ca51ba7 into prometheus-operator:main Oct 2, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Scrapeconfig's status subresource on Prometheus reconciliations

2 participants