8000 bpo-43811: Test multiple OpenSSL versions on GHA by tiran · Pull Request #25360 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43811: Test multiple OpenSSL versions on GHA #25360

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

Merged
merged 2 commits into from
Apr 13, 2021

Conversation

tiran
Copy link
Member
@tiran tiran commented Apr 12, 2021

The new checks are only executed when one or more OpenSSL-related files are modified. The checks run a handful of networking and hashing test suites. All SSL checks are optional. This PR also introduces ccache to speed up compilation. In common cases it speeds up configure and compile time from about 90 seconds to less than 30 seconds.

Signed-off-by: Christian Heimes christian@python.org

https://bugs.python.org/issue43811

Automerge-Triggered-By: GH:tiran

@tiran
Copy link
Member Author
tiran commented Apr 12, 2021

#25361 addresses the unrelated test failures.

@tiran tiran force-pushed the bpo-43811-gha-multissl branch from a741341 to 302c398 Compare April 12, 2021 11:13
strategy:
fail-fast: false
matrix:
openssl_ver: [1.0.2u, 1.1.0l, 1.1.1k, 3.0.0-alpha14]
Copy link
Member
@vstinner vstinner Apr 12, 2021

Choose a reason for hiding this comment

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

Don't we have an accepted PEP which requires OpenSSL 1.1.1 or newer?

Each additional CI increases the error rate since we still have unstable tests in asyncio and multiprocessing tests. I would prefer to not add too many CIs. At least, don't make them mandatory (allow to merge a PR even if they fail).

Rather than pre-commit CI jobs run on every since PR and at every PR update, can't we use a post-commit CI, like a buildbot worker? Issues in pre-commit are way more annoying.

cc @pablogsal @zware

Copy link
Member Author
@tiran tiran Apr 12, 2021

Choose a reason for hiding this comment

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

Don't we have an accept PEP which requires OpenSSL 1.1.1 or newer?

Yes, but the PEP applies to 3.10 only. You want OpenSSL 3.0.0 compatibility in 3.8 and 3.9, don't you?

Rather than pre-commit CI jobs run on every since PR and at every PR update, can't we use a post-commit CI, like a buildbot worker? Issues in pre-commit are way more annoying.

I need an easy and reliable way to ensure that Python works with all supported OpenSSL versions. Post-commit CI is too late.

Copy link
Member

Choose a reason for hiding this comment

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

You can add OpenSSL < 1.1.1 in the CI jobs when you backport this PR to 3.9 and older. But this PR targets master, so I expect not see OpenSSL < 1.1.1 in this branch.

Copy link
Member Author

Choose a reason for hiding this comment

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

Master still supports OpenSSL 1.1.0 and 1.0.2. I have not finished and pushed the PEP 644 PR. I deliberately postponed PEP 644 changes until OpenSSL 3.0.0 support is done.

Copy link
Member Author

Choose a reason for hiding this comment

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

Each additional CI increases the error rate since we still have unstable tests in asyncio and multiprocessing tests. I would prefer to not add too many CIs. At least, don't make them mandatory (allow to merge a PR even if they fail).

The additional SSL tests are now only executed when any OpenSSL or GHA related file is modified. The SSL tests only execute a couple of selected tests. Multiprocessing tests are skipped. The CI steps are not mandatory.

Copy link
Member

Choose a reason for hiding this comment

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

"Master still supports OpenSSL 1.1.0 and 1.0.2. I have not finished and pushed the PEP 644 PR. I deliberately postponed PEP 644 changes until OpenSSL 3.0.0 support is done."

Ok.

Copy link
Member
@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

Please don't add a new CI until all issues are fixed, like this one:

"GitHub Actions / Ubuntu SSL tests with OpenSSL 3.0.0-alpha14
‘ERR_func_error_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]"

@tiran
Copy link
Member Author
tiran commented Apr 12, 2021

Please don't add a new CI until all issues are fixed, like this one:

"GitHub Actions / Ubuntu SSL tests with OpenSSL 3.0.0-alpha14
‘ERR_func_error_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]"

