-
Notifications
You must be signed in to change notification settings - Fork 256
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
Ignore reconciling against unmanaged child jobs in the jobframework #821
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
/assign @alculquicondor |
3686019
to
e72bdf8
Compare
8b61efc
to
432f9d2
Compare
@@ -464,100 +461,6 @@ var _ = ginkgo.Describe("Job controller for workloads with no queue set", func() | |||
return k8sClient.Get(ctx, wlLookupKey, createdWorkload) | |||
}, util.Timeout, util.Interval).Should(gomega.Succeed()) | |||
}) | |||
ginkgo.When("The parent-workload annotation is used", func() { |
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.
@alculquicondor We can not run integration test cases related to parent-workload annotation since we must create a known workload owner (currently, only mpijobs) as a parent job.
Maybe, the capacity of memory is insufficient :( ...
go fmt ./...
go vet ./...
golang.org/x/net/http2: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed
github.com/prometheus/procfs: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed
make: *** [Makefile:144: vet] Error 1 |
f815440
to
a52c9fc
Compare
/retest |
}) | ||
|
||
ginkgo.It("Should not suspend a child job if the parent job doesn't have a queue name", func() { | ||
ginkgo.By("Creating the child job without ownerReference which uses the parent workload annotation") |
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.
🤔 maybe we should not allow a job to have the parent workload annotation if it doesn't have an owner reference?
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.
That makes sense. Actually, we verify the ownerReference at a defaulting webhook:
if owner := metav1.GetControllerOf(job); owner != nil && jobframework.KnownWorkloadOwner(owner) { |
However, we don't have validation webhooks for that.
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.
I'm thinking of adding a validation at a follow-up PR 🤔
Either way, I will move this case to a unit test.
76e315f
to
bb1ea47
Compare
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
limitations under the License. | |||
*/ | |||
|
|||
package jobframework | |||
package constants |
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.
Because of avoiding the import cycle.
3d21608
to
3d000da
Compare
Rebased to resolve conflicts. |
@alculquicondor I've addressed your suggestions. Can you please take another look? |
pkg/cache/cache_test.go
Outdated
@@ -1293,7 +1293,7 @@ func TestCacheWorkloadOperations(t *testing.T) { | |||
} | |||
|
|||
gotError := step.operation(cache) | |||
if diff := cmp.Diff(step.wantError, messageOrEmpty(gotError)); diff != "" { | |||
if diff := cmp.Diff(step.wantError, utiltesting.MessageOrEmpty(gotError)); diff != "" { |
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.
This escaped my review lens in the past 🧐
I'm not really a fan of checking errors by comparing strings. We should do the effort of implementing Is
or exporting the relevant errors in the packages, so that we cmp.Diff
can handle the rest.
But it can be left for a follow up.
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.
I see. I will work on cache pkg at follow-up PRs.
5443584
to
b3972f3
Compare
@alculquicondor I addressed your comments. PTAL |
c24c743
to
12122e1
Compare
@alculquicondor I'm sorry I didn't immediately understand your suggestion correctly. |
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.
/approve
A couple of nits
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, tenzen-y The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
12122e1
to
658457e
Compare
@alculquicondor I fixed all nits and squashed all commit into one. |
Structured logging is typically output as JSON, so |
I see. That makes sense. |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I have rebased and addressed all suggestions. |
GitHub is under disruption... |
rebase needed 😅 |
Actually, I rebased and pushed the commit... But due to GitHub disruption, this PR isn'n updated... $ git log --one-line
da57d98 (HEAD -> framework-reconciler, origin/framework-reconciler) Use camelCase for logs
4017e3e Ignore reconciling against unmanaged child jobs in the jobframework
97639b9 (origin/main, origin/HEAD) Merge pull request #831 from epam/kustomize-deprecated-fields
68825ad Merge pull request #833 from cpanato/migrate
7444b27 Partial admission (#771)
5f02e23 Migrate away from google.com gcp project k8s-testimages |
/reopen |
@tenzen-y: Failed to re-open PR: state cannot be changed. The framework-reconciler branch was force-pushed or recreated. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This PR was broken :( |
/reopen |
@tenzen-y: Failed to re-open PR: state cannot be changed. The framework-reconciler branch was force-pushed or recreated. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
I fixed a bug that reconciles against unmanaged child batch/job.
Which issue(s) this PR fixes:
Fixes #800
Special notes for your reviewer:
Does this PR introduce a user-facing change?