Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Some logging is included in the diff output #24

Open
soedirgo opened this issue Oct 6, 2021 · 2 comments
Open

Some logging is included in the diff output #24

soedirgo opened this issue Oct 6, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@soedirgo
Copy link
Member

soedirgo commented Oct 6, 2021

Bug report

To Reproduce

docker run supabase/pgadmin-schema-diff:cli-0.0.3 '<source>' '<target>' > diff.sql
NOTE: Configuring authentication for DESKTOP mode.
-- Event Trigger: api_restart on database postgres

-- DROP EVENT TRIGGER IF EXISTS api_restart;

CREATE EVENT TRIGGER api_restart ON DDL_COMMAND_END
    EXECUTE PROCEDURE notify_api_restart();

...

Expected behavior

The NOTE: ... line shouldn't be included in the output.

@soedirgo soedirgo added the bug Something isn't working label Oct 6, 2021
@steve-chavez
Copy link
Member

Hm, I made sure to solve this on the first version

pgadmin4/web/cli.py

Lines 376 to 379 in dc8e628

# create_app prints "NOTE: Configuring authentication for DESKTOP mode.", this pollutes our SQL diff output.
# So here we disable stdout temporarily to avoid that
with open(os.devnull, "w") as devnull:
with redirect_stderr(devnull):

A regression must have happened

@soedirgo
Copy link
Member Author

soedirgo commented Oct 6, 2021

FTR right now I'm working around it by trimming the first line.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants