Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Verify job ownership #37

Merged
merged 2 commits into from
Jul 13, 2024
Merged

feat: Verify job ownership #37

merged 2 commits into from
Jul 13, 2024

Conversation

meyfa
Copy link
Member

@meyfa meyfa commented Jul 12, 2024

In case the Renovate CronJob shares its namespace with other resources, we need to ensure that any jobs we return are actually related to the Renovate CronJob and not part of something else.

In the case of scheduled jobs, this is easily verified using the job's owner references. In the case of jobs triggered manually via Foreman, it appears we need to introduce a custom label by which we can then filter (which is what this patch does).

When testing this patch, non-related jobs no longer show up in Foreman while scheduled and manual jobs still do.

In case the Renovate CronJob shares its namespace with other
resources, we need to ensure that any jobs we return are actually
related to the Renovate CronJob and not part of something else.

In the case of scheduled jobs, this is easily verified using the job's
owner references. In the case of jobs triggered manually via Foreman,
it appears we need to introduce a custom label by which we can then
filter (which is what this patch does).

When testing this patch, non-related jobs no longer show up in
Foreman while scheduled and manual jobs still do.
@meyfa meyfa requested a review from a team as a code owner July 12, 2024 23:09
@lusu007 lusu007 merged commit f854f8c into main Jul 13, 2024
3 checks passed
@lusu007 lusu007 deleted the feat/job-owner branch July 13, 2024 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants