Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29369

Accumulated commit message is locale and launguage dependent (Praqma case 13296)

    XMLWordPrintable

Details

    Description

      The generated accumulated commit message is language and git configuration independent.

      This gives unstable test results, as well as users can not always be sure that they get the expected accumulated commit message if build slaves have different language and locale settings.

      Currently best found solution is to enforce english locale settings in the accumulated commit message. Currently there is none, thus it is build environment dependent.

      It does not affect the squash commit message, as this is generated by Git and seems to have defaults that matches english.

      Attachments

        Activity

          bue Bue Petersen added a comment - - edited

          Example on danish formatted date strings:

          Accumulated commit of the following from branch 'origin/ready/myDevelopmentBranch':
          
          commit c1449e075f528974c63eef81109d0632eaada0c7
          Author: Praqma Support <support@praqma.net>
          Date:   on jun 3 14:03:46 2015 +0200
          
              Added a second line from myDevelopmentBranch in test commit log file.
          
          commit 70353ce6771866f29c38b4460b3f74f9024f8ce2
          Author: Praqma Support <support@praqma.net>
          Date:   on jun 3 14:03:45 2015 +0200
          
              Added line from myDevelopmentBranch in test commit log file.
          
          bue Bue Petersen added a comment - - edited Example on danish formatted date strings: Accumulated commit of the following from branch 'origin/ready/myDevelopmentBranch' : commit c1449e075f528974c63eef81109d0632eaada0c7 Author: Praqma Support <support@praqma.net> Date: on jun 3 14:03:46 2015 +0200 Added a second line from myDevelopmentBranch in test commit log file. commit 70353ce6771866f29c38b4460b3f74f9024f8ce2 Author: Praqma Support <support@praqma.net> Date: on jun 3 14:03:45 2015 +0200 Added line from myDevelopmentBranch in test commit log file.

          Code changed in jenkins
          User: Bue Petersen
          Path:
          README.md
          src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/AccumulatedCommitStrategy.java
          src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/GetAllCommitsFromBranchCallback.java
          src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/SquashCommitStrategy.java
          src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/BuildResultValidator.java
          src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/CommitMessagesWithSpecialCharsIT.java
          src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/CustomIntegrationBranchIT.java
          src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/StaticGitRepositoryTestBase.java
          src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/TestUtilsFactory.java
          http://jenkins-ci.org/commit/pretested-integration-plugin/9b4e052022bb618a4d85c7852a5ac76d5391d89e
          Log:
          JENKINS-29369 Fix locale dependent accumulated msg

          The accumulated commit message is now using english locale when
          formatting date and time. The commit message is generated by the plugin
          and formatted to look like the squash commit message except for the
          header line.

          Tests have been improved to include detailed commit message asserts and
          extend to include few more tests for squashed also.
          Each test now verifies that the formatting of dates are correct for the
          tests regarding special charecters and custom integration branch (those
          were the newer tests we added so the follow a better design).

          Other improvements and refactoring:

          • removed un-used code in squash commit strategy
          • removed debug print of squash commit strategy to build console
          • add debug printing of exception during integration to the build
            console
          • fixed minor bug in test utils regarding printing console which is null
          • test base class for static git repos extended to print out cleaning
            repos and temp files

          Compare: https://github.com/jenkinsci/pretested-integration-plugin/compare/cbd24a9b1b9a...9b4e052022bb

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bue Petersen Path: README.md src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/AccumulatedCommitStrategy.java src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/GetAllCommitsFromBranchCallback.java src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/SquashCommitStrategy.java src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/BuildResultValidator.java src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/CommitMessagesWithSpecialCharsIT.java src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/CustomIntegrationBranchIT.java src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/StaticGitRepositoryTestBase.java src/test/java/org/jenkinsci/plugins/pretestedintegration/integration/scm/git/TestUtilsFactory.java http://jenkins-ci.org/commit/pretested-integration-plugin/9b4e052022bb618a4d85c7852a5ac76d5391d89e Log: JENKINS-29369 Fix locale dependent accumulated msg The accumulated commit message is now using english locale when formatting date and time. The commit message is generated by the plugin and formatted to look like the squash commit message except for the header line. Tests have been improved to include detailed commit message asserts and extend to include few more tests for squashed also. Each test now verifies that the formatting of dates are correct for the tests regarding special charecters and custom integration branch (those were the newer tests we added so the follow a better design). Other improvements and refactoring: removed un-used code in squash commit strategy removed debug print of squash commit strategy to build console add debug printing of exception during integration to the build console fixed minor bug in test utils regarding printing console which is null test base class for static git repos extended to print out cleaning repos and temp files Compare: https://github.com/jenkinsci/pretested-integration-plugin/compare/cbd24a9b1b9a...9b4e052022bb

          People

            bue Bue Petersen
            bue Bue Petersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: