Skip to content

Stop requiring vendored dependencies in CI#31

Merged
mislav merged 1 commit intomasterfrom
stop-vendor
Oct 28, 2019
Merged

Stop requiring vendored dependencies in CI#31
mislav merged 1 commit intomasterfrom
stop-vendor

Conversation

@mislav
Copy link
Copy Markdown
Contributor

@mislav mislav commented Oct 23, 2019

We started vendoring dependencies because this was a practice that the Go community had for a while now to:

  1. Speed up builds - no need to fetch dependencies every time;
  2. Guard against 3rd-party downtime - CI passes even if hosts such as gopkg.in are down, or if someone deletes their GitHub repo/account hosting a particular module.

With Go 1.13 and GitHub Actions, however, we have these problems solved for free:

  • The built-in goproxy caches dependencies and speeds up downloads;
  • Octofactory ensures that dependencies are cached on our own infrastructure, guarding us from 3rd-party downtime. https://github.com/github/go-lang/issues/99

With all this in mind, I feel that we don't have to require vendoring dependencies anymore.

We started vendoring dependencies because this was a practice that the Go community had for a while now to:

1. Speed up builds - no need to fetch dependencies every time;
2. Guard against 3rd-party downtime - CI passes even if hosts such as `gopkg.in` are down, or if someone deletes their GitHub repo/account hosting a particular module.

With Go 1.13 and GitHub Actions, however, we have these problems solved for free:
- The built-in goproxy caches dependencies and speeds up downloads;
- Octofactory ensures that dependencies are cached on our own infrastructure, guarding us from 3rd-party downtime.

With all this in mind, I feel that we don't have to require vendoring dependencies anymore.
@vilmibm
Copy link
Copy Markdown
Contributor

vilmibm commented Oct 23, 2019

i am very supportive of this! possibly a dumb question, but why wouldn't this PR also remove the vendor/ directory?

Copy link
Copy Markdown
Contributor

@probablycorey probablycorey left a comment

Choose a reason for hiding this comment

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

I am pro this idea and just learned about Octofactory. Are we using Octofactory in our actions that build the app?

@mislav
Copy link
Copy Markdown
Contributor Author

mislav commented Oct 25, 2019

but why wouldn't this PR also remove the vendor/ directory?

Good question! Because we've checked into git so many different files that we ultimately don't want to keep (vendor/*, hub stuff, a 10MB gh-cli binary by accident) I wanted to propose that we get rid of unwanted git object cruft by rewriting history and using git-filter-branch to scrub out all unwanted objects. This would considerably slim down every future git clone of this repository. If this sounds like a worthwhile endeavor for you (and you're ready to be inconvenienced by having to reset your local git branch one time to a force-pushed upstream), then we would do it as a follow-up and most likely between dev cycles (once all outstanding PRs have been merged).

Are we using Octofactory in our actions that build the app?

Not explicitly, but we automatically benefit from it. It also enables us to potentially use any private github/* modules (but we don't have a need for any yet).

@probablycorey
Copy link
Copy Markdown
Contributor

I wanted to propose that we get rid of unwanted git object cruft by rewriting history and using git-filter-branch to scrub out all unwanted object.

YES! Let's do it!

@mislav mislav merged commit c898057 into master Oct 28, 2019
@mislav mislav deleted the stop-vendor branch October 28, 2019 14:05
@vilmibm
Copy link
Copy Markdown
Contributor

vilmibm commented Oct 29, 2019

I'm fine with this! Seems better to do it now than later and I don't mind force resetting.

vilmibm pushed a commit that referenced this pull request Jun 29, 2021
mislav pushed a commit that referenced this pull request Sep 28, 2021
feat: introduce repo, branch and machine flags for ghcs create
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.

3 participants