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

[Controller] Scheduled workflow supports catch up false #3073

Merged
merged 12 commits into from
Feb 20, 2020

Conversation

Bobgy
Copy link
Contributor

@Bobgy Bobgy commented Feb 13, 2020

Backend + controller part of #3055.
Will add UI integration in separate PR.

UPDATE, I verified some basic scenarios in a real cluster.

  • When scheduling a periodic job that starts and ends in the past, only one run will be scheduled.
  • When pausing a cron job right after setting it, then reenable after some periods, the first few schedules are skipped.

/cc @hongye-sun
/assign @jingzhang36
/assign @IronPan


This change is Reviewable

backend/api/job.proto Outdated Show resolved Hide resolved
@IronPan
Copy link
Member

IronPan commented Feb 13, 2020

/lgtm

@IronPan
Copy link
Member

IronPan commented Feb 13, 2020

BTW this is a code path that we lack backend integration tests. Not specific to this change but it would be nice to have a test coverage so we don't need manual test in the future.

// Optional input field. Whether the job should catch up if behind schedule.
// If false, the job will only schedule the latest interval if behind schedule.
// If true, the job will catch up on each past interval.
bool catchup = 17;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a way to specify a field in proto as default to true?
Because true is existing behavior, if this becomes default to false, then it will be a breaking change.

Copy link
Member

Choose a reason for hiding this comment

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

I can't think of any way other than call it skip_backfill and reverse the logic?

Also do we need to expose this from UI? via something like a checkbox. If so I think you could choose the default value of such widgets.

Copy link
Contributor Author

@Bobgy Bobgy Feb 14, 2020

Choose a reason for hiding this comment

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

Yes, we can handle default logic in UI, but I kind of worry someone is calling that from python clients / http endpoints.

I'll first change the field to noCatchup then, unless we can figure out a solution.

@Bobgy
Copy link
Contributor Author

Bobgy commented Feb 14, 2020

BTW this is a code path that we lack backend integration tests. Not specific to this change but it would be nice to have a test coverage so we don't need manual test in the future.

I see, I will try adding some integration tests too.

@k8s-ci-robot k8s-ci-robot removed the lgtm label Feb 14, 2020
@Bobgy
Copy link
Contributor Author

Bobgy commented Feb 14, 2020

@IronPan Do you think integration tests should block this PR?
If not, I've verified this manually, so we can merge and I will add integration tests in a separate PR.

@IronPan
Copy link
Member

IronPan commented Feb 19, 2020

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: IronPan

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Bobgy
Copy link
Contributor Author

Bobgy commented Feb 20, 2020

/retest

3 similar comments
@Bobgy
Copy link
Contributor Author

Bobgy commented Feb 20, 2020

/retest

@Bobgy
Copy link
Contributor Author

Bobgy commented Feb 20, 2020

/retest

@Bobgy
Copy link
Contributor Author

Bobgy commented Feb 20, 2020

/retest

@k8s-ci-robot k8s-ci-robot merged commit 74a8178 into kubeflow:master Feb 20, 2020
@Bobgy Bobgy deleted the swf_catch_up_false branch February 20, 2020 03:20
Jeffwan pushed a commit to Jeffwan/pipelines that referenced this pull request Dec 9, 2020
* GetNextScheduledEpochNoCatchup implementation

* Add tests for cron schedule nocatchup

* Add tests for periodic schedule and fix a corner case

* Integrate no catchup behavior in swf controller

* Update job api proto

* Regenerate backend client

* Pass catchup parameter in backend api

* Rename proto field to no_catchup, so that it has backward compatible default value

* Update generated backend api

* Use no_catchup field instead

* Add some comments
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.

4 participants