Skip to content

Conversation

julianz-
Copy link
Contributor

@julianz- julianz- commented Sep 22, 2025

This PR deal with numerous errors that arise on submitting even the smallest changes to CI.


This change is Reviewable

Copy link

codecov bot commented Sep 22, 2025

Codecov Report

❌ Patch coverage is 84.21053% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.44%. Comparing base (4f040de) to head (70bfa38).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #770      +/-   ##
==========================================
+ Coverage   79.31%   79.44%   +0.12%     
==========================================
  Files          29       29              
  Lines        4197     4277      +80     
  Branches      538      545       +7     
==========================================
+ Hits         3329     3398      +69     
- Misses        726      733       +7     
- Partials      142      146       +4     

@julianz- julianz- force-pushed the fix-builtin-wrap branch 18 times, most recently from b55e4c6 to 775d221 Compare September 23, 2025 06:43
- Fixed socket teardown errors that were thrown during connection cleanup
- Added missing __all__ declarations to server.pyi and threadpool.pyi
- Removed incorrect WIN_SOCKET_NOT_OPEN definition from makefile.pyi
- Resolved stubtest failures across multiple modules
- Fixed socket teardown errors that were thrown during connection cleanup
- Added missing __all__ declarations to server.pyi and threadpool.pyi
- Removed incorrect WIN_SOCKET_NOT_OPEN definition from makefile.pyi
- Resolved stubtest failures across multiple modules
@julianz-
Copy link
Contributor Author

I put this PR together because I couldn't get #764 to pass the CI for reasons that seemed unrelated to the code changes there.

@webknjaz
Copy link
Member

@julianz- could you send these as multiple atomic standalone PRs so it's easier to review and understand in general?

@julianz- julianz- marked this pull request as draft September 30, 2025 05:48
- pre-commit-ci-update-config # pre-commit.ci always creates a PR
pull_request:
ignore-paths: # changes to the cron workflow are triggered through it
paths-ignore: # changes to the cron workflow are triggered through it
Copy link
Member

Choose a reason for hiding this comment

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

I extracted this into main. I have this typo across a bunch of repos, actually. Good catch!

@sirosen any insight into why jsonschema didn't catch this?

Copy link

Choose a reason for hiding this comment

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

I need to work up a fix I can submit to schemastore for this, but I did... sort of figure it out.

The definition of a pull_request event mixes explicit properties with a $ref usage (the target of the JSON Schema $ref is also named "ref", which is a little quirky but fine). When $ref loading is mixed with an explicit schema, as in this case, I don't have any clear expectation about what should happen. It might be covered by the spec, but it's definitely going to trip up implementations.

The definition of "ref" looks fine at a glance:
https://github.com/SchemaStore/schemastore/blame/71c836f7a50aa0f796c990c433307dc7b87e300e/src/schemas/json/github-workflow.json#L340-L386

But I notice that it doesn't set "additionalProperties": false, and I think that's the issue. If I remove that $ref usage in a copy of the schema, I get the appropriate error.

It looks like this is the only usage site for #/definitions/ref, so I think I'll just inline it and add a test which demonstrates the issue. JSON Schema is always a headtrip! 😵‍💫

Copy link

Choose a reason for hiding this comment

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

I did end up getting a PR posted!
It ate a lot of my free time for FOSS work this evening, but I think it's worth it. There's a pretty large class of mistakes which check-jsonschema can't catch until this is fixed.

Copy link
Member

Choose a reason for hiding this comment

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

@sirosen nice, thanks!


# A mapping of markers to their descriptions allowed in strict mode:
markers =
flaky: mark a test as flaky
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be needed as it's coming from a plugin.

[testenv]
deps =
-rrequirements{/}tests.in
pytest-xdist>=3.0.0
Copy link
Member

Choose a reason for hiding this comment

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

This is already pinned to a higher version in a proper place.

PYTHONDONTWRITEBYTECODE=x
WEBTEST_INTERACTIVE=false


Copy link
Member

Choose a reason for hiding this comment

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

unrelated

raise reraised_connection_drop_exc_cls(
*generic_tls_error.args,
) from generic_tls_error
except OSError as tcp_connection_drop_error:
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why you felt the need to move this into another except-block. That makes it more complicated to follow. And AFAICS the lotig is about the same just more branchy. I was keeping it separate so that it's simple.

) from tls_connection_drop_error
except ssl.SSLError as generic_tls_error:
peer_speaks_plain_http_over_https = (
generic_tls_error.errno == ssl.SSL_ERROR_SSL
Copy link
Member

Choose a reason for hiding this comment

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

What other error codes can this case have?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants