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

Cron schedule with offset #188

Merged
merged 18 commits into from
Oct 4, 2020
Merged

Conversation

honnix
Copy link
Member

@honnix honnix commented Sep 30, 2020

TL;DR

Support validate and propagate CronScheduleWithOffset.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

Motivation: Why do you think this is important?
When integrating with our scheduler Styx, we will need to extend the semantics of schedule to support Styx cron syntax, cron aliases, as well as offset.

Goal: What should the final outcome look like, ideally?
Scheduleprotobuf definition is extended to support Styx style schedule.

Describe alternatives you've considered
We tried reusing existing cron but the syntax is a bit different and flytekit doesn't support Styx style cron aliases; and more importantly, we need to support offset which is one the most important concepts in Styx.

More details can be found in this issue.

Related and depended change in flyteidl is flyteorg/flyteidl#83.

Tracking Issue

flyteorg/flyte#529

Follow-up issue

@kumare3
Copy link
Contributor

kumare3 commented Oct 1, 2020

cc @wild-endeavor

@@ -12,7 +12,6 @@ coverage==5.3 # via -r dev-requirements.in
flake8-black==0.2.1 # via -r dev-requirements.in
flake8-isort==4.0.0 # via -r dev-requirements.in
flake8==3.8.3 # via -r dev-requirements.in, flake8-black, flake8-isort
importlib-metadata==1.7.0 # via -c requirements.txt, flake8, pluggy, pytest
Copy link
Member Author

Choose a reason for hiding this comment

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

I ran pip-compile dev-requirements.in.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe because I ran it under Python 3.8? I can revert the change if seems risky.

@@ -7,30 +7,31 @@
-e file:.#egg=flytekit # via -r requirements.in
ansiwrap==0.8.4 # via papermill
appdirs==1.4.4 # via black
appnope==0.1.0 # via ipykernel, ipython
Copy link
Member Author

Choose a reason for hiding this comment

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

I ran pip-compile requirements.in.

Copy link
Contributor

Choose a reason for hiding this comment

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

same as if you run make requirements right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting. Actually not. First of all, I had to fix Makefile because of _install-piptools that should be install-piptools; then requirements.txt file header became:

#
# This file is autogenerated by pip-compile
# To update, run:
#
#    make requirements.txt
#

I will make a commit to reflect the difference.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see only a few things been upgraded because of define PIP_COMPILE.

@honnix
Copy link
Member Author

honnix commented Oct 2, 2020

@wild-endeavor I think this is ready for review. Please take a look and check whether this change would break backward compatibility in some way. Thanks a lot.

flytekit/__init__.py Outdated Show resolved Hide resolved
Copy link
Contributor

@wild-endeavor wild-endeavor left a comment

Choose a reason for hiding this comment

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

Let's see... it's a beta anyways - if anything weird happens we can take a look at the dependency changes.

@honnix
Copy link
Member Author

honnix commented Oct 4, 2020

Thanks a lot for approving this!

@honnix honnix merged commit 5b5502b into flyteorg:master Oct 4, 2020
@honnix honnix deleted the cron-schedule-with-offset branch October 4, 2020 18:27
max-hoffman pushed a commit to dolthub/flytekit that referenced this pull request May 11, 2021
* Extend `CronSchedule` to support `schedule` and `offset` added in flyteorg/flyteidl#83

Co-authored-by: tnsetting <[email protected]>
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.

4 participants