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

fix: logic to interrupt a k8sjob logs as soon as it fails #8847

Merged
merged 2 commits into from
Jun 8, 2023

Conversation

renzodavid9
Copy link
Contributor

Fixes: #8839

Description
This PR adds the logic to interrupt the k8sjob custom actions log when a task fails, so we don't see the logs of a job that shouldn't be running. Also, the change in how we do the delete is changing: now we delete first the job and then its pod; before, we could have cases when we kill the pod, and before killing the job, it created a new pod.

@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #8847 (86c47aa) into main (290280e) will decrease coverage by 6.55%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main    #8847      +/-   ##
==========================================
- Coverage   70.48%   63.94%   -6.55%     
==========================================
  Files         515      620     +105     
  Lines       23150    31463    +8313     
==========================================
+ Hits        16317    20118    +3801     
- Misses       5776     9841    +4065     
- Partials     1057     1504     +447     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 40 more

... and 410 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@renzodavid9 renzodavid9 added kokoro:run runs the kokoro jobs on a PR kokoro:force-run forces a kokoro re-run on a PR and removed kokoro:run runs the kokoro jobs on a PR labels Jun 3, 2023
@kokoro-team kokoro-team removed the kokoro:force-run forces a kokoro re-run on a PR label Jun 3, 2023
@renzodavid9 renzodavid9 marked this pull request as ready for review June 5, 2023 14:06
@renzodavid9 renzodavid9 requested review from plumpy and ericzzzzzzz June 5, 2023 14:07
@renzodavid9 renzodavid9 merged commit c7c72a1 into GoogleContainerTools:main Jun 8, 2023
renzodavid9 added a commit to renzodavid9/skaffold that referenced this pull request Jun 8, 2023
…ainerTools#8847)

* fix: logic to interrupt a k8sjob logs as soon as it fails and change in delete order, now the job is deleted before its pods

* test: integration tests to check when a log should not appear in the output

(cherry picked from commit c7c72a1)
renzodavid9 added a commit to renzodavid9/skaffold that referenced this pull request Jun 8, 2023
…ainerTools#8847)

* fix: logic to interrupt a k8sjob logs as soon as it fails and change in delete order, now the job is deleted before its pods

* test: integration tests to check when a log should not appear in the output

(cherry picked from commit c7c72a1)
renzodavid9 added a commit to renzodavid9/skaffold that referenced this pull request Jun 9, 2023
…ainerTools#8847)

* fix: logic to interrupt a k8sjob logs as soon as it fails and change in delete order, now the job is deleted before its pods

* test: integration tests to check when a log should not appear in the output

(cherry picked from commit c7c72a1)
renzodavid9 added a commit that referenced this pull request Jun 9, 2023
)

* fix: logic to interrupt a k8sjob logs as soon as it fails and change in delete order, now the job is deleted before its pods

* test: integration tests to check when a log should not appear in the output

(cherry picked from commit c7c72a1)
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.

[CustomActions] K8s - logs can get stuck when running with timeout
3 participants