From f9af1801949190080c683744827bf9fa31516139 Mon Sep 17 00:00:00 2001 From: Federico Campoli <4thdoctor.gallifrey@gmail.com> Date: Wed, 11 Dec 2019 17:11:02 +0100 Subject: [PATCH] stamp 2.0.12 --- CHANGELOG.rst | 6 ++++++ README.rst | 4 ++-- RELEASE_NOTES.rst | 9 +++++++++ docs/conf.py | 6 +++--- docs/configuration_file.rst | 22 +++++++++++----------- docs/index.rst | 2 +- setup.py | 5 ----- 7 files changed, 32 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 88343983..f5ed4abf 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,5 +1,11 @@ changelog ************************* +2.0.12 - 11 Dec 2019 +.......................................................... +* Fixes for issue #96 thanks to @daniel-qcode +* Change for configuration and SQL files location +* Package can build now as source and wheel +* The minimum python requirements now is 3.5 2.0.11 - 25 Oct 2019 .......................................................... diff --git a/README.rst b/README.rst index ad04ce65..f2a46e7e 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,7 @@ Replica host .............................. Operating system: Linux, FreeBSD, OpenBSD -Python: CPython 3.3+ +Python: CPython 3.5+ * `PyMySQL `_ * `argparse `_ @@ -98,7 +98,7 @@ The replica requires the tables to have a primary or unique key. Tables without The copy_max_memory is just an estimate. The average rows size is extracted from mysql's informations schema and can be outdated. If the copy process fails for memory error check the failing table's row length and the number of rows for each slice. -Python 3 is supported only from version 3.3 as required by mysql-replication . +Python 3 is supported only from version 3.5 as required by mysql-replication . The lag is determined using the last received event timestamp and the postgresql timestamp. If the mysql is read only the lag will increase because no replica event is coming in. diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 6a6426a9..a83def05 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -1,5 +1,14 @@ RELEASE NOTES ************************* +2.0.12 +-------------------------- +This maintenance release fixes the issue #96 where the replica initialisation failed on MySQL 8 because of the wrong field names pulled out from the information_schema. +Thanks to @daniel-qcode for contributing with his fix. + +The configuration and SQL files are now moved inside into the directory pg_chameleon. This change simplifies the setup.py file and allow pg_chameleon to be +built as source and wheel package. + +As python 3.4 has now reached its end-of-life and has been retired the minimum requirement for pg_chameleon has been updated to Python 3.5. 2.0.11 -------------------------- diff --git a/docs/conf.py b/docs/conf.py index af3ef24f..f8ed846d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,7 +57,7 @@ # General information about the project. project = u'pg_chameleon' -copyright = u'2016-2018 Federico Campoli' +copyright = u'2016-2020 Federico Campoli' author = u'Federico Campoli' # The version info for the project you're documenting, acts as replacement for @@ -65,9 +65,9 @@ # built documents. # # The short X.Y version. -version = u'2.0.11' +version = u'2.0.12' # The full version, including alpha/beta/rc tags. -release = u'v2.0.11' +release = u'v2.0.12' # The language for content autgenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/configuration_file.rst b/docs/configuration_file.rst index b81f26be..11869aa5 100644 --- a/docs/configuration_file.rst +++ b/docs/configuration_file.rst @@ -7,7 +7,7 @@ The configuration consists of three configuration groups. Global settings .............................. -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 2-9 :linenos: @@ -25,7 +25,7 @@ If both rollbar_key and rollbar_env are configured some messages are sent to the type override ............................................... -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 11-16 :linenos: @@ -44,7 +44,7 @@ The override is also applied for each matching DDL (create table/alter table) if PostgreSQL target connection ............................................... -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 21-28 :linenos: @@ -55,7 +55,7 @@ The pg_conn key maps the target database connection string. sources configuration ............................................... -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 30-95 :linenos: @@ -72,7 +72,7 @@ Database connection ============================= -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 30-66 :emphasize-lines: 3-9 @@ -84,7 +84,7 @@ Larger values could help the tool working better on slow networks. Low values ca Schema mappings ============================= -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 30-66 :emphasize-lines: 10-11 @@ -96,7 +96,7 @@ In the example provided the MySQL database ``delphis_mediterranea`` is replicate Limit and skip tables ============================= -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 30-66 :emphasize-lines: 12-15 @@ -110,7 +110,7 @@ The table's names should be in the form SCHEMA_NAME.TABLE_NAME. Grant select to option ============================================================= -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 30-66 :emphasize-lines: 16-17 @@ -126,7 +126,7 @@ This key allows to specify a list of database roles which will get select access Source configuration parameters ==================================== -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 30-66 :emphasize-lines: 18-31 @@ -150,7 +150,7 @@ Source configuration parameters Skip events configuration ==================================== -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 30-66 :emphasize-lines: 32-37 @@ -179,7 +179,7 @@ The following limitations apply. * In the ``show_status`` detailed command the replicated tables counters are always zero -.. literalinclude:: ../configuration/config-example.yml +.. literalinclude:: ../pg_chameleon/configuration/config-example.yml :language: yaml :lines: 69-95 :emphasize-lines: 7,16,25,27 diff --git a/docs/index.rst b/docs/index.rst index b7338f72..2d611d4e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,7 +13,7 @@ pg_chameleon MySQL to PostgreSQL replica -pg_chameleon is a replication tool from MySQL to PostgreSQL developed in Python 3.3+ +pg_chameleon is a replication tool from MySQL to PostgreSQL developed in Python 3.5+ The system use the library mysql-replication to pull the row images from MySQL which are transformed into a jsonb object. A pl/pgsql function decodes the jsonb and replays the changes into the PostgreSQL database. diff --git a/setup.py b/setup.py index 8274bc22..6de7a8c0 100644 --- a/setup.py +++ b/setup.py @@ -7,10 +7,6 @@ def readme(): return f.read() package_data = {'pg_chameleon': ['configuration/config-example.yml','sql/upgrade/*.sql','sql/drop_schema.sql','sql/create_schema.sql', 'LICENSE.txt']} - - - - setup( name="pg_chameleon", @@ -63,7 +59,6 @@ def readme(): 'daemonize>=2.4.7', 'rollbar>=0.13.17' ], - #data_files = data_files, include_package_data = True, package_data=package_data, packages=setuptools.find_packages(),