Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

update Best Practices FAQ for usage in CI #1293

Merged
merged 1 commit into from
Oct 26, 2017

Conversation

sudo-suhas
Copy link
Contributor

What does this do / why do we need it?

Updates the FAQ section on 'Best Practices' for usage in a CI environment.

Preview link - sudo-suhas/dep:docs/FAQ.md@b92d0e7#how-do-i-use-dep-in-ci

What should your reviewer look out for in this PR?

Not 100% sure about the usage of env in travis config. Would it be better to inline the X.X.X in the curl command itself?

Do you need help or clarification on anything?

Should there be an example for appveyor as well? I am not quite sure how we would do this in appveyor though.

Which issue(s) does this PR fix?

fixes #1275

P.S I also made some formatting change for the Docker section to leverage the syntax highlighting in github/editors like vscode.

Copy link
Collaborator

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

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

I'm fine with DEP_VERSION in an env var. It helps highlight required changes to the example.

This looks good to me. Do you have a Travis build that shows this in action?

@sudo-suhas
Copy link
Contributor Author

I have used the setup here - https://github.com/sudo-suhas/symcrypto.

@carolynvs
Copy link
Collaborator

Thank you for documenting how to do this with Travis. If someone else wants to do the same for AppVeyor that's would be great. This is good for now and I'd like to get it in our FAQ toot sweet. ❤️

@carolynvs carolynvs merged commit 5bdd00b into golang:master Oct 26, 2017
@sudo-suhas sudo-suhas deleted the docs-ci-usage branch October 26, 2017 02:23
@sudo-suhas
Copy link
Contributor Author

@carolynvs Do you think we should also enable caching on travis config?

Can be done like so:

# ...
cache:
  directories:
    - $GOPATH/pkg/dep

@carolynvs
Copy link
Collaborator

@sudo-suhas I don't think that enabling dep caching should be a blanket recommendation. 🤔 Until recently, we have had intermittent cache corruption that would have been super annoying if it was breaking Travis build too.

Also according to https://docs.travis-ci.com/user/caching/#Things-not-to-cache they don't recommend it for larger caches.

https://docs.travis-ci.com/user/caching/#How-does-the-caching-work%3F

Note that this makes our cache not network-local, it’s still bound to network bandwidth and DNS resolutions for S3. That impacts what you can and should store in the cache. If you store archives larger than a few hundred megabytes in the cache, it’s unlikely that you’ll see a big speed improvement.

Would you mind making a pull request (or issue) so that we can talk it through with a wider audience? I'm not saying we shouldn't do it, but that we probably want to point people to the caveats and pitch it as "if you want to turn it on, here is the magic shotgun to point at your foot". 😄

@sudo-suhas
Copy link
Contributor Author

@carolynvs Thanks for the awesome and through reply. I have created a PR #1359. Please take a look.

AlexNPavel added a commit to AlexNPavel/operator-sdk that referenced this pull request Feb 5, 2019
Enables caching for dep. This should improve CI times, but can
cause problems if dep's cache gets corrupted. See this PR for more
info: golang/dep#1293 (comment)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve docs for using dep in CI
3 participants