Skip to content

Commit

Permalink
fix: DPE-6137 refator for password safety (#579)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
paulomach authored Jan 23, 2025
1 parent 8491cec commit 1fb61c1
Show file tree
Hide file tree
Showing 7 changed files with 1,121 additions and 530 deletions.
787 changes: 524 additions & 263 deletions lib/charms/mysql/v0/mysql.py

Large diffs are not rendered by default.

82 changes: 40 additions & 42 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ boto3 = "^1.28.23"
typing_extensions = "^4.7.1"
jinja2 = "^3.1.2"
python_hosts = "^1.0.6"
pexpect = "^4.9.0"
pyyaml = "^6.0.2"


[tool.poetry.group.charm-libs.dependencies]
# data_platform_libs/v0/data_interfaces.py
ops = ">=2.0.0"
Expand Down Expand Up @@ -49,7 +51,7 @@ shellcheck-py = "^0.9.0.5"
[tool.poetry.group.unit.dependencies]
pytest = "^7.4.0"
pytest-mock = "^3.11.1"
coverage = {extras = ["toml"], version = "^7.2.7"}
coverage = { extras = ["toml"], version = "^7.2.7" }
parameterized = "^0.9.0"

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

[tool.ruff.lint.per-file-ignores]
Expand Down
Loading

0 comments on commit 1fb61c1

Please sign in to comment.