saltstack-formulas / mysql-formula

Install the MySQL client and/or server
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
85 stars 369 forks source link

fix(bug): config arrays as multiple lines #276

Closed waynegemmell closed 9 months ago

waynegemmell commented 1 year ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

https://github.com/saltstack-formulas/mysql-formula/issues/275

Describe the changes you're proposing

Details are in the issue attached but my change iterates through an array of parameters and writes the parameters on indivitual lines rather than dumping an array into the configuration file. The array dump is not parsable by mysql and it causes issues.

Pillar / config required to test the proposed changes

Example

mysql:
  server_config:
    file: 50-server.cnf
    # my.cnf sections changes
    sections:
      mysqld:
        replicate-ignore-table:
          - core.table1
          - core.table2                 
          - core.table3   

currently gets interpreted as

replicate-ignore-table = ['core.table1', 'core.table2', 'core.table3'] rather than the correct

replicate-ignore-table                  = 'core.table1'
replicate-ignore-table                  = 'core.table2'
replicate-ignore-table                  = 'core.table3'

This works on any array config value.

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

jeff350 commented 11 months ago

@waynegemmell I just got the CI fixed for this formula, could you please rebase off of master for the CI tests to run.

saltstack-formulas-github commented 9 months ago

:tada: This PR is included in version 0.56.4 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: