You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/05/19 20:22:10 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new pull request #5872: Fix enroller build error due to out-of-scope ARG

ocket8888 opened a new pull request #5872:
URL: https://github.com/apache/trafficcontrol/pull/5872


   ## What does this PR (Pull Request) do?
   - [x] This PR is not related to any Issue
   
   This PR fixes a bug in the CDN-in-a-Box build system where the enroller's Dockerfile uses an `ARG` that was defined in a previous build stage. From the Dockerfile reference:
   
   > _"An `ARG` instruction goes out of scope at the end of the build stage where it was defined. To use an arg in multiple stages, each stage must include the `ARG` instruction."_
   
   ## Which Traffic Control components are affected by this PR?
   - CDN in a Box
   
   ## What is the best way to verify this PR?
   Verify that the enroller image can build (may need to clean up Docker cache).
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   - master
   
   ## The following criteria are ALL met by this PR
   - [x] Tests are unnecessary
   - [x] Documentation is unnecessary
   - [x] An update to CHANGELOG.md is not necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


-- 
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] [trafficcontrol] zrhoffman commented on a change in pull request #5872: Fix enroller build error due to out-of-scope ARG

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5872:
URL: https://github.com/apache/trafficcontrol/pull/5872#discussion_r635681929



##########
File path: infrastructure/cdn-in-a-box/enroller/Dockerfile
##########
@@ -43,7 +43,7 @@ COPY ./traffic_ops/v4-client/ /go/src/github.com/apache/trafficcontrol/traffic_o
 COPY ./infrastructure/cdn-in-a-box/ /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/
 
 WORKDIR /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/enroller
-RUN set -o errexit -o nounset; \
+RUN set -o errexit; \

Review comment:
       We shouldn't remove `-o nounset`, though, since it found an error. We just need to move the definition for the build arg that is not properly defined.




-- 
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] [trafficcontrol] zrhoffman merged pull request #5872: Fix enroller build error due to out-of-scope ARG

Posted by GitBox <gi...@apache.org>.
zrhoffman merged pull request #5872:
URL: https://github.com/apache/trafficcontrol/pull/5872


   


-- 
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] [trafficcontrol] zrhoffman commented on a change in pull request #5872: Fix enroller build error due to out-of-scope ARG

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5872:
URL: https://github.com/apache/trafficcontrol/pull/5872#discussion_r635681929



##########
File path: infrastructure/cdn-in-a-box/enroller/Dockerfile
##########
@@ -43,7 +43,7 @@ COPY ./traffic_ops/v4-client/ /go/src/github.com/apache/trafficcontrol/traffic_o
 COPY ./infrastructure/cdn-in-a-box/ /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/
 
 WORKDIR /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/enroller
-RUN set -o errexit -o nounset; \
+RUN set -o errexit; \

Review comment:
       We shouldn't remove `-o nounset`, since it found an error. We just need to move the definition for the build arg that is not properly defined.




-- 
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] [trafficcontrol] zrhoffman commented on pull request #5872: Fix enroller build error due to out-of-scope ARG

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #5872:
URL: https://github.com/apache/trafficcontrol/pull/5872#issuecomment-845350133


   Passed on @ocket8888's fork
   https://github.com/ocket8888/trafficcontrol/actions/runs/861243318


-- 
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] [trafficcontrol] ocket8888 commented on a change in pull request #5872: Fix enroller build error due to out-of-scope ARG

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #5872:
URL: https://github.com/apache/trafficcontrol/pull/5872#discussion_r636164097



##########
File path: infrastructure/cdn-in-a-box/enroller/Dockerfile
##########
@@ -43,7 +43,7 @@ COPY ./traffic_ops/v4-client/ /go/src/github.com/apache/trafficcontrol/traffic_o
 COPY ./infrastructure/cdn-in-a-box/ /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/
 
 WORKDIR /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/enroller
-RUN set -o errexit -o nounset; \
+RUN set -o errexit; \

Review comment:
       I did that on purpose instead of copying the arg down, because I was thinking "well it's only unset because I'm not debugging". That's not how that works.




-- 
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