Skip to content

CI Fix and different hash algorithms#9

Open
KevinSirius wants to merge 18 commits into
cachecashproject:masterfrom
KevinSirius:master
Open

CI Fix and different hash algorithms#9
KevinSirius wants to merge 18 commits into
cachecashproject:masterfrom
KevinSirius:master

Conversation

@KevinSirius
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Collaborator

@lukpueh lukpueh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread .travis.yml
Comment on lines +19 to +23
- 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="
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This build fails, do you know why?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md


`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`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will fix that!

Comment thread README.md
POSTGRES_USER=cachecash
POSTGRES_PASSWORD=cachecashPW
POSTGRES_DB=ledger
LEDGER_DATABASE=host=ledger-db port=5432 user=cachecash password=cachecashPW dbname=ledger sslmode=disable
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=[^ ]*"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md

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:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be helpful to add pointers to the tools you need.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants