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

Create and use snapshot by default in all wd_py_tests #3415

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Jan 28, 2025

This isn't as good as having actual validator coverage but it should help catch a lot of the problems we're having at validation time.

On top of #3476.

@hoodmane hoodmane added the python Issues/PRs relating to Python Workers label Jan 28, 2025
@hoodmane hoodmane requested review from a team as code owners January 28, 2025 13:58
@hoodmane hoodmane requested review from mikea and jp4a50 January 28, 2025 13:58
@hoodmane hoodmane force-pushed the hoodmane/wd-py-test-save-snapshot-variant branch from d9b7619 to bfddf71 Compare January 28, 2025 14:12
@@ -21,6 +21,8 @@ py_wd_test("env-param")
py_wd_test(
"asgi",
skip_python_flags = ["0.27.1"],
# TODO: investigate failure!
snapshot_variant = False,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to make it a bit clearer:

Suggested change
snapshot_variant = False,
snapshot_generating_variant = False,

@danlapid danlapid self-requested a review January 28, 2025 14:38
Copy link
Collaborator

@danlapid danlapid left a comment

Choose a reason for hiding this comment

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

As we spoke over chat.
Let's instead add a variant that generates the snapshot and then uses it to run the test to actually test e2e behaviour.

@dom96
Copy link
Collaborator

dom96 commented Jan 28, 2025

You all probably know this already, but just to make sure we're on the same page: we already have test coverage for this in EW. The fastest way forward would be to just add the vendored worker sample in there.

Of course, creating test coverage for this in workerd is still useful and we should do it (assuming the effort required isn't too massive).

@hoodmane hoodmane force-pushed the hoodmane/wd-py-test-save-snapshot-variant branch from bfddf71 to ce54902 Compare January 30, 2025 14:30
Copy link

github-actions bot commented Jan 30, 2025

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@hoodmane hoodmane force-pushed the hoodmane/wd-py-test-save-snapshot-variant branch 3 times, most recently from efc7305 to f2be084 Compare January 31, 2025 14:13
Having these unindented lines inside of a conditional block makes
the flow control hard to read
@hoodmane hoodmane force-pushed the hoodmane/wd-py-test-save-snapshot-variant branch from f2be084 to a4781a4 Compare February 6, 2025 10:30
@hoodmane hoodmane requested review from fhanau and removed request for jp4a50 February 6, 2025 10:30
@hoodmane hoodmane changed the title Add --save-snapshot variant to all wd_py_tests Create and use snapshot by default in all wd_py_tests Feb 6, 2025
@hoodmane hoodmane force-pushed the hoodmane/wd-py-test-save-snapshot-variant branch from a4781a4 to f6b4c2c Compare February 6, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Issues/PRs relating to Python Workers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants