Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Code duplication: cluster/machines manifest location #58

Open
mflendrich opened this issue Sep 17, 2019 · 4 comments
Open

Code duplication: cluster/machines manifest location #58

mflendrich opened this issue Sep 17, 2019 · 4 comments
Labels
tech-debt Unpleasantness that does (or may in future) affect development

Comments

@mflendrich
Copy link
Contributor

The chunk of code that tells whether the cluster/machines.yaml files come from a local FS or from a git repo to be cloned is identical in several places in our code. This is not good, because these implementations will diverge and cause extra maintenance burden.

@mflendrich
Copy link
Contributor Author

Commit d2bae27 marks the places where code repetition happens.

@bensooraj
Copy link

Can I take this up?

@mflendrich
Copy link
Contributor Author

mflendrich commented Oct 14, 2019

Can I take this up?

Sure! Thanks for your will to help.

@bensooraj
Copy link

I am facing some error trying install the dependencies:

$ go get all -v
go: github.com/weaveworks/footloose@v0.0.0-20190829132911-efbcbb7a6390: invalid pseudo-version: does not match version-control timestamp (2019-09-03T13:20:36Z)

Unable to identify what's causing the issue.

Also, as part of the solution, following are my thoughts:

  1. Move the duplicate functions out to pkg/utilities/file.go
  2. Have on function each GetClusterManifestPath() and GetMachinesManifestPath() to fetch the cluster's and the machine's manifest paths respectively.

Please do let me know if I am thinking in the right direction.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tech-debt Unpleasantness that does (or may in future) affect development
Projects
None yet
Development

No branches or pull requests

4 participants