-
Notifications
You must be signed in to change notification settings - Fork 904
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
chore: Migrate from dep to go modules #331
chore: Migrate from dep to go modules #331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is great, but the code-gen script we use depended on the vendor folder no longer works with this change. When you run make codegen
you get the following error:
mockery -dir ./metricproviders -name Provider -output ./metricproviders/mocks
Generating mock for: Provider in file: metricproviders/mocks/Provider.go
./hack/update-codegen.sh
./hack/update-codegen.sh: line 7: ../code-generator/generate-groups.sh: No such file or directory
make: *** [codegen] Error 1
To get around this, we could follow Linkerd's approach: https://github.com/linkerd/linkerd2/blob/master/bin/update-codegen.sh but I don't like how that still requires vendoring
@dthomson25 Thanks, I started looking at other projects on how they handle the code-gen and |
Hey @lcostea, I wanted to check in to see if you had a chance to try to make those changes. If not worries! I know the end of the year can get busy at times! |
@dthomson25 Just got back today from the New Year's vacation, I will get back on track with everything in the following days. |
d02d0be
to
e30ea17
Compare
@dthomson25 Re the codegen I found a solution that doesn't need vendoring, inspired from https://github.com/weaveworks/flagger/blob/master/hack/update-codegen.sh |
Awesome! That's great that we don't need to vendor the folder! |
186ffd7
to
ebcaf65
Compare
@dthomson25 only now I saw that all my CircleCI pipelines have been failing. |
I took a look at your failed pipeline and I think the Prometheus library is getting upgraded and that version introduces a new method to the API interface which the mock doesn't implement. |
3f9cc07
to
7396f6a
Compare
Thanks, passed that step by installing |
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
=========================================
- Coverage 84.04% 83.7% -0.35%
=========================================
Files 70 70
Lines 6589 6555 -34
=========================================
- Hits 5538 5487 -51
- Misses 762 778 +16
- Partials 289 290 +1
Continue to review full report at Codecov.
|
Hey @lcostea, I pushed your branch to the main repo so the code could take advantage of the increased resources. Looks like it passed! I noticed two issues when I ran through the Makefile:
Do you have this behavior too? |
Hey @lcostea, I talked with @jessesuen, and we decided that we will move forward to the new openapi gen version and address the changes in another PR. So, we can merge this once we get the realpath fix in and fix this last merge conflict. |
Modified github actions, so test can be performed Moved to go 1.13.1 for docker build, for better handling of go modules
Remove /vendor folder from ignore files, it should not exist anymore
Add a dependency on it so it will be downloaded
Install golangci-lint binary directly, not as a dependency
7396f6a
to
2ecab8d
Compare
@dthomson25 fixed the conflict |
Is a pretty standard bash trick to get the real directory of a script -- insofar as I wouldn't even call it that dirty. I prefer using something like this which is platform agnostic, versus increasing the barrier to contribution. |
@jessesuen @dthomson25 using now what you suggested for getting the script directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Unless you want to make any other changes, I'll merge it in!
no other changes, please go ahead |
Migrate from
dep
to go modules:dep
to install dependenciesgo.mod