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

Update single-binary.yml end2end_execute #6061

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

taieeuu
Copy link
Contributor

@taieeuu taieeuu commented Nov 29, 2024

Issue

issue_6075

Why are the changes needed?

It currently calls a Makefile and then runs a script to execute Python. Ideally, we should replace make end2end_execute with a direct pytest command.

What changes were proposed in this pull request?

How was this patch tested?

github action passed

Check all the applicable boxes

  • [] I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.09%. Comparing base (92f8abb) to head (8202004).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6061      +/-   ##
==========================================
- Coverage   37.10%   37.09%   -0.01%     
==========================================
  Files        1318     1318              
  Lines      132331   132403      +72     
==========================================
+ Hits        49100    49119      +19     
- Misses      78959    79011      +52     
- Partials     4272     4273       +1     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.10% <ø> (ø)
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 62.29% <ø> (ø)
unittests-flyteidl 7.23% <ø> (ø)
unittests-flyteplugins 53.82% <ø> (ø)
unittests-flytepropeller 42.60% <ø> (-0.03%) ⬇️
unittests-flytestdlib 57.54% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@taieeuu taieeuu changed the title [ WIP ] Update single-binary.yml end2end_execute Update single-binary.yml end2end_execute Dec 3, 2024
Comment on lines 140 to 141
# assert flytesnacks_release_tag == "v1.0.0"
# assert config_file_path == "/path/to/config.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove those?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay ! Thank you ~


if __name__ == "__main__":
cli()
return results
Copy link
Contributor

Choose a reason for hiding this comment

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

Tests shouldn't really return anything. Can you instead assert on results?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay ! Thank you for your review ~

@@ -152,7 +148,6 @@ def run(
)
r = requests.get(manifest_url)
parsed_manifest = r.json()
workflow_groups = []
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we removing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed that the workflow_groups parameter is immediately reassigned in the next line, so I just think it might not need to be repeated.

"test_project_name": pytestconfig.getoption("--test_project_name"),
"test_project_domain": pytestconfig.getoption("--test_project_domain"),
"cluster_pool_name": pytestconfig.getoption("--cluster_pool_name"),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can you add a newline?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay ! Thank you for your review. ~

if return_non_zero_on_failure:
for result in results:
if result["status"] not in ("passing", "coming soon"):
sys.exit(1)

pytest.fail("Workflow execution failed")
Copy link
Contributor

Choose a reason for hiding this comment

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

what happens if multiple workflows fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it to run all the tests and then print out any error messages.

@Future-Outlier Future-Outlier merged commit 9155409 into flyteorg:master Dec 6, 2024
51 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants