Skip to content

Comments

fix: unnecessary stanza create events#60

Merged
jason-lynch merged 1 commit intomainfrom
fix/unnecessary-stanza-creates
Jun 17, 2025
Merged

fix: unnecessary stanza create events#60
jason-lynch merged 1 commit intomainfrom
fix/unnecessary-stanza-creates

Conversation

@jason-lynch
Copy link
Member

The pgbackrest info output contains a non-zero status code if the repository is empty, even if it's otherwise configured correctly. We were returning a resource.ErrNotFound in this case, which caused us to re-run the PgBackRestStanza.Create method unnecessarily. The Create implementation is idempotent, so this didn't cause issues, but it was confusing to see the create event in the output when there were no changes.

The `pgbackrest info` output contains a non-zero status code if the
repository is empty, even if it's otherwise configured correctly. We
were returning a `resource.ErrNotFound` in this case, which caused us
to re-run the `PgBackRestStanza.Create` method unnecessarily. The
`Create` implementation is idempotent, so this didn't cause issues, but
it was confusing to see the create event in the output when there were
no changes.
@jason-lynch jason-lynch requested review from mmols and tsivaprasad June 17, 2025 18:31
@jason-lynch jason-lynch merged commit 778798e into main Jun 17, 2025
2 checks passed
@jason-lynch jason-lynch deleted the fix/unnecessary-stanza-creates branch June 17, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants