-
Notifications
You must be signed in to change notification settings - Fork 584
Add OwnerReference to generated Jobs #865
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
Conversation
828d711
to
5eaf2ef
Compare
I've added a commit that adds the annotation |
Is there something left to do? I see that some pipeline job failed, but I believe this has nothing to do with my changes. |
cbef565
to
a76d3bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR submission. Please update the relevant test cases i.e. TestCreateJobFromCronjob
and TestReCreateJobFromJob
in rolling_upgrade_test.go
.
Thank you for reviewing! I will add the requested test cases sometime this week. |
3b2bdbc
to
366fa90
Compare
I am sorry, I don't understand what kind of tests I should add. All the existing tests only check if the called function (in this case I am fine with adding any test case you like, but I would kindly ask for some more guidance regarding what exactly you want me to add. Looking at the existing test cases, it doesn't seem like other contributors where ever asked to test anything beyond "Please ensure that the function doesn't return an error". By the way, there is surely no need to change |
Sorry for not being clear enough. When writing the comment I imagined having some kind of validation to check if owner reference was added or not. This is just to make sure that in future if this function gets modified then we have a test case in place to verify that this owner reference feature doesn't get vanished unintentionally. Before this change, having an error check was enough because that was the only area where there was a margin for a failing case. And sorry no need to change Please let me know if there is any confusion. |
Understood :) I've added a little check that ensures the presence of a I am sorry if the code isn't very Go'ish. I am an experienced developer, but I am new to Go and its conventions. |
Oops, forgot to remove the Edit: Now there are conflicts, weird. Gimme a minute... |
fac9cff
to
b636c2a
Compare
b636c2a
to
99c45b3
Compare
There you go, please take a look :) |
Since #486 Reloader is able to trigger Jobs from existing CronJob, which is awesome 🎉
But I noticed that the generated Jobs are missing owner references to the CronJob that was used to create them. This creates some issues:
Prior art:
I successfully tested this change in one of our clusters.