Skip to content

Commit 660b9bc

Browse files
committed
Merge branch 'master' of github.com:flyteorg/flyte into agents-protocol-updates
2 parents 7803f8b + 55a67f2 commit 660b9bc

File tree

9 files changed

+184
-41
lines changed

9 files changed

+184
-41
lines changed

.github/workflows/flyteidl-release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
run:
3434
working-directory: flyteidl
3535
steps:
36+
- uses: actions/checkout@v2
3637
- uses: actions/setup-node@v1
3738
with:
3839
node-version: "12.x"

CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Automatically request docs team for docs PR review
2+
/docs/ @neverett @ppiegaze
3+

docs/concepts/schedules.rst

+101-19
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,116 @@ Let's now look at how schedules can be defined through cron_expression_ or rate_
2424

2525
Cron Expression
2626
---------------
27-
Cron expression strings use :ref:`this <cron_expression_table>` syntax. They are validated at launch plan registration time.
28-
29-
.. _rate_unit:
27+
Cron expression strings use the syntax shown below. They are validated at launch plan registration time.
3028

3129
Format
3230
------
3331

3432
A cron expression represents a set of times, with the help of 5 space-separated fields.
3533

36-
.. _cron_expression_table:
37-
38-
+--------------+------------+-----------------+----------------------------+
39-
| Field name | Mandatory? | Allowed values | Allowed special characters |
40-
+==============+============+=================+============================+
41-
| Minutes | Yes | 0-59 | * / , - |
42-
+--------------+------------+-----------------+----------------------------+
43-
| Hours | Yes | 0-23 | * / , - |
44-
+--------------+------------+-----------------+----------------------------+
45-
| Day of month | Yes | 1-31 | * / , - ? |
46-
+--------------+------------+-----------------+----------------------------+
47-
| Month | Yes | 1-12 or JAN-DEC | * / , - |
48-
+--------------+------------+-----------------+----------------------------+
49-
| Day of week | Yes | 0-6 or SUN-SAT | * / , - ? |
50-
+--------------+------------+-----------------+----------------------------+
34+
.. raw:: html
35+
36+
<table id="cron_expression_table" class="docutils align-default">
37+
<colgroup>
38+
<col style="width: 20%">
39+
<col style="width: 17%">
40+
<col style="width: 24%">
41+
<col style="width: 39%">
42+
</colgroup>
43+
<thead>
44+
<tr class="row-odd">
45+
<th class="head">
46+
<p>Field name</p>
47+
</th>
48+
<th class="head">
49+
<p>Required</p>
50+
</th>
51+
<th class="head">
52+
<p>Allowed values</p>
53+
</th>
54+
<th class="head">
55+
<p>Allowed special characters</p>
56+
</th>
57+
</tr>
58+
</thead>
59+
<tbody>
60+
<tr class="row-even">
61+
<td>
62+
<p>Minutes</p>
63+
</td>
64+
<td>
65+
<p>Yes</p>
66+
</td>
67+
<td>
68+
<p>0-59</p>
69+
</td>
70+
<td>
71+
<p>* / , -</p>
72+
</td>
73+
</tr>
74+
<tr class="row-odd">
75+
<td><p>Hours</p></td>
76+
<td>
77+
<p>Yes</p>
78+
</td>
79+
<td>
80+
<p>0-23</p>
81+
</td>
82+
<td>
83+
<p>* / , -</p>
84+
</td>
85+
</tr>
86+
<tr class="row-even">
87+
<td>
88+
<p>Day of month</p>
89+
</td>
90+
<td>
91+
<p>Yes</p>
92+
</td>
93+
<td>
94+
<p>1-31</p><
95+
</td>
96+
<td>
97+
<p>/ , - ?</p>
98+
</td>
99+
</tr>
100+
<tr class="row-odd">
101+
<td>
102+
<p>Month</p>
103+
</td>
104+
<td>
105+
<p>Yes</p>
106+
</td>
107+
<td>
108+
<p>1-12 or JAN-DEC</p>
109+
</td>
110+
<td>
111+
<p>* / , -</p>
112+
</td>
113+
</tr>
114+
<tr class="row-even">
115+
<td>
116+
<p>Day of week</p>
117+
</td>
118+
<td>
119+
<p>Yes</p>
120+
</td>
121+
<td>
122+
<p>0-6 or SUN-SAT</p>
123+
</td>
124+
<td>
125+
<p>* / , - ?</p>
126+
</td>
127+
</tr>
128+
</tbody>
129+
</table>
51130

52131
**Note**: The 'Month' and 'Day of week' fields are case insensitive.
53132

54133

55134
Cron schedules
56135
--------------
57-
An incorrect cron schedule expression leads to a failure in triggering the schedule. :ref:`Here <cron_expression_table>` is a table that shows the format of a cron expression.
136+
An incorrect cron schedule expression leads to a failure in triggering the schedule. :ref:`Here <cron_expression>` is a table that shows the format of a cron expression.
58137

59138
Below is another example:
60139

@@ -73,6 +152,8 @@ Below is another example:
73152
)
74153
75154
155+
.. _fixed_rate:
156+
76157
Fixed rate schedules
77158
----------------------
78159
Instead of cron schedules, fixed rate schedules can be used.
@@ -95,6 +176,7 @@ Below is an example with duration in `days`.
95176
96177
)
97178

179+
.. _rate_unit:
98180

99181
Rate Unit
100182
---------

docs/deployment/deployment/cloud_simple.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Flyte in on-premises infrastructure
120120
***********************************
121121

122122
Sometimes, it's also helpful to be able to set up a Flyte environment in an on-premises Kubernetes environment or even on a laptop for testing and development purposes.
123-
Check out `this community-maintained tutorial <https://github.com/davidmirror-ops/flyte-the-hard-way/blob/main/docs/on-premises/001-configure-local-k8s.md>`__ to learn how to setup the required dependencies and deploy the `flyte-binary` chart to a local Kubernetes cluster.
123+
Check out `this community-maintained tutorial <https://github.com/davidmirror-ops/flyte-the-hard-way/blob/main/docs/on-premises/single-node/001-configure-single-node-k8s.md>`__ to learn how to setup the required dependencies and deploy the `flyte-binary` chart to a local Kubernetes cluster.
124124

125125

126126
*************

docs/quickstart_guide.md

+16
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33

44
In this guide, you will create and run a Flyte workflow in a local Python environment to generate the output "Hello, world!"
55

6+
````{dropdown} Try Flyte in your browser
7+
:title: text-muted
8+
:animate: fade-in-slide-down
9+
10+
```{link-button} https://sandbox.union.ai/
11+
---
12+
classes: try-hosted-flyte btn-warning btn-block
13+
text: Hosted Flyte sandbox
14+
---
15+
```
16+
```{div} text-muted
17+
*Courtesy of [Union.ai](https://www.union.ai/)*
18+
```
19+
````
20+
21+
622
## Prerequisites
723

824
* [Install Python 3.8x or higher](https://www.python.org/downloads/)

flyteadmin/pkg/manager/impl/validation/launch_plan_validator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func ValidateLaunchPlan(ctx context.Context,
6666

6767
func validateSchedule(request admin.LaunchPlanCreateRequest, expectedInputs *core.ParameterMap) error {
6868
schedule := request.GetSpec().GetEntityMetadata().GetSchedule()
69-
if schedule.GetCronExpression() != "" || schedule.GetRate() != nil {
69+
if schedule.GetCronExpression() != "" || schedule.GetRate() != nil || schedule.GetCronSchedule() != nil {
7070
for key, value := range expectedInputs.Parameters {
7171
if value.GetRequired() && key != schedule.GetKickoffTimeInputArg() {
7272
return errors.NewFlyteAdminErrorf(

flyteadmin/pkg/manager/impl/validation/launch_plan_validator_test.go

+18-4
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ func TestValidateSchedule_NoSchedule(t *testing.T) {
297297
}
298298

299299
func TestValidateSchedule_ArgNotFixed(t *testing.T) {
300-
request := testutils.GetLaunchPlanRequestWithDeprecatedCronSchedule("* * * * * *")
301300
inputMap := &core.ParameterMap{
302301
Parameters: map[string]*core.Parameter{
303302
"foo": {
@@ -310,9 +309,24 @@ func TestValidateSchedule_ArgNotFixed(t *testing.T) {
310309
},
311310
},
312311
}
313-
314-
err := validateSchedule(request, inputMap)
315-
assert.NotNil(t, err)
312+
t.Run("with deprecated cron expression", func(t *testing.T) {
313+
request := testutils.GetLaunchPlanRequestWithDeprecatedCronSchedule("* * * * * *")
314+
315+
err := validateSchedule(request, inputMap)
316+
assert.NotNil(t, err)
317+
})
318+
t.Run("with rate", func(t *testing.T) {
319+
request := testutils.GetLaunchPlanRequestWithFixedRateSchedule(2, admin.FixedRateUnit_HOUR)
320+
321+
err := validateSchedule(request, inputMap)
322+
assert.NotNil(t, err)
323+
})
324+
t.Run("with cron schedule", func(t *testing.T) {
325+
request := testutils.GetLaunchPlanRequestWithCronSchedule("* * * * * *")
326+
327+
err := validateSchedule(request, inputMap)
328+
assert.NotNil(t, err)
329+
})
316330
}
317331

318332
func TestValidateSchedule_KickoffTimeArgDoesNotExist(t *testing.T) {

flyteidl/MANIFEST.in

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
include NOTICE
2+
include README.md
3+
include pyproject.toml
4+
include setup.cfg
5+
include setup.py
6+
include MANIFEST.in
7+
8+
recursive-include gen/pb_python *
9+
global-exclude */__pycache__/*
10+
global-exclude *.pyc
11+
12+
recursive-exclude _templates *
13+
recursive-exclude boilerplate *
14+
recursive-exclude build *
15+
recursive-exclude clients *
16+
recursive-exclude dist *
17+
recursive-exclude docs *
18+
recursive-exclude jsonschema *
19+
recursive-exclude protos *
20+
recursive-exclude scripts *
21+
22+
recursive-exclude gen/pb_rust *
23+
recursive-exclude gen/pb-es *
24+
recursive-exclude gen/pb-go *
25+
recursive-exclude gen/pb-js *
26+
27+
exclude .golangci.yml
28+
exclude .goreleaser.yml
29+
exclude .readthedocs.yml
30+
exclude .swagger-codegen-ignore
31+
exclude CODE_OF_CONDUCT.md
32+
exclude Makefile
33+
exclude buf.gen.yaml
34+
exclude buf.work.yaml
35+
exclude conf.py
36+
exclude doc-requirements.in
37+
exclude doc-requirements.txt
38+
exclude generate_mocks.sh
39+
exclude generate_protos.sh
40+
exclude go.mod
41+
exclude go.sum
42+
exclude index.rst
43+
exclude package.json

flyteidl/pyproject.toml

-16
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,8 @@ readme = { file = "README.md", content-type = "text/markdown" }
1212
requires-python = ">=3.8,<3.13"
1313
dependencies = [
1414
'googleapis-common-protos',
15-
'protoc_gen_swagger',
1615
'protoc-gen-openapiv2',
1716
'protobuf>=4.21.1,<5.0.0',
18-
# Packages in here should rarely be pinned. This is because these
19-
# packages (at the specified version) are required for project
20-
# consuming this library. By pinning to a specific version you are the
21-
# number of projects that can consume this or forcing them to
22-
# upgrade/downgrade any dependencies pinned here in their project.
23-
#
24-
# Generally packages listed here are pinned to a major version range.
25-
#
26-
# e.g.
27-
# Python FooBar package for foobaring
28-
# pyfoobar>=1.0, <2.0
29-
#
30-
# This will allow for any consuming projects to use this library as
31-
# long as they have a version of pyfoobar equal to or greater than 1.x
32-
# and less than 2.x installed.
3317
]
3418
classifiers = [
3519
"Intended Audience :: Science/Research",

0 commit comments

Comments
 (0)