Skip to content

Fix changing default encoding #1296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2021
Merged

Fix changing default encoding #1296

merged 1 commit into from
Sep 20, 2021

Conversation

smortex
Copy link
Collaborator

@smortex smortex commented Sep 8, 2021

Starting with 79fa355 it is not
possible to set a custom encoding on systems where initdb is not needed
(e.g. Debian). The autorequire introduce a circular dependency:

dependency cycles found: (Anchor[postgresql::server::service::begin] =>
                          Postgresql_psql[Set template1 encoding to UTF-8] =>
                          Class[Postgresql::Server::Initdb] =>
                          Postgresql_conf[listen_addresses] =>
                          Class[Postgresql::Server::Service] =>
                          Anchor[postgresql::server::service::begin])

Move the relevant code from postgresql::server::initdb to
postgresql::server::late_initdb and include it when applicable so that
the postgresql_psql command gets run after the service has started up.

@smortex smortex requested a review from a team as a code owner September 8, 2021 02:25
@puppet-community-rangefinder
Copy link

postgresql::server::initdb is a class

that may have no external impact to Forge modules.

postgresql::server::late_initdb is a class

that may have no external impact to Forge modules.

This module is declared in 70 of 578 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@smortex smortex added the bugfix label Sep 8, 2021
Starting with 79fa355 it is not
possible to set a custom encoding on systems where initdb is not needed
(e.g. Debian).  The autorequire introduce a circular dependency:

```
dependency cycles found: (Anchor[postgresql::server::service::begin] =>
                          Postgresql_psql[Set template1 encoding to UTF-8] =>
                          Class[Postgresql::Server::Initdb] =>
                          Postgresql_conf[listen_addresses] =>
                          Class[Postgresql::Server::Service] =>
                          Anchor[postgresql::server::service::begin])
```

Move the relevant code from postgresql::server::initdb to
postgresql::server::late_initdb and include it when applicable so that
the postgresql_psql command gets run after the service has started up.
Copy link
Member

@david22swan david22swan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Rekicking tests
Will merge once they are green

@david22swan david22swan merged commit 9d3153f into puppetlabs:main Sep 20, 2021
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants