Skip to content

Commit 2ff4195

Browse files
committed
Merge remote-tracking branch 'origin' into flyte-propeller-manager-resources
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
2 parents e1e8b88 + 7aeaa26 commit 2ff4195

File tree

160 files changed

+7567
-5169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+7567
-5169
lines changed

.github/workflows/single-binary.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ jobs:
159159
with:
160160
python-version: "3.12"
161161
- uses: unionai/flytectl-setup-action@v0.0.3
162+
with:
163+
version: '0.9.2'
162164
- name: Setup sandbox
163165
run: |
164166
mkdir -p ~/.flyte/sandbox
@@ -197,6 +199,9 @@ jobs:
197199
--version ${{ env.FLYTESNACKS_VERSION }} \
198200
flytesnacks/$line;
199201
done < flytesnacks/flyte_tests.txt
202+
- name: Install Pytest
203+
run: |
204+
pip install pytest
200205
- name: End2End
201206
run: |
202207
make end2end_execute

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ docs/examples
3838
docs/_src
3939
docs/_projects
4040
docs/tests
41+
empty-config.yaml

CHANGELOG/CHANGELOG-v1.14.0.md

Lines changed: 207 additions & 0 deletions
Large diffs are not rendered by default.

CHANGELOG/CHANGELOG-v1.14.1.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Flyte 1.14.1 Release Notes
2+
3+
* Update flytestdlib and affected tools (copilot) for missing config.
4+
5+
## What's Changed
6+
* docs: Refactor merge sort code example to use literalinclude by @davidlin20dev in https://github.com/flyteorg/flyte/pull/6091
7+
* [DOCS] Using ImageSpec in ContainerTask by @machichima in https://github.com/flyteorg/flyte/pull/6095
8+
* Eager doc updates by @wild-endeavor in https://github.com/flyteorg/flyte/pull/6099
9+
* Revert "fix: return the config file not found error" by @eapolinario in https://github.com/flyteorg/flyte/pull/6100
10+
* Remove notes on deprecated Batch size by @wild-endeavor in https://github.com/flyteorg/flyte/pull/6102
11+
* Upstream: Add labels to published execution events by @katrogan in https://github.com/flyteorg/flyte/pull/6104
12+
* Fix: Make distributed error aggregation opt-in by @fg91 in https://github.com/flyteorg/flyte/pull/6103
13+
* Add default labels and annotations to Ray worker pods too. by @katrogan in https://github.com/flyteorg/flyte/pull/6107
14+
* Fix: Remove the default search dialog if it exists (on CMD + K) by @chmod77 in https://github.com/flyteorg/flyte/pull/6106
15+
16+
## New Contributors
17+
* @chmod77 made their first contribution in https://github.com/flyteorg/flyte/pull/6106
18+
19+
**Full Changelog**: https://github.com/flyteorg/flyte/compare/v1.14.0...v1.14.1

README.md

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

boilerplate/flyte/end2end/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
end2end_execute: export FLYTESNACKS_PRIORITIES ?= P0
88
end2end_execute: export FLYTESNACKS_VERSION ?= $(shell curl --silent "https://api.github.com/repos/flyteorg/flytesnacks/releases/latest" | jq -r .tag_name)
99
end2end_execute:
10-
./boilerplate/flyte/end2end/end2end.sh ./boilerplate/flyte/end2end/functional-test-config.yaml --return_non_zero_on_failure
11-
10+
pytest ./boilerplate/flyte/end2end/test_run.py \
11+
--flytesnacks_release_tag=$(FLYTESNACKS_VERSION) \
12+
--priorities=$(FLYTESNACKS_PRIORITIES) \
13+
--config_file=./boilerplate/flyte/end2end/functional-test-config.yaml \
14+
--return_non_zero_on_failure
15+
1216
.PHONY: k8s_integration_execute
1317
k8s_integration_execute:
1418
echo "pass"

boilerplate/flyte/end2end/conftest.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import pytest
2+
3+
def pytest_addoption(parser):
4+
parser.addoption("--flytesnacks_release_tag", required=True)
5+
parser.addoption("--priorities", required=True)
6+
parser.addoption("--config_file", required=True)
7+
parser.addoption(
8+
"--return_non_zero_on_failure",
9+
action="store_true",
10+
default=False,
11+
help="Return a non-zero exit status if any workflow fails",
12+
)
13+
parser.addoption(
14+
"--terminate_workflow_on_failure",
15+
action="store_true",
16+
default=False,
17+
help="Abort failing workflows upon exit",
18+
)
19+
parser.addoption(
20+
"--test_project_name",
21+
default="flytesnacks",
22+
help="Name of project to run functional tests on"
23+
)
24+
parser.addoption(
25+
"--test_project_domain",
26+
default="development",
27+
help="Name of domain in project to run functional tests on"
28+
)
29+
parser.addoption(
30+
"--cluster_pool_name",
31+
required=False,
32+
type=str,
33+
default=None,
34+
)
35+
36+
@pytest.fixture
37+
def setup_flytesnacks_env(pytestconfig):
38+
return {
39+
"flytesnacks_release_tag": pytestconfig.getoption("--flytesnacks_release_tag"),
40+
"priorities": pytestconfig.getoption("--priorities"),
41+
"config_file": pytestconfig.getoption("--config_file"),
42+
"return_non_zero_on_failure": pytestconfig.getoption("--return_non_zero_on_failure"),
43+
"terminate_workflow_on_failure": pytestconfig.getoption("--terminate_workflow_on_failure"),
44+
"test_project_name": pytestconfig.getoption("--test_project_name"),
45+
"test_project_domain": pytestconfig.getoption("--test_project_domain"),
46+
"cluster_pool_name": pytestconfig.getoption("--cluster_pool_name"),
47+
}

boilerplate/flyte/end2end/end2end.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

boilerplate/flyte/end2end/run-tests.py renamed to boilerplate/flyte/end2end/test_run.py

Lines changed: 22 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import traceback
66
from typing import Dict, List, Optional
77

8-
import click
8+
import pytest
99
import requests
1010
from flytekit.configuration import Config
1111
from flytekit.models.core.execution import WorkflowExecutionPhase
@@ -15,7 +15,6 @@
1515
WAIT_TIME = 10
1616
MAX_ATTEMPTS = 200
1717

18-
1918
def execute_workflow(
2019
remote: FlyteRemote,
2120
version,
@@ -27,7 +26,6 @@ def execute_workflow(
2726
wf = remote.fetch_workflow(name=workflow_name, version=version)
2827
return remote.execute(wf, inputs=inputs, wait=False, cluster_pool=cluster_pool_name)
2928

30-
3129
def executions_finished(
3230
executions_by_wfgroup: Dict[str, List[FlyteWorkflowExecution]]
3331
) -> bool:
@@ -36,7 +34,6 @@ def executions_finished(
3634
return False
3735
return True
3836

39-
4037
def sync_executions(
4138
remote: FlyteRemote, executions_by_wfgroup: Dict[str, List[FlyteWorkflowExecution]]
4239
):
@@ -50,13 +47,11 @@ def sync_executions(
5047
print("GOT TO THE EXCEPT")
5148
print("COUNT THIS!")
5249

53-
5450
def report_executions(executions_by_wfgroup: Dict[str, List[FlyteWorkflowExecution]]):
5551
for executions in executions_by_wfgroup.values():
5652
for execution in executions:
5753
print(execution)
5854

59-
6055
def schedule_workflow_groups(
6156
tag: str,
6257
workflow_groups: List[str],
@@ -65,10 +60,6 @@ def schedule_workflow_groups(
6560
parsed_manifest: List[dict],
6661
cluster_pool_name: Optional[str] = None,
6762
) -> Dict[str, bool]:
68-
"""
69-
Schedule workflows executions for all workflow groups and return True if all executions succeed, otherwise
70-
return False.
71-
"""
7263
executions_by_wfgroup = {}
7364
# Schedule executions for each workflow group,
7465
for wf_group in workflow_groups:
@@ -120,30 +111,32 @@ def schedule_workflow_groups(
120111
results[wf_group] = len(non_succeeded_executions) == 0
121112
return results
122113

123-
124114
def valid(workflow_group, parsed_manifest):
125115
"""
126116
Return True if a workflow group is contained in parsed_manifest,
127117
False otherwise.
128118
"""
129119
return workflow_group in set(wf_group["name"] for wf_group in parsed_manifest)
130120

121+
def test_run(setup_flytesnacks_env):
122+
123+
env = setup_flytesnacks_env
124+
125+
flytesnacks_release_tag = env["flytesnacks_release_tag"]
126+
priorities = env["priorities"]
127+
config_file_path = env["config_file"]
128+
terminate_workflow_on_failure = env["terminate_workflow_on_failure"]
129+
test_project_name = env["test_project_name"]
130+
test_project_domain = env["test_project_domain"]
131+
cluster_pool_name = env["cluster_pool_name"]
132+
return_non_zero_on_failure = env["return_non_zero_on_failure"]
131133

132-
def run(
133-
flytesnacks_release_tag: str,
134-
priorities: List[str],
135-
config_file_path,
136-
terminate_workflow_on_failure: bool,
137-
test_project_name: str,
138-
test_project_domain: str,
139-
cluster_pool_name: Optional[str] = None,
140-
) -> List[Dict[str, str]]:
141134
remote = FlyteRemote(
142135
Config.auto(config_file=config_file_path),
143136
test_project_name,
144137
test_project_domain,
145138
)
146-
139+
147140
# For a given release tag and priority, this function filters the workflow groups from the flytesnacks
148141
# manifest file. For example, for the release tag "v0.2.224" and the priority "P0" it returns [ "core" ].
149142
manifest_url = (
@@ -210,75 +203,15 @@ def run(
210203
"color": background_color,
211204
}
212205
results.append(result)
213-
return results
214-
215-
216-
@click.command()
217-
@click.argument("flytesnacks_release_tag")
218-
@click.argument("priorities")
219-
@click.argument("config_file")
220-
@click.option(
221-
"--return_non_zero_on_failure",
222-
default=False,
223-
is_flag=True,
224-
help="Return a non-zero exit status if any workflow fails",
225-
)
226-
@click.option(
227-
"--terminate_workflow_on_failure",
228-
default=False,
229-
is_flag=True,
230-
help="Abort failing workflows upon exit",
231-
)
232-
@click.option(
233-
"--test_project_name",
234-
default="flytesnacks",
235-
type=str,
236-
is_flag=False,
237-
help="Name of project to run functional tests on",
238-
)
239-
@click.option(
240-
"--test_project_domain",
241-
default="development",
242-
type=str,
243-
is_flag=False,
244-
help="Name of domain in project to run functional tests on",
245-
)
246-
@click.argument(
247-
"cluster_pool_name",
248-
required=False,
249-
type=str,
250-
default=None,
251-
)
252-
def cli(
253-
flytesnacks_release_tag,
254-
priorities,
255-
config_file,
256-
return_non_zero_on_failure,
257-
terminate_workflow_on_failure,
258-
test_project_name,
259-
test_project_domain,
260-
cluster_pool_name,
261-
):
262-
print(f"return_non_zero_on_failure={return_non_zero_on_failure}")
263-
results = run(
264-
flytesnacks_release_tag,
265-
priorities,
266-
config_file,
267-
terminate_workflow_on_failure,
268-
test_project_name,
269-
test_project_domain,
270-
cluster_pool_name,
271-
)
272206

273-
# Write a json object in its own line describing the result of this run to stdout
274207
print(f"Result of run:\n{json.dumps(results)}")
275208

276-
# Return a non-zero exit code if core fails
277209
if return_non_zero_on_failure:
278-
for result in results:
279-
if result["status"] not in ("passing", "coming soon"):
280-
sys.exit(1)
281-
282-
283-
if __name__ == "__main__":
284-
cli()
210+
fail_results = [result for result in results if result["status"] not in ("passing", "coming soon")]
211+
if fail_results:
212+
fail_msgs = [
213+
f"Workflow '{r['label']}' failed with status '{r['status']}'" for r in fail_results
214+
]
215+
pytest.fail("\n".join(fail_msgs))
216+
217+
assert results == [{"label": "core", "status": "passing", "color": "green"}]

charts/flyte-binary/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Chart for basic single Flyte executable deployment
4141
| configuration.auth.oidc.clientId | string | `""` | |
4242
| configuration.auth.oidc.clientSecret | string | `""` | |
4343
| configuration.co-pilot.image.repository | string | `"cr.flyte.org/flyteorg/flytecopilot"` | |
44-
| configuration.co-pilot.image.tag | string | `"v1.13.2"` | |
44+
| configuration.co-pilot.image.tag | string | `"v1.14.1"` | |
4545
| configuration.database.dbname | string | `"flyte"` | |
4646
| configuration.database.host | string | `"127.0.0.1"` | |
4747
| configuration.database.options | string | `"sslmode=disable"` | |
@@ -64,6 +64,7 @@ Chart for basic single Flyte executable deployment
6464
| configuration.logging.plugins.stackdriver.enabled | bool | `false` | |
6565
| configuration.logging.plugins.stackdriver.templateUri | string | `""` | |
6666
| configuration.propeller.createCRDs | bool | `true` | |
67+
| configuration.propeller.literalOffloadingConfigEnabled | bool | `true` | |
6768
| configuration.storage.metadataContainer | string | `"my-organization-flyte-container"` | |
6869
| configuration.storage.provider | string | `"s3"` | |
6970
| configuration.storage.providerConfig.azure.account | string | `"storage-account-name"` | |

charts/flyte-binary/templates/configmap.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ data:
4141
level: {{ default 1 .Values.configuration.logging.level }}
4242
propeller:
4343
create-flyteworkflow-crd: {{ .Values.configuration.propeller.createCRDs }}
44+
{{- if .Values.configuration.propeller.literalOffloadingConfigEnabled }}
45+
literal-offloading-config:
46+
enabled: true
47+
{{- end}}
4448
webhook:
4549
certDir: /var/run/flyte/certs
4650
localCert: true

charts/flyte-binary/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ configuration:
167167
# repository CoPilot sidecar image repository
168168
repository: cr.flyte.org/flyteorg/flytecopilot # FLYTECOPILOT_IMAGE
169169
# tag CoPilot sidecar image tag
170-
tag: v1.13.2 # FLYTECOPILOT_TAG
170+
tag: v1.14.1 # FLYTECOPILOT_TAG
171171
# agentService Flyte Agent configuration
172172
agentService:
173173
defaultAgent:
@@ -180,6 +180,9 @@ configuration:
180180
propeller:
181181
# createCRDs If true, Propeller will install CRDs at runtime, if false, CRDs will be installed during helm install
182182
createCRDs: true
183+
# enableOffloading If true, big literals are offloaded to blob store
184+
literalOffloadingConfigEnabled: true
185+
183186
# externalConfigMap Specify an existing, external ConfigMap to use as configuration for Flyte
184187
# If set, no Flyte configuration will be generated by this chart
185188
externalConfigMap: ""

0 commit comments

Comments
 (0)