-
Notifications
You must be signed in to change notification settings - Fork 660
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
Migrate to go module #129
Comments
We should definitely do this, it's just a question of when and how to get everyone on our team on the same page. It's pretty high priority I think, if only for conformity to major K8s/go projects. I'll try to look into it soon. |
Awesome! Thanks. |
To collect related PRs:
|
I think I have made everything work (or will be working). Shall we get it going before new dependency updates introduced (e.g. flyteorg/flyteadmin#37)? |
Yes, we should. I want to look at the whole things one more time, across all the repos. Are there still issues with flytepropeller and flytestdlib? Or have those been resolved? I think the pflags change is still outstanding on our side. |
Absolutely. All the problems have been resolved. Flyteidl needs a new build of pflags to work. |
go module bugs and limitations are a bit more than i anticipated. :( |
Discussed some more with @EngHabu on Friday. It seems that the primary goal of both your alternate change, and the change going into go 1.14 is the ability to install specific versions of go tools (like lint, enumer, mockery, etc.). If this is the case, can we not just avoid all this hassle by just pinning the version of each of the tools when running |
Sure we can do that. The benefit having everything in one file is easier to track version changes and less error prone (think about |
@jonathanburns would you be okay with that going into boilerplate? |
During the work migrating from dep to go module, there are a few substantial issues that need to be documented. There is a nice summary on GitHub worth reading as well because most of the issues I have also personally experienced. Missing global flag to install tools for CI alike purposeVery often support tools such as golangci-lint and mockery are needed to compile and apply checks, however due to cmd/go: offer a consistent "global install" command · Issue #30515 · golang/go and there is no good way to install such tools without modifying In comparison, other languages such as Javascript has A possible workaround is illustrated by flyteorg/flytestdlib#51. However things get worse when the need of forking comes, for example: https://github.com/lyft/flyteidl/pull/27/files#r359164560 Another way going forward is to add support tools in There was an attempted fix https://golang.org/cl/203279 but was abandoned in favour of https://go-review.googlesource.com/c/tools/+/211538/ which addressed a variety of issues covered by cmd/go: flags to control changes to go.mod, go.sum · Issue #34506 · golang/go. With this fix, one could maintain two sets of This is a pretty good fix in my opinion! We could maintain two sets of Inconsistency changes of go.sumThis boils down to cmd/go: flags to control changes to go.mod, go.sum · Issue #34506 · golang/go, although it is still weird As illustrated by flyteorg/flyteidl@bdd8117, The purpose of having two checksums is explained by Module authentication using go.sum. Some part of go doesn’t not work with go moduleAs illustrated by this change, There could be other things not working in a similar way, but hopefully we will not need to touch those. Installing CLI provided by the module itselfIllustrated by this change |
@honnix do you think you could change the idl pr one last time to just separate out the go gets into a separate script? Or alternatively make the change from this branch flyteorg/boilerplate#4 and resubmit. |
@wild-endeavor I have a few open comments on flyteorg/boilerplate#4 . Should we get those addressed first? Updated: Tried in flyteorg/boilerplate#5 |
Awesome! I'm so glad we reached some conclusion here and that it's in boilerplate! are you in the process of updating all repos to use that? |
I don't know if we have a solution to the pinning & replacement. At least in the brief amount of time I looked at it, I could not get |
I tried that before but no success. @wild-endeavor |
How is it going with this? |
I did another round of rebasing and cleanup, as well as incorporating boilerplate changes. I think we should really get this going. It's painful to catch up master changes. :( |
Yes, I know it's super painful to keep updating everything all the time. I'm very sorry. We've been super behind with our own review cycle. My only concern is that the boilerplate changes in the PR won't pick this up right? https://github.com/lyft/flyteidl/pull/27/files#diff-37aff102a57d3d7b797f152915a6dc16R31 @EngHabu and I think we should actually opt for https://github.com/lyft/flyteidl/pull/33/files. This is the most stable/flexible approach. As you mentioned, it's the same approach that will be part of 1.14, allows the replace statement construct, pin versions, and allows us to run If we're in agreement, I can help propagate the changes to boilerplate. CC also @jonathanburns |
I would vote for flyteorg/flyteidl#33 as well. |
Just to mention here, flyteorg/boilerplate#4 was merged earlier today. @honnix could you help me pull these changes in? I've already pushed a couple commits to your forked PR of flyteadmin and flyteidl but would you mind doing the others? (i messed up the flyteidl one a bit which is why there are four commits) |
All PRs updated according to latest boilerplate and green now. |
As we are approaching the end of this journey, I think it makes sense to summarise the changes. tl;dr, this is all about simulating Details
|
As of today, we have migrated all golang Flyte repos to use go mod. Thanks to @honnix for driving this change. Boilerplate changes: flyteorg/boilerplate#4 https://github.com/lyft/flytestdlib/releases/tag/v0.3.0 (was already on go mod as of v0.2.29) We’ve introduced a minor workaround to the boilerplate repo (and hence to all other go repos). Please read through the thorough background discussion that @honnix posted around go modules in the GitHub issue (https://github.com/lyft/flyte/issues/129). In order to persist and standardize on a version of the common golang tools, we’ve added a second set of go.mod/sum files. These are listed in the boilerplate PR and basically separate your code from these tools. That is, your code likely uses golangci-lint but that doesn’t mean it should be part of your project’s go.mod files. Honnix’s comment has more information. This dual go.mod approach is also slated to be introduced more formally and rigorously in go 1.14. This is a good overview of the new commands: Note also that in most repos, we’re now pinning the version of client-go to something compatible with the Lyft fork of K8s (see flyteorg/datacatalog#21 (comment) for more information). |
Admin and propeller to use versions that use go mod for dependency management. There was a bug in Admin that was fixed which is why we've gone one version beyond. See related issue: #129 Also, * Removing a broken key in propeller config that's been removed
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
* add placeholder migrations to successfully deploy cacheservice Signed-off-by: Paul Dittamo <pvdittamo@gmail.com> * add persistent flags for cache service * clean up Signed-off-by: Paul Dittamo <pvdittamo@gmail.com> * clean up - add sample cache service config Signed-off-by: Paul Dittamo <pvdittamo@gmail.com> * add cache service otel trace for local builds Signed-off-by: Paul Dittamo <pvdittamo@gmail.com> * update cacheservice section key Signed-off-by: Paul Dittamo <pvdittamo@gmail.com> --------- Signed-off-by: Paul Dittamo <pvdittamo@gmail.com>
Why
vendor
folderThe text was updated successfully, but these errors were encountered: