Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cardano-db-sync-extended version command gives the wrong git revision #844

Closed
erikd opened this issue Sep 22, 2021 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@erikd
Copy link
Contributor

erikd commented Sep 22, 2021

The version command output:

$ cardano-db-sync-extended --version
cardano-db-sync-extended 11.0.3 - linux-x86_64 - ghc-8.10
git revision 08d36075ca25b804b5b1b544d6eafe5c877e7049

gives the wrong git revision. The revision is for a temporary commit on a debug/development branch. The commit hash does not exist in the cardano-node repo nor does it occur on the master or release/11.0.x branches of db-sync .

I have run cabal clean and rebuilt it and it still gives the same commit hash.

The git commit hash should be correct regardless of whether we compile from master, a work-in-progress branch or a release branch.

@erikd erikd added the bug Something isn't working label Sep 22, 2021
@tmcgilchrist
Copy link
Contributor

Weird, running this locally with a fresh version of master:

$ cabal exec cardano-db-sync-extended -- --version
cardano-db-sync-extended 11.0.0 - darwin-x86_64 - ghc-8.10
git revision 5bbac3eb8cfffda3b272878a7d454573f8a33026

Which should be getting this version:

$ git rev-parse --verify HEAD                      
dd23425869a91f74326a1fae0a2b7fc4d43e5558

Looking into this.

@tmcgilchrist tmcgilchrist self-assigned this Sep 25, 2021
erikd pushed a commit that referenced this issue Sep 29, 2021
Place TH gitRev into cardano-db-sync project.

Closes: #844
erikd pushed a commit that referenced this issue Sep 29, 2021
Place TH gitRev into cardano-db-sync project.

Closes: #844
@erikd erikd closed this as completed in 3836a14 Nov 10, 2021
erikd pushed a commit that referenced this issue Nov 10, 2021
Previously with cabal builds the wrong git sha was being reported by
the cli tools cardano-db-sync and cardano-db-sync-extended. This
change fixes this and also adds git sha output into cardano-db-tool.
Binaries produced by nix should not be affected as they get their git
sha's injected in a post-build stage.

Closes: #844
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants