voxpupuli / puppet-jira

Atlassian JIRA Puppet Module
https://forge.puppet.com/puppet/jira
Apache License 2.0
62 stars 143 forks source link

Fixing that the suffix can be empty as well (needed for mysql-connector > 8) #337

Closed diLLec closed 3 years ago

diLLec commented 3 years ago

Pull Request (PR) description

The change is needed to specificy and use a mysql-connector version > 8. The problem with those connectors is, that there is no "-bin" suffix in the jarfile and therefore the suffix needs to be empty. As the current String will require the string to be at least 1 character long, a version 8 connector can not be configured.

class {'jira':
...
    mysql_connector_manage       => true,
    mysql_connector_version      => '8.0.23',
    mysql_connector_install      => '/opt/MySQL-connector',
    mysql_connector_url          => 'https://dev.mysql.com/get/Downloads/Connector-J',
    mysql_connector_jar_suffix   => '', # no '-bin'!
...

results in Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Jira]: parameter 'mysql_connector_jar_suffix' expects a String[1, default]

This Pull Request (PR) fixes the following issues

Enables the useage of mysql-connector version > 8

diLLec commented 3 years ago

While working on the patch I've seen, that there already is version handlig code in the project (install.pp for example). Following that example I've put deleted the "suffix" variable and added logic that will change the filename scheme of the mysql connector jar based on the version.

@bastelfreak please review.

bastelfreak commented 3 years ago

thanks for the update!