-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Build extra Go packages into the docker image #84
Build extra Go packages into the docker image #84
Conversation
Pull Request Test Coverage Report for Build 3214373255Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
2488674
to
5ab7751
Compare
@andrerfcsantos Please don't merge yet. I have some input but didn't have the time to test it out yet. |
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.
While considering alternatives, I tried to optimize for easy instructions, both for users and for maintainers. I've also thought of making the external dependencies a dependency of the test runner, but ultimately decided against it because:
Some other considerations:
|
Thanks for clarifying your reasoning here. While I understand the theoretical arguments, I don't think there is a very strong case.
Anyway, you can merge this if you want. Re the "test" I added: It is not an actual test case for the test runner. It is really only an example that can be executed manually. I think CI does not execute the tests inside the final docker container so a normal test case executed via CI would not tell us whether the external dependency mgmt works. |
Thanks for explaining. There are good points there. I'll defer merging, maybe we should think about this a bit more. |
@junedev I don't think the golden tests are setup here. I would have expected a
|
b704122
to
d0ae015
Compare
@junedev Updated the PR to use something similar to your version. The difference is that I kept the separate module for dependency management, as I think is cleaner this way. Let me know if this fully addresses your concerns or if there is something I overlooked. I think this is better indeed, so thanks for the feedback 👍 @ErikSchierboom Thanks for the summary! @ErikSchierboom @junedev If that's ok by you, I'd be more comfortable with addressing the golden tests in a separate issue/PR. I added tests in this PR, but like june said, these tests are not running in CI anywhere as far as I can tell (I did run them locally using docker with no network access and they are passing). Maybe we can address running tests in CI together with the golden tests as they seem to be closely related tasks. |
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.
Thanks for the update! Two more comments around this:
- I wonder about the term "extra packages". I have not really heard that before. Shouldn't it say "external" or "third-party" instead of "extra"?
- You added 2 examples/tests now. Are they covering different aspects? If not, one would be enough.
External packages sound good, changed the naming to it.
The new test added uses code that imports |
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.
One more thing I realized about this new version: We now declare a module within a module. While this works technically, I vaguely remember it was not recommended in some Go guidelines.
I am not aware of any practical disadvantages, so feel free to merge as is. The alternative would be to move the root level go.mod etc into the testrunner folder but then go test ./...
in the root folder would not work anymore even with a workspace file so there would be disadvantages to this approach.
Similar to what other tracks already have, this builds extra Go packages into the docker image so students can use them in their solutions.
The list of packages was discussed here exercism/go#2379