Skip to content

Commit 1fb61c1

Browse files
authored
fix: DPE-6137 refator for password safety (#579)
* refactor mysql-cli and mysqlsh to ensure password safety * libpatch bump * s/mysql-connector-python/pexpect/ * Ensure all errors are bubbled from spawned process * test size before content * more informative output example * ensure password not leak through exceptions logging * uniform exception/warning and fix async test to faster exec time
1 parent 8491cec commit 1fb61c1

File tree

7 files changed

+1121
-530
lines changed

7 files changed

+1121
-530
lines changed

lib/charms/mysql/v0/mysql.py

Lines changed: 524 additions & 263 deletions
Large diffs are not rendered by default.

poetry.lock

Lines changed: 40 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ boto3 = "^1.28.23"
1313
typing_extensions = "^4.7.1"
1414
jinja2 = "^3.1.2"
1515
python_hosts = "^1.0.6"
16+
pexpect = "^4.9.0"
1617
pyyaml = "^6.0.2"
1718

19+
1820
[tool.poetry.group.charm-libs.dependencies]
1921
# data_platform_libs/v0/data_interfaces.py
2022
ops = ">=2.0.0"
@@ -49,7 +51,7 @@ shellcheck-py = "^0.9.0.5"
4951
[tool.poetry.group.unit.dependencies]
5052
pytest = "^7.4.0"
5153
pytest-mock = "^3.11.1"
52-
coverage = {extras = ["toml"], version = "^7.2.7"}
54+
coverage = { extras = ["toml"], version = "^7.2.7" }
5355
parameterized = "^0.9.0"
5456

5557
[tool.poetry.group.integration.dependencies]
@@ -60,7 +62,7 @@ pytest-operator = "^0.28.0"
6062
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
6163
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
6264
juju = "^3.6.0.0"
63-
mysql-connector-python = "~8.0.33"
65+
mysql-connector-python = "^9.1.0"
6466
tenacity = "^8.2.2"
6567
boto3 = "^1.28.11"
6668
pyyaml = "^6.0"
@@ -93,8 +95,8 @@ line-length = 99
9395
explicit-preview-rules = true
9496
select = ["A", "E", "W", "F", "C", "N", "D", "I", "CPY001"]
9597
ignore = [
96-
"D107", # Ignore D107 Missing docstring in __init__
97-
"E501", # Ignore E501 Line too long
98+
"D107", # Ignore D107 Missing docstring in __init__
99+
"E501", # Ignore E501 Line too long
98100
]
99101

100102
[tool.ruff.lint.per-file-ignores]

0 commit comments

Comments
 (0)