PT-2368 - full refactor of a config library#1064
Merged
svetasmirnova merged 12 commits into3.xfrom Mar 6, 2026
Merged
Conversation
This refactor includes new config lib based on kong module. This lib is now follows an official percona specs, for parsing default and specified configs.
This change introduces support for a new config lib.
JiriCtvrtka
reviewed
Jan 30, 2026
JiriCtvrtka
reviewed
Jan 30, 2026
JiriCtvrtka
reviewed
Jan 30, 2026
JiriCtvrtka
reviewed
Jan 30, 2026
JiriCtvrtka
reviewed
Jan 30, 2026
Collaborator
|
Options in the only modified tool do not work as expected: Expected behavior: And we should not change this format, because it is aligned with other tools. |
svetasmirnova
requested changes
Jan 30, 2026
Collaborator
svetasmirnova
left a comment
There was a problem hiding this comment.
See comment above.
Contributor
Author
|
@svetasmirnova Yep, forget to push some fixes. |
Contributor
Author
|
@JiriCtvrtka Not sure if we should change |
svetasmirnova
requested changes
Feb 16, 2026
Collaborator
svetasmirnova
left a comment
There was a problem hiding this comment.
Please also merge changes from 3.x, so library files have a copyright header, and add a copyright header to the new config.go
svetasmirnova
requested changes
Mar 4, 2026
Collaborator
svetasmirnova
left a comment
There was a problem hiding this comment.
Please answer questions and process suggested changes.
Co-authored-by: Sveta Smirnova <svetasmirnova@users.noreply.github.com>
svetasmirnova
requested changes
Mar 5, 2026
ylacancellera
approved these changes
Mar 5, 2026
Co-authored-by: Sveta Smirnova <svetasmirnova@users.noreply.github.com>
svetasmirnova
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite config library to comply with Percona Toolkit specification
Summary
Complete rewrite of the config library to fully comply with the Percona Toolkit configuration file specification. The previous implementation was a simple key-value parser that didn't support many required features.
New Implementation
Full Percona Toolkit specification compliance
Integration with kong CLI parser - configs and command-line args work together
--configflag support - must be first argument, space-separatedPassthrough arguments - everything after
--passed to mysql/mysqladminno-prefix handling -no-optimizesetsoptimize=falseProper config file precedence - system - user - tool-specific
Custom types -
BoolYN(yes/no/1/0/on/off),StdinRequestString(password prompting)Error handling
Full test coverage
The contributed code is licensed under GPL v2.0
Contributor Licence Agreement (CLA) is signed
util/update-modules has been ran
Documentation updated
Test suite update