Repository navigation
Fix nodejs_image layering - #487
Globegitter wants to merge 9 commits into
Conversation
nlopezgi
left a comment
There was a problem hiding this comment.
Thanks for sending this PR. Mostly looks good. Some, mostly documentation, nits. Will kick off tests. Please make sure to run buildifier on all your files. Thanks again!
| "//lang:image.bzl", | ||
| "app_layer", | ||
| "app_layer_attrs", | ||
| "app_layer_impl", |
There was a problem hiding this comment.
can you alias these with lang_ so that they are visibly distinct from the ones declared here
| ) | ||
|
|
||
| def _app_layer_impl(ctx): | ||
| empty_dirs = ["/".join(["/app", ctx.workspace_name])] |
There was a problem hiding this comment.
can you document here briefly why the empty dirs need to be added (and anything else specific about this impl that makes it different from the one in lang/image.bzl, e.g., what you are doing with the runfiles)
|
Just as a note, I am waiting to get feedback on the |
|
Hi @Globegitter any updates on this PR. We're close to accepting a PR that touches a lot of the same code as this PR (#324) and also affects nodejs layering (please comment on that PR if you have any thoughts). Thanks |
|
@nlopezgi Thanks for pinging me, unfortuantely review on the rules_nodejs has been slow, let me ping the maintainer again and I will check that other PR. |
|
@nlopezgi It should be fine merging the other PR and I will just deal with any conflicts once I get back to this. |
|
hi @Globegitter |
|
We're still very much interested in this change. |
|
@nlopezgi I am sorry I dropped the ball on this I just have not had the time to give this any priority in the past months. Thanks for reminding me about this, I will put it on my todo again. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Globegitter If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@nlopezgi googlecloud is failing - is that remote execution? Has that ever worked with the nodejs images? If it is something I broke is it possible to see the logs? Other than that there are still a few minor things left to clean up but I already tried to address as many of your comments as possible. |
|
So cleaned everything up, seems we do not need the |
nlopezgi
left a comment
There was a problem hiding this comment.
change looks good overall to me. We have some test failing due to this change. We recently added tests that validate passing an empty arg list for nodejs_image behaves as expected (e29affb#diff-29b5d4a8ad7be4e7ac5bb87e28af4619) and for some reason that I could not figure out with a quick inspection of this code the tests are now failing. Could you please check them out and try to figure out why they fail. You probably need to merge the change above into your branch.
|
hi @Globegitter , |
|
@nlopezgi It has been a long process but it is still alive. There was a blocking bug uncovered last minute in bazel-contrib/rules_nodejs#283 which has been resolved recently so now I just need to update that PR and then I can fix this up here. So sorry for the long delay on this but it has not been entirely my fault. |
|
@Globegitter thanks for the update |
|
any updates on this PR, still relevant or should we close? |
|
Yeah let's close it for now - I now have a new proposal to solve this: bazel-contrib/rules_nodejs#863 but still waiting for it to get merged. So once that i done I will create a new PR. |
This builds upon #342 and fixes the layering for the nodejs_image making it work with the latest rules. This is dependent on bazel-contrib/rules_nodejs#283 being merged into rules_nodejs.
The top layer of the example nodejs_image goes down from 64MB to ~60KB. From one of our own apps it reduces it from ~223MB to ~28MB