EnterpriseDB / barman

Barman - Backup and Recovery Manager for PostgreSQL
https://www.pgbarman.org/
GNU General Public License v3.0
2.14k stars 193 forks source link

Dev/bar 128 #874

Closed gcalacoci closed 10 months ago

edb-sonar-app[bot] commented 11 months ago

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

3.3% 3.3% Coverage
0.0% 0.0% Duplication

edb-sonar-app[bot] commented 11 months ago

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

27.6% 27.6% Coverage
0.0% 0.0% Duplication

barthisrael commented 10 months ago

I didn't notice at a first moment the break statement here:

            for path in self.CONFIG_FILES:
                full_path = os.path.expanduser(path)
                if os.path.exists(full_path) and full_path in self._config.read_config(
                    full_path
                ):
                    filename = full_path
                    break

That defeats the purpose of using ~/.barman.conf :(

gcalacoci commented 10 months ago

I didn't notice at a first moment the break statement here:

            for path in self.CONFIG_FILES:
                full_path = os.path.expanduser(path)
                if os.path.exists(full_path) and full_path in self._config.read_config(
                    full_path
                ):
                    filename = full_path
                    break

That defeats the purpose of using ~/.barman.conf :(

yeah... and this doesn't happen because of this patch, but has always been like this... at this point maybe we want a new file for this

gcalacoci commented 10 months ago

I didn't notice at a first moment the break statement here:

            for path in self.CONFIG_FILES:
                full_path = os.path.expanduser(path)
                if os.path.exists(full_path) and full_path in self._config.read_config(
                    full_path
                ):
                    filename = full_path
                    break

That defeats the purpose of using ~/.barman.conf :(

yeah... and this doesn't happen because of this patch, but has always been like this... at this point maybe we want a new file for this

just to be clear... what I mean is we create a new file with a new name, like .defaults-barman.conf or something like this... and we load it like we load the config file into the config dir...

I think I have a patch in mind, I'll use the .defaults-barman.conf name for now... but I don't like it so I'm totally open to any suggestion @barthisrael 😄

barthisrael commented 10 months ago

think I have a patch in mind, I'll use the .defaults-barman.conf name for now... but I don't like it so I'm totally open to any suggestion @barthisrael 😄

Cool! Maybe use something like Postgres and create a .barman.auto.conf? 😁

We need to remember documenting about it, because it will be written under the home path of the user running the barman config-update command. I'm not sure if people use different users for running Barman commands, like root and barman .e.g

edb-sonar-app[bot] commented 10 months ago

Quality Gate passed Quality Gate passed

The SonarQube Quality Gate passed, but some issues were introduced.

11 New issues
0 Security Hotspots
84.4% 84.4% Coverage on New Code
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube