vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.69k stars 411 forks source link

Comprehensive Code Cleanup and PostgreSQL Config Enhancements #366

Closed ThomasSanson closed 1 year ago

ThomasSanson commented 1 year ago

This pull request presents a variety of improvements and adjustments focused on enhancing the readability, maintainability, and performance of the code. These changes span multiple files and primarily involve formatting changes

vitabaks commented 1 year ago

@ThomasSanson I'm not sure I'm ready to accept these changes.

I don't see the need for most of the changes, and I consider some of them dangerous from the point of view of code stability.

vitabaks commented 1 year ago

I think we need to start by defining the style by code and describe it or provide links in the document CONTRIBUTING.md

Example:

ThomasSanson commented 1 year ago

@vitabaks, you're absolutely right, this pull request was not ideal.

To explain what happened: I removed the "yaml" section from the skip_list in ansible-lint and used the "--write" option in ansible-lint to automatically fix the files using this command: ansible-lint --force-color --parseable --write.

However, this resulted in too many file changes at once. I'm going to cancel this pull request and redo it, initially breaking down the skip_list part for yaml. This will allow us to progress more incrementally, which will be more effective.

I apologize for the time and energy spent on this task.

vitabaks commented 1 year ago

@ThomasSanson Ok. Nevertheless, I think it's a good idea to coordinate and describe the code style in CONTRIBUTING.md so that there are fewer questions when reviewing the code.