Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.5, 1.5.1, 1.6.0
    • Component/s: build
    • Labels:
      None

      Description

      After building a SNAPSHOT version of Accumulo, the Git commit ID it was built from is lost in the wind the next time you update you copy of the repo.

      It would be nice to include the SHA1 in the the MANIFEST.MF. I've done this before, and I remember it to be rather easy in the end, but I don't remember how off the top of my head.

      This would be very useful when running Accumulo's distributed tests during at the end of a release cycle to rule out the possibility of running into a bug that was already fixed.

        Issue Links

          Activity

          Josh Elser created issue -
          Hide
          Mike Drob added a comment -

          I think this got lost in the svn -> git translation.

          Show
          Mike Drob added a comment - I think this got lost in the svn -> git translation.
          Mike Drob made changes -
          Field Original Value New Value
          Assignee Mike Drob [ mdrob ]
          Hide
          ASF subversion and git services added a comment -

          Commit ed9811c82f9e5d03c5bfcbaa9c720cdaa0384977 in branch refs/heads/1.4.5-SNAPSHOT from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ed9811c ]

          ACCUMULO-2064 switch to mavanagaiata for sha

          Show
          ASF subversion and git services added a comment - Commit ed9811c82f9e5d03c5bfcbaa9c720cdaa0384977 in branch refs/heads/1.4.5-SNAPSHOT from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ed9811c ] ACCUMULO-2064 switch to mavanagaiata for sha
          Hide
          ASF subversion and git services added a comment -

          Commit ed9811c82f9e5d03c5bfcbaa9c720cdaa0384977 in branch refs/heads/1.5.1-SNAPSHOT from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ed9811c ]

          ACCUMULO-2064 switch to mavanagaiata for sha

          Show
          ASF subversion and git services added a comment - Commit ed9811c82f9e5d03c5bfcbaa9c720cdaa0384977 in branch refs/heads/1.5.1-SNAPSHOT from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ed9811c ] ACCUMULO-2064 switch to mavanagaiata for sha
          Hide
          ASF subversion and git services added a comment -

          Commit ed9811c82f9e5d03c5bfcbaa9c720cdaa0384977 in branch refs/heads/1.6.0-SNAPSHOT from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ed9811c ]

          ACCUMULO-2064 switch to mavanagaiata for sha

          Show
          ASF subversion and git services added a comment - Commit ed9811c82f9e5d03c5bfcbaa9c720cdaa0384977 in branch refs/heads/1.6.0-SNAPSHOT from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ed9811c ] ACCUMULO-2064 switch to mavanagaiata for sha
          Hide
          ASF subversion and git services added a comment -

          Commit ed9811c82f9e5d03c5bfcbaa9c720cdaa0384977 in branch refs/heads/master from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ed9811c ]

          ACCUMULO-2064 switch to mavanagaiata for sha

          Show
          ASF subversion and git services added a comment - Commit ed9811c82f9e5d03c5bfcbaa9c720cdaa0384977 in branch refs/heads/master from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=ed9811c ] ACCUMULO-2064 switch to mavanagaiata for sha
          Mike Drob made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Christopher Tubbs added a comment -

          Mike Drob wrote:

          I think this got lost in the svn -> git translation.

          No, it was intentionally omitted before that (ACCUMULO-1236). Some of the reasoning for removing it is not applicable to git as much (speed of the build, due to svn checks, or multiple revisions representing the same version). However, there's still a concern, I think, about inconsistency/non-reproducibility with the source release tarballs.

          A good CI server will track this for you anyway in the build metadata.

          Show
          Christopher Tubbs added a comment - Mike Drob wrote: I think this got lost in the svn -> git translation. No, it was intentionally omitted before that ( ACCUMULO-1236 ). Some of the reasoning for removing it is not applicable to git as much (speed of the build, due to svn checks, or multiple revisions representing the same version). However, there's still a concern, I think, about inconsistency/non-reproducibility with the source release tarballs. A good CI server will track this for you anyway in the build metadata.
          Hide
          Mike Drob added a comment -

          I think there is a difference between using it to support debugging SNAPSHOT builds (which I do not care for) and providing additional information for QA builds (which I am a huge fan of). Consider the case where you fire up a 24-hour ingest test, and it errors at the end with something arcane. Meanwhile, other people have been adding code and your workspace copy no longer matches what you deployed. Having the git commit may be helpful to track down a revision from that point.

          I'm not sure I understand your concern about not being able to reproduce source releases. If the code is tagged, then it will always have the same commit id, which will always be the same, every time you check it out. If anything, I believe it adds to the release process, as an extra verification in the artifact that shows "yes, this came from the source I claim."

          Show
          Mike Drob added a comment - I think there is a difference between using it to support debugging SNAPSHOT builds (which I do not care for) and providing additional information for QA builds (which I am a huge fan of). Consider the case where you fire up a 24-hour ingest test, and it errors at the end with something arcane. Meanwhile, other people have been adding code and your workspace copy no longer matches what you deployed. Having the git commit may be helpful to track down a revision from that point. I'm not sure I understand your concern about not being able to reproduce source releases. If the code is tagged, then it will always have the same commit id, which will always be the same, every time you check it out. If anything, I believe it adds to the release process, as an extra verification in the artifact that shows "yes, this came from the source I claim."
          Hide
          ASF subversion and git services added a comment -

          Commit 7547b297c2a034ce6bd924a016ef2a5bc314c82b in branch refs/heads/1.4.5-SNAPSHOT from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=7547b29 ]

          ACCUMULO-2064 skip commit id when outside of repo

          Show
          ASF subversion and git services added a comment - Commit 7547b297c2a034ce6bd924a016ef2a5bc314c82b in branch refs/heads/1.4.5-SNAPSHOT from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=7547b29 ] ACCUMULO-2064 skip commit id when outside of repo
          Hide
          ASF subversion and git services added a comment -

          Commit 7547b297c2a034ce6bd924a016ef2a5bc314c82b in branch refs/heads/1.5.1-SNAPSHOT from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=7547b29 ]

          ACCUMULO-2064 skip commit id when outside of repo

          Show
          ASF subversion and git services added a comment - Commit 7547b297c2a034ce6bd924a016ef2a5bc314c82b in branch refs/heads/1.5.1-SNAPSHOT from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=7547b29 ] ACCUMULO-2064 skip commit id when outside of repo
          Hide
          ASF subversion and git services added a comment -

          Commit 7547b297c2a034ce6bd924a016ef2a5bc314c82b in branch refs/heads/1.6.0-SNAPSHOT from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=7547b29 ]

          ACCUMULO-2064 skip commit id when outside of repo

          Show
          ASF subversion and git services added a comment - Commit 7547b297c2a034ce6bd924a016ef2a5bc314c82b in branch refs/heads/1.6.0-SNAPSHOT from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=7547b29 ] ACCUMULO-2064 skip commit id when outside of repo
          Hide
          ASF subversion and git services added a comment -

          Commit 7547b297c2a034ce6bd924a016ef2a5bc314c82b in branch refs/heads/master from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=7547b29 ]

          ACCUMULO-2064 skip commit id when outside of repo

          Show
          ASF subversion and git services added a comment - Commit 7547b297c2a034ce6bd924a016ef2a5bc314c82b in branch refs/heads/master from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=7547b29 ] ACCUMULO-2064 skip commit id when outside of repo
          Hide
          Christopher Tubbs added a comment -

          Mike Drob wrote:

          I'm not sure I understand your concern about not being able to reproduce source releases.

          Two things. First (and, least relevant) is that the SHA1 may not match, if somebody has mirrored the repository without using git clone (eg. export, then import), and second (still not that important), building from a source release tarball (the official release) will not match the released binary from our build.

          I'm inclined to agree with you that the benefits outweigh these concerns.

          Show
          Christopher Tubbs added a comment - Mike Drob wrote: I'm not sure I understand your concern about not being able to reproduce source releases. Two things. First (and, least relevant) is that the SHA1 may not match, if somebody has mirrored the repository without using git clone (eg. export, then import), and second (still not that important), building from a source release tarball (the official release) will not match the released binary from our build. I'm inclined to agree with you that the benefits outweigh these concerns.
          Hide
          Mike Drob added a comment -

          When I was doing the 1.4.4 release, I built all artifacts from a git archive command. I think this has the benefit of not accidentally including the .git directory in a release, and is probably good practice anyway.

          Show
          Mike Drob added a comment - When I was doing the 1.4.4 release, I built all artifacts from a git archive command. I think this has the benefit of not accidentally including the .git directory in a release, and is probably good practice anyway.
          Josh Elser made changes -
          Link This issue breaks ACCUMULO-2120 [ ACCUMULO-2120 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          8d 18h 24m 1 Mike Drob 28/Dec/13 00:11

            People

            • Assignee:
              Mike Drob
              Reporter:
              Josh Elser
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development