Comments (3)
https://github.com/rwnx/pynonymizer/blob/main/pynonymizer/database/mysql/execution.py#L61C27-L61C32
I suspect it's the use of Popen here that means we dont get automatic throwing on bad exit code. this should be reasonably simple to fix (if returncode > 0 raise Error).
According to this https://stackoverflow.com/questions/5631624/how-to-get-exit-code-when-using-python-subprocess-communicate-method
we could do this with .call or switch the whole thing to subprocess.run, which might be more worthwhile in the long run.
postgres will also likely have the same issue.
I think your use case is a little strange and I dont normally expect the db to crash. Let's schedule this for the next minor version.
from pynonymizer.
I 100% agree that my use case is strange and I'd personally far prefer my DB didn't crash sporadically! That said, there's many more prosaic reasons a long running process like mysqldump could fail mid flight (eg a network or firewalling failure), so it is reasonable to expect other users may be affected.
In addition to a non-zero return code, mysqldump also writes a more informative message to stderr - it may be be worthwhile trapping and returning that as well?
from pynonymizer.
Related Issues (20)
- parallelise the anonymisation step HOT 4
- TypeError: 'NoneType' object is not iterable HOT 5
- Request support for SQLEXPRESS for db-type = mssql HOT 3
- Improve ODBC interaction: Accept a connection string HOT 2
- Improve deployability: Dockerize pynonymizer HOT 2
- Not everything is dumpt HOT 4
- Error on executing command caused by 'ANSI_WARNINGS' for mssql database HOT 8
- Restore stdin / stdout integration test HOT 1
- fix: warning in CI HOT 1
- Error with parameter --skip-steps HOT 2
- handle busy connection when threading HOT 1
- Missing inputs message should not return exit code "0" HOT 2
- Should INPUTS be mandatory when RESTORE_DB is skipped? HOT 2
- PYNONYMIZER_STRATEGY dropped without deprecation HOT 5
- --help output has duplicate --mysql-cmd-opts HOT 2
- Mechanisms to reduce load on server? HOT 5
- Updated docker images? HOT 3
- --verbose flag doesnt work
- Connectionstring fix HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pynonymizer.