Skip to content

Comments

[3006.x]Repair Git state comment formatting#67945

Merged
dwoz merged 1 commit intosaltstack:3006.xfrom
tacerus:git-double-format
Apr 25, 2025
Merged

[3006.x]Repair Git state comment formatting#67945
dwoz merged 1 commit intosaltstack:3006.xfrom
tacerus:git-double-format

Conversation

@tacerus
Copy link
Contributor

@tacerus tacerus commented Apr 6, 2025

The _uptodate() function already invokes _format_comments() on the comments passed, avoid duplicate invocations of _format_comments() which caused the joined string result from being joined with dots a second time, effectively placing a dot after every character in the resulting comment output.

What does this PR do?

What issues does this PR fix or reference?

#67944

Previous Behavior

          ID: salt_formula_clone
    Function: git.latest
        Name: https://gitlab.infra.opensuse.org/infra/salt-formulas-git.git
      Result: True
     Comment: Repository /srv/formulas is up-to-date

              Changes made: U. n. c. o. m. m. i. t. t. e. d.  . c. h. a. n. g. e. s.  . w. e. r. e.  . d. i. s. c. a. r. d. e. d. ..  . R. e. p. o. s. i. t. o. r. y.  . w. a.
 s.  . h. a. r. d. -. r. e. s. e. t.  . t. o.  . o. r. i. g. i. n. /. p. r. o. d. u. c. t. i. o. n.  . (. 4. e. d. 6. b. 6. 1. ). ..
     Started: 14:50:13.673535
    Duration: 3066.77 ms
     Changes:
              ----------
              forced update:
                  True

New Behavior

          ID: salt_formula_clone
    Function: git.latest
        Name: https://gitlab.infra.opensuse.org/infra/salt-formulas-git.git
      Result: True
     Comment: Repository /srv/formulas is up-to-date

              Changes made: Uncommitted changes were discarded. Repository was hard-reset to origin/production (4ed6b61).
     Started: 15:27:59.400230
    Duration: 1799.01 ms
     Changes:
              ----------
              forced update:
                  True

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@tacerus
Copy link
Contributor Author

tacerus commented Apr 6, 2025

I think the test failures are not related to my patch.

@tacerus
Copy link
Contributor Author

tacerus commented Apr 6, 2025

Also let me know if you prefer it against 3006.x.

@twangboy
Copy link
Contributor

twangboy commented Apr 8, 2025

Yes please. We usually fix bugs on against the oldest, supported branch where the bug exists. Please rebase this PR on 3006.x.

@tacerus tacerus force-pushed the git-double-format branch from f51c5e3 to 6d61128 Compare April 8, 2025 22:41
@tacerus tacerus changed the base branch from master to 3006.x April 8, 2025 22:41
@tacerus
Copy link
Contributor Author

tacerus commented Apr 8, 2025

Good to know, thanks, adjusted.

The _uptodate() function already invokes _format_comments() on the
comments passed, avoid duplicate invocations of _format_comments()
which caused the joined string result from being joined with dots a
second time, effectively placing a dot after every character in the
resulting comment output.

Also amend the test suite to cover these output conditions.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
@twangboy twangboy force-pushed the git-double-format branch from f0d32cf to e76fdf5 Compare April 23, 2025 14:54
@twangboy twangboy added this to the Sulfur v3006.11 milestone Apr 23, 2025
@twangboy twangboy changed the title Repair Git state comment formatting [3006.x]Repair Git state comment formatting Apr 23, 2025
@twangboy twangboy mentioned this pull request Apr 23, 2025
17 tasks
@dwoz dwoz merged commit bfdfb18 into saltstack:3006.x Apr 25, 2025
692 checks passed
@tacerus tacerus deleted the git-double-format branch January 21, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants