LinkinStars commented on PR #1318:
URL: https://github.com/apache/answer/pull/1318#issuecomment-2829888686

   LGTM. The test results prove that it works. Under the same Dockerfile, it 
exits immediately when an error occurs.
   
   
   ## Before
   
   ```
   ....
    => [golang-builder 7/8] RUN npm install -g [email protected]                       
                                                                                
                                                                                
                                         2.3s 
    => [golang-builder 8/8] RUN answer build     --with 
github.com/apache/2answer-plugins/connector-basic     --with 
github.com/apache/answer-plugins/editor-chart     --with 
github.com/apache/answer-plugins/editor-formula     --output 
/usr/bin/new_answer                          49.9s 
    => ERROR [stage-2 4/7] COPY --from=golang-builder /usr/bin/new_answer 
/usr/bin/answer                                                                 
                                                                                
                                               0.0s 
   ------                                                                       
                                                                                
                                                                                
                                              
    > [stage-2 4/7] COPY --from=golang-builder /usr/bin/new_answer 
/usr/bin/answer:                                                                
                                                                                
                                                           
   ------                                                                       
                                                                                
                                                                                
                                              
   Dockerfile:45                                                                
                                                                                
                                                                                
                                              
   --------------------                                                         
                                                                                
                                                                                
                                              
     43 |         && echo "${TIMEZONE}" > /etc/timezone                         
                                                                                
                                                                                
                                              
     44 |                                                                       
                                                                                
                                                                                
                                              
     45 | >>> COPY --from=golang-builder /usr/bin/new_answer /usr/bin/answer    
                                                                                
                                                                                
                                              
     46 |     COPY --from=answer-builder /data /data
     47 |     COPY --from=answer-builder /entrypoint.sh /entrypoint.sh
   --------------------
   ERROR: failed to solve: failed to compute cache key: failed to calculate 
checksum of ref 
e472f1a6-c909-4649-abdc-963439566abf::d38te3mhaob7ovfbdyzmppwpe: 
"/usr/bin/new_answer": not found
   ```
   
   ## After
   
   ```
    => [golang-builder 7/8] RUN npm install -g [email protected]                       
                                                                                
                                                                                
                                         1.4s 
    => ERROR [golang-builder 8/8] RUN answer build     --with 
github.com/apache/2answer-plugins/connector-basic     --with 
github.com/apache/answer-plugins/editor-chart     --with 
github.com/apache/answer-plugins/editor-formula     --output 
/usr/bin/new_answer                    42.1s 
   ------                                                                       
                                                                                
                                                                                
                                              
    > [golang-builder 8/8] RUN answer build     --with 
github.com/apache/2answer-plugins/connector-basic     --with 
github.com/apache/answer-plugins/editor-chart     --with 
github.com/apache/answer-plugins/editor-formula     --output 
/usr/bin/new_answer:                                
   ................
   41.06 build failed exit status 1
   ------
   Dockerfile:18
   --------------------
     17 |     
     18 | >>> RUN answer build \
     19 | >>>     --with github.com/apache/2answer-plugins/connector-basic \
     20 | >>>     --with github.com/apache/answer-plugins/editor-chart \
     21 | >>>     --with github.com/apache/answer-plugins/editor-formula \
     22 | >>>     --output /usr/bin/new_answer
     23 |     
   --------------------
   ERROR: failed to solve: process "/bin/sh -c answer build     --with 
github.com/apache/2answer-plugins/connector-basic     --with 
github.com/apache/answer-plugins/editor-chart     --with 
github.com/apache/answer-plugins/editor-formula     --output 
/usr/bin/new_answer" did not complete successfully: exit code: 1
   ```


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to