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

Get serious about go module hygiene #28

Open
jchesterpivotal opened this issue Sep 9, 2018 · 2 comments
Open

Get serious about go module hygiene #28

jchesterpivotal opened this issue Sep 9, 2018 · 2 comments

Comments

@jchesterpivotal
Copy link
Owner

jchesterpivotal commented Sep 9, 2018

The problem

Right now I basically ignore the business of keeping in sync with the upstream code from Concourse (go-concourse, atc etc). This is in part because Concourse itself is sprawled over multiple repositories that are not really synced with each other within the repositories. The syncing is achieved as a by-product of manufacturing BOSH releases, but not applied back to the repositories in a way that go modules can easily consume.

At the moment I have a little bit of a Frankenstein's go.mod file to try and approximately pin versions. This works, but has problems:

  • I'm trying to work out what to pin to at a git-commit level. I might get it wrong.
  • Concourse keeps moving forward and so too might my upstream dependencies, but many users will want to scrape older versions of Concourse. What's the compatibility matrix going to be like? Or will I take the fly policy and wash my hands of it?

A solution

The Concourse team are aware of the problems of multi-repo sprawl and are working towards consolidating into a monorepo.

When that work lands and stabilises, I anticipate that all my direct dependencies on Concourse code will be safely consumable as a single version line in go.mod. I will be able to introduce pipeline jobs to monitor and update this resource to keep in sync with the upstream.

Open questions

  • Do I abandon vendoring? It provides a useful guarantee of stability and reproducibility, but doesn't seem to be the "approved" way to work with go modules. It also makes the repo much heavier than it needs to be.
    • Following from which: if I drop vendoring, do I prune history or accept the cloning cost forever?

Todos

None currently; the issue is blocked on the upstream work.

@jchesterpivotal jchesterpivotal added this to the v1.x milestone Sep 9, 2018
@jchesterpivotal jchesterpivotal self-assigned this Sep 9, 2018
jchesterpivotal added a commit that referenced this issue Sep 11, 2018
jchesterpivotal added a commit that referenced this issue Sep 11, 2018
Not that I am super happy to give up my safety blanket, but it's
not really going to be easy to maintain _and_ have sensible CI.

So for now I choose CI.

[#28]
[#31]

Signed-off-by: Jacques Chester <[email protected]>
@jchesterpivotal
Copy link
Owner Author

Looks like the answer to "Do I abandon vendoring?" was yes. Not sure about whether to bother pruning, though.

@jchesterpivotal
Copy link
Owner Author

  • As a step to help bring this about, investigate adding go.mod files to concourse/concourse subdirectories and opening a PR.

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

No branches or pull requests

1 participant