This is a chicken and egg problem. #25329 needs this PR to verify that the code works.

@vstinner
Copy link
Member

This is a chicken and egg problem. #25329 needs this PR to verify that the code works.

I'm spending a lot of time to fix every single warning in Python. I would prefer to not add new warnings, especially if you know that a lot of will be needed to fix them.

Can't you run this CI job locally, fix warnings, and then automate checks on PRs?

I would prefer not annoy contributors who don't work on OpenSSL support with these new deprecation warnings.

@tiran
Copy link
Member Author
tiran commented Apr 12, 2021

This is a chicken and egg problem. #25329 needs this PR to verify that the code works.

I'm spending a lot of time to fix every single warning in Python. I would prefer to not add new warnings, especially if you know that a lot of will be needed to fix them.

Can't you run this CI job locally, fix warnings, and then automate checks on PRs?

I would prefer not annoy contributors who don't work on OpenSSL support with these new deprecation warnings.

I prefer to add CI first, so I have a stable baseline. Then I can fix deprecation warnings.

@tiran
Copy link
Member Author
tiran commented Apr 12, 2021

I have added a new check_source instruction. The additional OpenSSL tests are skipped unless the commit touches any file with ssl, hmac, hashlib or ^.github in the file name.

@tiran tiran force-pushed the bpo-43811-gha-multissl branch from 7e18dda to 3669c9f Compare April 13, 2021 06:46
@tiran
Copy link
Member Author
tiran commented Apr 13, 2021

@vstinner @pablogsal I have reworked the PR. Additional checks are optional and only executed when GHA detects a modification of an OpenSSL-related file or a file in .github directory. I'm postponing PEP 644 PR until I have finalized OpenSSL 3.0.0 support. It should be ready by next week.

@tiran tiran requested a review from vstinner April 13, 2021 16:26
Copy link
Member
@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

Additional checks are optional and only executed when GHA detects a modification of an OpenSSL-related file

Ok, I'm fine with this PR in this case.

strategy:
fail-fast: false
matrix:
openssl_ver: [1.0.2u, 1.1.0l, 1.1.1k, 3.0.0-alpha14]
Copy link
Member

Choose a reason for hiding this comment

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

"Master still supports OpenSSL 1.1.0 and 1.0.2. I have not finished and pushed the PEP 644 PR. I deliberately postponed PEP 644 changes until OpenSSL 3.0.0 support is done."

Ok.

@miss-islington
Copy link
Contributor

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 13, 2021
The new checks are only executed when one or more OpenSSL-related files are modified. The checks run a handful of networking and hashing test suites. All SSL checks are optional. This PR also introduces ccache to speed up compilation. In common cases it speeds up configure and compile time from about 90 seconds to less than 30 seconds.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 8fa1489)

Co-authored-by: Christian Heimes <christian@python.org>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Apr 13, 2021
@bedevere-bot
Copy link

GH-25391 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 13, 2021
The new checks are only executed when one or more OpenSSL-related files are modified. The checks run a handful of networking and hashing test suites. All SSL checks are optional. This PR also introduces ccache to speed up compilation. In common cases it speeds up configure and compile time from about 90 seconds to less than 30 seconds.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 8fa1489)

Co-authored-by: Christian Heimes <christian@python.org>
@bedevere-bot
Copy link

GH-25392 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Apr 13, 2021
…-25391)

The new checks are only executed when one or more OpenSSL-related files are modified. The checks run a handful of networking and hashing test suites. All SSL checks are optional. This PR also introduces ccache to speed up compilation. In common cases it speeds up configure and compile time from about 90 seconds to less than 30 seconds.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 8fa1489)


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
miss-islington added a commit that referenced this pull request Apr 13, 2021
…-25392)

The new checks are only executed when one or more OpenSSL-related files are modified. The checks run a handful of networking and hashing test suites. All SSL checks are optional. This PR also introduces ccache to speed up compilation. In common cases it speeds up configure and compile time from about 90 seconds to less than 30 seconds.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 8fa1489)


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0