Skip to content

Fixing PgbackrestRetention.History processing - #43

Merged
Agalin merged 1 commit into
operasoftware:mainfrom
bmironov:history-retention
Nov 13, 2025
Merged

Fixing PgbackrestRetention.History processing#43
Agalin merged 1 commit into
operasoftware:mainfrom
bmironov:history-retention

Conversation

@bmironov

@bmironov bmironov commented Nov 8, 2025

Copy link
Copy Markdown

Hi @Agalin ,

I believe this Pull Request fixes Issue #35 . The actual issue was in a way of processing .retention.History in internal/pgbackrest/command/commandbuilder.go:143. On top of this line I've also added a few tests to cover this area.

Please accept at your convenience.

Best regards,
Boris

@Agalin Agalin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the fix, looks promising.

Comment thread internal/pgbackrest/api/config.go Outdated
Comment thread internal/pgbackrest/command/commandbuilder.go
@Agalin

Agalin commented Nov 12, 2025

Copy link
Copy Markdown
Collaborator

Commit lint doesn't like your commit message:

[commitlint] ⧗   input: Fixing PgbackrestRetention.History processing
[commitlint] ✖   subject may not be empty [subject-empty]
[commitlint] ✖   type may not be empty [type-empty]
[commitlint] ✖   message must be signed off [signed-off-by]
[commitlint] ⚠   body may not be empty [body-empty]
[commitlint] ⚠   references may not be empty [references-empty]

Should be something like this: fix: processing of PgbackrestRetention.History (#35).

Also commit must be signed off.

@Agalin

Agalin commented Nov 12, 2025

Copy link
Copy Markdown
Collaborator

Thanks for adding the signed off section. It still won't pass the type and subject checks.

@bmironov

Copy link
Copy Markdown
Author

Hi @Agalin ,

I'm confused now. What does this linter want? I've provided type, lower-case starting subject, sign-off, and even message body.

Best regards,
Boris

@Agalin

Agalin commented Nov 13, 2025

Copy link
Copy Markdown
Collaborator

It wants you to squash everything. 🙂 Goes through each commit and found some not matching rules.

Try squashing everything with this as the commit header / first line:

fix: parsing PgbackrestRetention.History (#43)

It should pass for all rules related to the first line. Rest of the commit was fine already.

@bmironov

Copy link
Copy Markdown
Author

You mean squash several commits into one OR basically remove message body and leave subject with type and sign-off?

@Agalin

Agalin commented Nov 13, 2025

Copy link
Copy Markdown
Collaborator

Not or. Squash to a single commit that has a valid first line (I've fixed the example of a valid line, not sure where did [ ] come from).

Its body is always acceptable as long as it includes the signed-off line (empty body generates only a warning). For example, this commit contains a valid body.

Linter is really careful because those commits are then used to generate release notes and to determine version bumps.

Signed-off-by: Boris Mironov <boris_mironov@outlook.com>
@bmironov

Copy link
Copy Markdown
Author

squashed everything as much as possible

@Agalin
Agalin merged commit 5dd340d into operasoftware:main Nov 13, 2025
1 check passed
@Agalin Agalin mentioned this pull request Nov 13, 2025
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