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

CI: remove requirement to pull in dependency source code changes #168

Merged
merged 2 commits into from
Mar 27, 2019

Conversation

Jusshersmith
Copy link
Contributor

@Jusshersmith Jusshersmith commented Mar 27, 2019

Problem

All CI builds are currently failing due to updates to vendored dependencies being required. Specifically, we run git diff as part of our tests (https://github.com/buzzfeed/sso/blob/master/scripts/test) which fails after the CI process itself tries to update these dependencies. Due to the use of go mod vendor we currently need to pull in updated source code for these dependencies too.

Solution

We don't want to have to update the source code for vendored dependencies on each build - instead this can be done intermittently after a certain time period or when we want to pull in updates from certain dependencies. This PR aims to take away that requirement.

Commit 0c2c289 includes changes to ./scripts/test and Dockerfile to prevent dependency source code being pulled down on each build, and to allow use of modules within the $GOPATH.

Commit d1bfabe includes changes to go.mod and go.sum from running ./scripts/test and make tools.

Notes

One potential issue not addressed in this PR is that if any changes to go.sum and go.mod are caused by https://github.com/buzzfeed/sso/blob/master/Makefile#L18-L20, then the build will fail due to git diffs. Running ./scripts/test does not make these updates, so currently make tools needs to be locally ran to pull in these changes.

Relevant PR: #166 (this was initially created to simply make the required dependency changes to unblock builds, however now should not be needed)

@jphines
Copy link
Contributor

jphines commented Mar 27, 2019

This looks good to me.

scripts/test Outdated Show resolved Hide resolved
Change commands ran and their order in ./scripts/test to prevent source
code from dependencies being pulled in on each build, while still
verifying required dependencies. Also enable
GO111MODULE in the Dockerfile to allow use of modules while in the
$GOPATH.

changes from review
By running ./scripts/test and `make tools`.
@Jusshersmith Jusshersmith merged commit a8fa296 into master Mar 27, 2019
@Jusshersmith Jusshersmith deleted the jusshersmith-change-tests branch March 27, 2019 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants