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

Introduce GitHub CI #213

Merged
merged 3 commits into from
Mar 31, 2022

Conversation

DifferentialOrange
Copy link
Member

@DifferentialOrange DifferentialOrange commented Mar 17, 2022

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
Copy link
Member Author

image

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

@DifferentialOrange
Copy link
Member Author

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.

@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-182-github-actions branch 2 times, most recently from 62dfdfc to af71fe4 Compare March 22, 2022 13:24
@DifferentialOrange DifferentialOrange marked this pull request as ready for review March 22, 2022 13:27
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-182-github-actions branch 3 times, most recently from 4ff1b23 to 29ba19a Compare March 22, 2022 14:41
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-182-github-actions branch 2 times, most recently from a1c8acf to 93fefbe Compare March 22, 2022 15:34
Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -343,5 +343,5 @@ end

-- }}}

clean()
-- clean()
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove the dead code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed clean to work with 2.x. I decided not to change current behavior of clean execution since tarantool_python_ci.lua may be used in external projects like in tarantool/tarantool#6965

.github/workflows/testing.yml Outdated Show resolved Hide resolved
.github/workflows/testing.yml Outdated Show resolved Hide resolved
.github/workflows/reusable_testing.yml Outdated Show resolved Hide resolved
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-182-github-actions branch 3 times, most recently from d51cbf3 to 3749780 Compare March 30, 2022 16:28
SQL_BUILTIN was introduced in [1] (tarantool 2.2.1) and dropped in [2]
(tarantool 2.10.0-beta2). It is not permitted to drop SQL_BUILTIN
functions, thus, before this patch, tarantool_python_ci.lua was unable
to run with versions between 2.2.1 and 2.10.0-beta2, failing with
`ER_DROP_FUNCTION: Can't drop function 1: function is SQL built-in`.
This patch fixes this.

tarantool_python_ci.lua is used to start a tarantool instance for
Windows tests.

1. tarantool/tarantool@200a492
2. tarantool/tarantool@c49eab9

Part of #182
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-182-github-actions branch from 7bcc1a1 to c46c513 Compare March 31, 2022 08:14
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.

Closes #182
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 [1] 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, StackOverflow answer [2] 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 easily
be under 1 ms, it caused the test to fail.

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

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-182-github-actions branch from c46c513 to 44fc747 Compare March 31, 2022 08:29
@DifferentialOrange DifferentialOrange merged commit a5226e9 into master Mar 31, 2022
@DifferentialOrange DifferentialOrange deleted the DifferentialOrange/gh-182-github-actions branch March 31, 2022 08:37
Copy link
Contributor

@ylobankov ylobankov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

DifferentialOrange added a commit to tarantool/doc that referenced this pull request May 11, 2022
Since the release of tarantool/python 0.8.0 [1] several things has
changed.

* Issue #105 has been fixed [2].
* CI has been migrated to GitHub Actions [3].
* New connection pool (ConnectionPool) with master discovery
  was introduced [4].
* old connection pool (MeshConnection) with round-robin failover was
  deprecated [4].

These changes together with GitHub stars update are introduced with this
patch.

1. https://github.com/tarantool/tarantool-python/releases/tag/0.8.0
2. tarantool/tarantool-python#211
3. tarantool/tarantool-python#213
4. tarantool/tarantool-python#207
DifferentialOrange added a commit to tarantool/doc that referenced this pull request May 11, 2022
Since the release of tarantool-python 0.8.0 [1] several things has
changed.

* Issue tarantool/tarantool-python#105 has been fixed [2].
* CI has been migrated to GitHub Actions [3].
* New connection pool (ConnectionPool) with master discovery
  was introduced [4].
* old connection pool (MeshConnection) with round-robin failover was
  deprecated [4].

These changes together with GitHub stars update are introduced with this
patch.

1. https://github.com/tarantool/tarantool-python/releases/tag/0.8.0
2. tarantool/tarantool-python#211
3. tarantool/tarantool-python#213
4. tarantool/tarantool-python#207
DifferentialOrange added a commit to tarantool/doc that referenced this pull request May 11, 2022
Since the release of tarantool-python 0.8.0 [1] several things has
changed.

* Issue tarantool/tarantool-python#105 has been fixed [2].
* CI has been migrated to GitHub Actions [3].
* New connection pool (ConnectionPool) with master discovery
  was introduced [4].
* old connection pool (MeshConnection) with round-robin failover was
  deprecated [4].

These changes together with GitHub stars update are introduced with this
patch.

1. https://github.com/tarantool/tarantool-python/releases/tag/0.8.0
2. tarantool/tarantool-python#211
3. tarantool/tarantool-python#213
4. tarantool/tarantool-python#207
patiencedaur pushed a commit to tarantool/doc that referenced this pull request May 16, 2022
Since the release of tarantool-python 0.8.0 [1] several things has
changed.

* Issue tarantool/tarantool-python#105 has been fixed [2].
* CI has been migrated to GitHub Actions [3].
* New connection pool (ConnectionPool) with master discovery
  was introduced [4].
* old connection pool (MeshConnection) with round-robin failover was
  deprecated [4].

These changes together with GitHub stars update are introduced with this
patch.

1. https://github.com/tarantool/tarantool-python/releases/tag/0.8.0
2. tarantool/tarantool-python#211
3. tarantool/tarantool-python#213
4. tarantool/tarantool-python#207
patiencedaur added a commit to tarantool/doc that referenced this pull request May 16, 2022
* Update python connector comparison table

Since the release of tarantool-python 0.8.0 [1] several things has
changed.

* Issue tarantool/tarantool-python#105 has been fixed [2].
* CI has been migrated to GitHub Actions [3].
* New connection pool (ConnectionPool) with master discovery
  was introduced [4].
* old connection pool (MeshConnection) with round-robin failover was
  deprecated [4].

These changes together with GitHub stars update are introduced with this
patch.

1. https://github.com/tarantool/tarantool-python/releases/tag/0.8.0
2. tarantool/tarantool-python#211
3. tarantool/tarantool-python#213
4. tarantool/tarantool-python#207

* Update translation

Co-authored-by: Patience Daur <[email protected]>
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.

Setup GitHub Actions
3 participants