Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-21256

camel-github startingSha=last does not work with large history

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.8.0
    • 4.8.1, 4.9.0
    • camel-github
    • None
    • Unknown

    Description

      I encountered an issue using startingSha=last with a repository with a large history.  The last sha is not correctly resolved.   CAMEL-17473 did not resolve this issue.  I am putting together a pull request with a possible solution.

       

      The following issues were discovered from real-world testing and a unit test:

      1. it appears that the first commit returned from the GitHub API is the most recent and the sha from that should be used as the lastSha variable.
      2. There is a threading issue where CommitConsumer.poll() can be called concurrently with CommitConsumer.doStart().  In some situations lastSha can be null in the poll() method, producing the same behavior as startingSha=beginning, which is undesired.

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              electricsam Chris Slater
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: