You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/05 07:24:34 UTC

[GitHub] [apisix-ingress-controller] tokers opened a new pull request #340: chore: optimize dockerfile

tokers opened a new pull request #340:
URL: https://github.com/apache/apisix-ingress-controller/pull/340


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [ ] Bugfix
   - [ ] New feature provided
   - [x] Improve performance
   - [ ] Backport patches
   
   - Related issues
   
   ___
   ### Bugfix
   - Description
   
   - How to fix?
   
   ___
   ### New feature or improvement
   - Describe the details and related test reports.
   
   This PR optimized the image building speed by specifying the `go mod download` before copying all files so the docker build-cache about go modules can be leveraged as soon as possible (as long as the `go.mod`  and `go.sum` files don't change).
   
   ___
   ### Backport patches
   - Why need to backport?
   
   - Source branch
   
   - Related commits and pull requests
   
   - Target branch
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] gxthrj merged pull request #340: chore: optimize dockerfile

Posted by GitBox <gi...@apache.org>.
gxthrj merged pull request #340:
URL: https://github.com/apache/apisix-ingress-controller/pull/340


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] codecov-io edited a comment on pull request #340: chore: optimize dockerfile

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #340:
URL: https://github.com/apache/apisix-ingress-controller/pull/340#issuecomment-813243937


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=h1) Report
   > Merging [#340](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=desc) (5332c95) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/456efa6836e3195cc0fcb6603fb9243c1033860a?el=desc) (456efa6) will **decrease** coverage by `0.48%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #340      +/-   ##
   ==========================================
   - Coverage   43.84%   43.36%   -0.49%     
   ==========================================
     Files          40       39       -1     
     Lines        3435     3434       -1     
   ==========================================
   - Hits         1506     1489      -17     
   - Misses       1761     1775      +14     
   - Partials      168      170       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [pkg/apisix/cluster.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340/diff?src=pr&el=tree#diff-cGtnL2FwaXNpeC9jbHVzdGVyLmdv) | `28.44% <0.00%> (-5.97%)` | :arrow_down: |
   | [pkg/apisix/route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340/diff?src=pr&el=tree#diff-cGtnL2FwaXNpeC9yb3V0ZS5nbw==) | `43.47% <0.00%> (-1.87%)` | :arrow_down: |
   | [test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340/diff?src=pr&el=tree#diff-dGVzdC9lMmUvZTJlLmdv) | | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=footer). Last update [456efa6...5332c95](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] codecov-io commented on pull request #340: chore: optimize dockerfile

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #340:
URL: https://github.com/apache/apisix-ingress-controller/pull/340#issuecomment-813243937


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=h1) Report
   > Merging [#340](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=desc) (f7da0a2) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/456efa6836e3195cc0fcb6603fb9243c1033860a?el=desc) (456efa6) will **decrease** coverage by `0.48%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #340      +/-   ##
   ==========================================
   - Coverage   43.84%   43.36%   -0.49%     
   ==========================================
     Files          40       39       -1     
     Lines        3435     3434       -1     
   ==========================================
   - Hits         1506     1489      -17     
   - Misses       1761     1775      +14     
   - Partials      168      170       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [pkg/apisix/cluster.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340/diff?src=pr&el=tree#diff-cGtnL2FwaXNpeC9jbHVzdGVyLmdv) | `28.44% <0.00%> (-5.97%)` | :arrow_down: |
   | [pkg/apisix/route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340/diff?src=pr&el=tree#diff-cGtnL2FwaXNpeC9yb3V0ZS5nbw==) | `43.47% <0.00%> (-1.87%)` | :arrow_down: |
   | [test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340/diff?src=pr&el=tree#diff-dGVzdC9lMmUvZTJlLmdv) | | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=footer). Last update [456efa6...f7da0a2](https://codecov.io/gh/apache/apisix-ingress-controller/pull/340?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] membphis commented on a change in pull request #340: chore: optimize dockerfile

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #340:
URL: https://github.com/apache/apisix-ingress-controller/pull/340#discussion_r607099791



##########
File path: Dockerfile
##########
@@ -22,6 +22,10 @@ RUN rm -rf /etc/localtime \
     && dpkg-reconfigure -f noninteractive tzdata
 
 WORKDIR /build
+COPY go.mod .
+COPY go.sum .
+RUN GOPROXY=https://goproxy.cn,direct go mod download

Review comment:
       Is it better to add parameters to make this step optional? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #340: chore: optimize dockerfile

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #340:
URL: https://github.com/apache/apisix-ingress-controller/pull/340#discussion_r607101465



##########
File path: Dockerfile
##########
@@ -22,6 +22,10 @@ RUN rm -rf /etc/localtime \
     && dpkg-reconfigure -f noninteractive tzdata
 
 WORKDIR /build
+COPY go.mod .
+COPY go.sum .
+RUN GOPROXY=https://goproxy.cn,direct go mod download

Review comment:
       You mean the go proxy?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org