tarantool / tarantool-python

Python client library for Tarantool
https://www.tarantool.io
BSD 2-Clause "Simplified" License
100 stars 48 forks source link

Introduce GitHub CI #213

Closed DifferentialOrange closed 2 years ago

DifferentialOrange commented 2 years ago

Setup GitHub Actions testing pipeline

Before this patch, tarantool/tarantool-python CI was based on Travis CI (Linux runs) and Appveyor (Windows runs). This PR introduces GitHub Actions workflow files for both Linux and Windows test runs. Pipelines run for different supported tarantool, Python and msgpack package versions to ensure compatibility. tarantool instance is started in each Windows pipeline under WSL to run tests instead of using an external server (like in Appveyor). Since we start a new tarantool instance for each run, clean() procedure was removed. (The main reason to remove it was failing with ER_DROP_FUNCTION: Can't drop function 1: function is SQL built-in error on newer 2.x on bootstrap.)

Testing pipeline for tarantool artifacts was also updated.

Travis CI and Appveyor badges were replaced with GitHub Actions badge.

Skip flaky ping test on Windows

Ping test started to fail (in ~70% cases) after Windows CI migration from Appveyor to GitHub Actions. As a part of this migration, the test tarantool instance was changed from an instance started on a remote Linux server to an instance started on the same Windows server under WSL. Thus, request time has shortened and it supposedly caused the ping test to fail.

Python documentation declares that

...though the time is always returned as a floating point number, not all systems provide time with a better precision than 1 second...

Particularly, this StackOverflow answer argues that

For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds. Python on Windows uses +- 16 milliseconds precision due to clock implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easilybe under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further development.

Closes #182, part of #214

After merging this PR, Appveyor workflows must be removed since they are not useful anymore.

DifferentialOrange commented 2 years ago

image

I can't see failed CI logs. I have filed a ticket to GitHub support, but there is no answer yet.

DifferentialOrange commented 2 years ago

image

I can't see failed CI logs. I have filed a ticket to GitHub support, but there is no answer yet.

It seems that having more than ~100 pipelines is too much of a load for GitHub website.