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

Satisfy testing on macOS #386

Merged
merged 3 commits into from
Mar 29, 2021
Merged

Satisfy testing on macOS #386

merged 3 commits into from
Mar 29, 2021

Conversation

amotl
Copy link
Member

@amotl amotl commented Oct 28, 2020

About

This is somehow related to crate/crash#343, it makes the test suite work on macOS.

On top of using conditional buildout configuration sections for pulling down the appropriate CrateDB distribution tarballs for other operating systems than Linux, it skips some tests currently not working on macOS. Windows support has not been verified yet, I am working on this on behalf of #388.

Summary of the changes

  • Remove doctests about CrateLayer.from_uri as it does not honor the platform when building the download URL. Instead, re-add it as a unit tests which at least runs the function by mocking _download_and_extract into a noop.
  • Discriminate between testing against CrateDB nightly (run on ubuntu-latest) and multi-platform tests against a specific version of CrateDB (run on both ubuntu-latest and macos-latest).
  • Improve stability by using REFRESH TABLE appropriately.
  • Use most recent CrateDB 4.5.0.

@amotl amotl requested review from mfussenegger, chaudum, autophagy and a team October 28, 2020 17:22
@amotl amotl marked this pull request as draft October 28, 2020 17:35
@amotl
Copy link
Member Author

amotl commented Oct 28, 2020

It looks like GHA is currently not able to access cdn.crate.io [1]. Downloading the latest CrateDB release tarball croaks with [Errno 104] Connection reset by peer. Has anyone seen that before?

 Downloading https://cdn.crate.io/downloads/releases/nightly/crate-latest.tar.gz
While:
  Installing crate.
Error: Error downloading extends for URL https://cdn.crate.io/downloads/releases/nightly/crate-latest.tar.gz: [Errno 104] Connection reset by peer
Error: Process completed with exit code 1.

[1] https://github.com/crate/crate-python/pull/386/checks?check_run_id=1322270579

@amotl
Copy link
Member Author

amotl commented Oct 28, 2020

Downloading the latest CrateDB release tarball croaks with [Errno 104] Connection reset by peer.

Downloading the release tarballs started working again.

Now the Test python-3.6 sqla: 1.1.15 CrateDB: nightly on ubuntu-latest section croaks [1] with

Failed doctest test for https.txt

So, #384 will hopefully heal that?

[1] https://github.com/crate/crate-python/pull/386/checks?check_run_id=1322310763

@amotl
Copy link
Member Author

amotl commented Oct 28, 2020

After re-running the tests, they apparently succeeded.

@amotl amotl marked this pull request as ready for review October 28, 2020 18:52
Copy link
Member

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

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

Could we also add windows and macos to the build matrix in the github actions config?

base.cfg Outdated Show resolved Hide resolved
@amotl
Copy link
Member Author

amotl commented Nov 3, 2020

Could we also add windows and macos to the build matrix in the github actions config?

That would be nice, right?

@amotl amotl force-pushed the amo/tests-multi-os branch 3 times, most recently from d00f767 to cd47834 Compare March 25, 2021 23:46
@amotl amotl removed request for a team, chaudum and autophagy March 25, 2021 23:47
@amotl
Copy link
Member Author

amotl commented Mar 26, 2021

Could we also add windows and macos to the build matrix in the github actions config?

I just added macos-latest. For Windows, I am working on #388.

Because I have not been able to adjust the test matrix appropriately to run CrateDB nightly on ubuntu-latest, but a specific version like e.g. CrateDB 4.5.0 on macos-latest, I split the GHA recipe into two parts: One is for checking pull requests on all operating systems and another one is for checking against CrateDB nightly on regular intervals as configured through the cronjob-like scheduling configuration. That latter exclusively happens on ubuntu-latest, as nightly builds are not available for other operating systems than Linux.

@amotl amotl force-pushed the amo/tests-multi-os branch 3 times, most recently from d5f27e7 to c6710c2 Compare March 26, 2021 11:19
@amotl amotl requested review from seut and mfussenegger March 26, 2021 11:53
Having it included, it would need maintenance on the branch protection
page each time we bump the CrateDB version.
@amotl amotl merged commit 71adf4d into master Mar 29, 2021
@amotl amotl deleted the amo/tests-multi-os branch March 29, 2021 13:00
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.

Tests: Flakyness within "doctests/itests.txt" and "doctests/client.txt"
2 participants