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

Documentation look unclear #174

Open
moolight-seashell opened this issue Nov 8, 2024 · 0 comments
Open

Documentation look unclear #174

moolight-seashell opened this issue Nov 8, 2024 · 0 comments

Comments

@moolight-seashell
Copy link

moolight-seashell commented Nov 8, 2024

The documentation doesn't seem very clear to me,

I've already had a bit of trouble finding this page :
https://pgchameleon.org/documents/usage.html#example

some lines are not executable as is,
but most of all I'm stuck here:

$ chameleon add_source --config default
/home/xy/.local/bin/chameleon.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import get_distribution
You must specify a source name with the argument --source

$chameleon add_source --config default --source example
/home/xy/.local/bin/chameleon.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import get_distribution
Traceback (most recent call last):
  File "/home/xy/.local/bin/chameleon", line 5, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/xy/.local/bin/chameleon.py", line 61, in <module>
    getattr(replica, args.command)()
  File "/home/xy/.local/lib/python3.12/site-packages/pg_chameleon/lib/global_lib.py", line 301, in add_source
    self.pg_engine.add_source()
  File "/home/xy/.local/lib/python3.12/site-packages/pg_chameleon/lib/pg_lib.py", line 2264, in add_source
    check_mappings = self.check_schema_mappings()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xy/.local/lib/python3.12/site-packages/pg_chameleon/lib/pg_lib.py", line 2198, in check_schema_mappings
    schema_mappings = json.dumps(self.sources[self.source]["schema_mappings"])
                                 ~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'example'

for more detail, these line make my mysql not able to restart :

binlog_format= ROW
binlog_row_image=FULL
log-bin = mysql-bin
server-id = 1
expire_logs_days = 10

and i cannot run this as is :

CREATE USER usr_replica WITH PASSWORD 'replica';
CREATE DATABASE db_replica WITH OWNER usr_replica;

because of : CREATE DATABASE cannot run inside a transaction block
so this require to use psql and -c option

@moolight-seashell moolight-seashell changed the title Documentation is unclear Documentation look unclear Nov 8, 2024
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

No branches or pull requests

1 participant