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(k8s): introduce new flag waitForJobs to wait for k8 jobs #4611

Merged
merged 5 commits into from
Jun 30, 2023

Conversation

shumailxyz
Copy link
Contributor

@shumailxyz shumailxyz commented Jun 13, 2023

What this PR does / why we need it:
Introduces a new flag waitForJobs that can be set on the kubernetes deploy to wait for the jobs to be finished.

example:

kind: Deploy
type: kubernetes
name: job-long
spec:
  waitForJobs: true
  files:
    - ./job-long.yaml

Which issue(s) this PR fixes:

Fixes #4557

Special notes for your reviewer:

@edvald
Copy link
Collaborator

edvald commented Jun 18, 2023

I think this is sensible behavior but this is technically a breaking change. It's quite possible that there are usages which rely on the current behavior. You might argue that we should still do this given the state of transition to 0.13 across the user base, but it's debatable.

An alternative would be to add a flag (e.g. spec.waitForJobs: true) to control the behavior more explicitly. If we do that, we can make a note to make the breaking change in 0.14, basically flipping the default value of that field.

If we do actually choose to make the breaking change, that would need to be clearly documented in 0.13 notes and migration guide etc.

@shumailxyz shumailxyz force-pushed the feat/wait-jobs branch 2 times, most recently from a96861f to 211e597 Compare June 27, 2023 10:21
@shumailxyz shumailxyz changed the title feat(kubernetes): wait for kubernetes jobs feat(k8s): introduce new flag waitForJobs to wait for kubernetes jobs Jun 27, 2023
@shumailxyz shumailxyz changed the title feat(k8s): introduce new flag waitForJobs to wait for kubernetes jobs feat(k8s): introduce new flag waitForJobs to wait for k8 jobs Jun 27, 2023
@shumailxyz shumailxyz marked this pull request as ready for review June 27, 2023 12:29
@shumailxyz shumailxyz requested a review from a team June 27, 2023 12:29
Copy link
Collaborator

@vvagaytsev vvagaytsev left a comment

Choose a reason for hiding this comment

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

👍

@shumailxyz shumailxyz merged commit 6eae3a6 into main Jun 30, 2023
@shumailxyz shumailxyz deleted the feat/wait-jobs branch June 30, 2023 16:21
ShankyJS pushed a commit that referenced this pull request Jul 10, 2023
* feat(kubernetes): wait for kubernetes jobs

* feat(k8s): introduce waitForJobs flag to control jobs behavior

* chore: update docs

* test: fix broken tests

* chore: address pr comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Kubernetes deploy does should wait for kubernetes jobs
3 participants