CI Fix and different hash algorithms#9
Conversation
Cache git LFS objects between travis builds
The old code will keep the ci wait forever until timeout. This is to fix that
added sleep to make sure all db are up before migration
Fixed hostname resolution issue.
Replaced old password with new
…r colocation puzzle to fit multiple hashing algorithms.
lukpueh
left a comment
There was a problem hiding this comment.
He @KevinSirius! I have left a few comments inline, but haven't yet had the chance to do a full pass. I'll follow up with a more thorough review. :)
On a general note, I'd appreciate if you followed our lab's development guideline (also the linked-to documents) more closely, in particular in regards to:
- General PR best practices (split up topics, feature branch should have a distinct name)
- PR author responsibilities when requesting a review (make sure tests don't fail, etc...)
- commits and commit messages (split/combine commits thematically, write helpful commit messages)
| - os: linux | ||
| env: | ||
| - BUILD_MODE=test | ||
| # Coveralls.io token | ||
| - secure: "TDm6L+hiTIs1CP3sm3eBxfcz7MgDN6nAb4+TbPiQOY6xjaVd53J1fvi9orcQZtvacWIh4ZFSxkCggwzezmIp6ZEad/6kVdCfwmbYTK2jEdx9eAxF6dnX3nNOJLiGqws6RPZB81byqIZD269Llrq36Zq5Xwc9mm9kbNFfHbDfAvPTw5VSkbrV6LTH452U5apkIcapbhI/Ll/aa3uVoDH8lbeudA0V5reTBP+BSNob/FrLjXEpkbpW3QzqzZm+RWBM5xKqIX51Vd5IkwYQZGi9mwf92c+9FcolNjhdFajJBWDEU9WUZyv/wWkijUV2aTj2RYKF2QEwJO2EbDsJLJHQvi1l8jD2xu9Pa+ef0Ia/Js4KkLr9TB9m6tY+3ShMUvxQGfKeGeAmvzYDVPfo2Cu0qTO01nClMZfZM3rM9Sm9l7kN3LaZUrvLDl/kvQVMCMvzcypbcWfI6Eh5uw5WMUjH4QgBxUUaaI6fVFK6dTsmdGYtbiDPqkUMKT/45UpbMoxKrHYB7GSP1lLR6CfifOa9p91Tpcwq+CsOl78do6KEzcKZWA0ojMMAWX9PDtLPr4TwXN9ENDH/IityQAI3cCwfV1LmUZNx0HffznoG7v+bnvi4NfNumUMSmOE+HobDO4vPmW2rpHWprA4AQO3lY/fwZatzhH933maQRH4FRBQfw2M=" |
There was a problem hiding this comment.
This build fails, do you know why?
There was a problem hiding this comment.
It fails because of the lack of some go testing files and there are some files that have been left unfinished. As now we don't have enough hands on checking those files. But when that is fixed, the CI will have a pass on build.
|
|
||
|
|
||
| `Please Note now Go no longer needs to keep codes under GOPATH anymore. You can replace the directory with any folder you want. But we would recommend you to use GOPATH` | ||
|
|
There was a problem hiding this comment.
Why is it still recommended? Will the rest of the instructions also work if I just clone to wherever?
git clone git@github.com:cachecashproject/go-cachecash.git
If that's the case I would just do that and remove above note.
| POSTGRES_USER=cachecash | ||
| POSTGRES_PASSWORD=cachecashPW | ||
| POSTGRES_DB=ledger | ||
| LEDGER_DATABASE=host=ledger-db port=5432 user=cachecash password=cachecashPW dbname=ledger sslmode=disable |
There was a problem hiding this comment.
Is there any mechanism that prevents these passwords from being used "for real"? E.g. in production?
Btw. I found quite a few passwords in your diff, see:
curl https://patch-diff.githubusercontent.com/raw/cachecashproject/go-cachecash/pull/9.diff | grep "^+" | grep -oi "password=[^ ]*"There was a problem hiding this comment.
For now, the cachecash repo is mostly for testing. If for production I think we would definitely implement a new mechanism to replace the secert files. But for now this works for the testing. I will raise a issue on this after and try to fix it later.
|
|
||
| You will need a working Go toolchain. We tend to stay on the latest stable version. | ||
|
|
||
| You will also need some extra code generation tools: |
There was a problem hiding this comment.
It would be helpful to add pointers to the tools you need.
This is a PR with a lot of stuff:
This PR is firstly about the fix on CI script to make travis.ci usable again. After Berat implemented the secrets for databases, those scripts need to be reedited for automation. I modified the templates of secrets and added those secrets in deploy/secrets so CI can correctly run with them. I also added some waiting time in the script to make sure all docker containers are up before executing the commands.
Thanks to Raghav, all test files are now saved in travis.ci cache, so travis would not pull from git lfs every time we have a commit or a PR.
This PR also contains the code I wrote during the summer to benchmark the colocation puzzle with different hashing algorithms. I updated the go test file to make sure the test would try to run and verify all algorithms with correct expected solution.
Last, I updated the README so it is much clearer for starters.