Skip to content

Commit

Permalink
Bump mysql charm lib to version 79
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclert-canonical committed Jan 22, 2025
1 parent f6a0a6b commit 03b4c57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions lib/charms/mysql/v0/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def wait_until_mysql_connection(self) -> None:
# Increment this major API version when introducing breaking changes
LIBAPI = 0

LIBPATCH = 78
LIBPATCH = 79

UNIT_TEARDOWN_LOCKNAME = "unit-teardown"
UNIT_ADD_LOCKNAME = "unit-add"
Expand Down Expand Up @@ -1003,10 +1003,11 @@ def render_mysqld_configuration( # noqa: C901
"innodb_buffer_pool_size": str(innodb_buffer_pool_size),
"log_error_services": "log_filter_internal;log_sink_internal",
"log_error": f"{snap_common}/var/log/mysql/error.log",
"general_log": "ON",
"general_log": "OFF",
"general_log_file": f"{snap_common}/var/log/mysql/general.log",
"slow_query_log_file": f"{snap_common}/var/log/mysql/slow.log",
"binlog_expire_logs_seconds": f"{binlog_retention_seconds}",
"loose-audit_log_filter": "OFF",
"loose-audit_log_policy": "LOGINS",
"loose-audit_log_file": f"{snap_common}/var/log/mysql/audit.log",
}
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/high_availability/test_log_rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ async def test_log_rotation(
await ops_test.model.set_config({"update-status-hook-interval": "60m"})

# Exclude slow log files as slow logs are not enabled by default
log_types = ["error", "general", "audit"]
log_files = ["error.log", "general.log", "audit.log"]
log_types = ["error", "audit"]
log_files = ["error.log", "audit.log"]
archive_directories = [
"archive_error",
"archive_general",
"archive_slow",
"archive_audit",
]
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/test_mysql_k8s_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@ def test_log_rotate_config(self, _container):
" rotation\nhourly\nmaxage 7\nrotate 10800\n\n# Naming of rotated files should be in"
" the format:\ndateext\ndateformat -%Y%m%d_%H%M\n\n# Settings to prevent"
" misconfigurations and unwanted behaviours\nifempty\nmissingok\nnocompress\nnomail\n"
"nosharedscripts\nnocopytruncate\n\n/var/log/mysql/error.log {\n olddir"
" archive_error\n}\n\n/var/log/mysql/general.log {\n olddir archive_general\n}\n\n"
"nosharedscripts\nnocopytruncate\n\n"
"/var/log/mysql/error.log {\n olddir archive_error\n}\n\n"
"/var/log/mysql/general.log {\n olddir archive_general\n}\n\n"
"/var/log/mysql/slow.log {\n olddir archive_slow\n}\n\n"
"/var/log/mysql/audit.log {\n olddir archive_audit\n}"
)
Expand Down

0 comments on commit 03b4c57

Please sign in to comment.