deis / builder

Git server and application builder for Deis Workflow
https://deis.com
MIT License
40 stars 41 forks source link

feat(progress):print status to avoid losing session #290

Closed smothiki closed 8 years ago

smothiki commented 8 years ago

Summary of Changes

This PR adds and new function called progress which prints the message passed to it for every 8 seconds . This avoids session end and remote end hung up errors for builder while waiting to build or pull large images or if the network bandwidth is less.

Issue(s) that this PR Closes

Closes https://github.com/deis/builder/issues/268

Associated End To End Test PR(s)

Testing Instructions

Please provide a detailed list for how to test the changes in this PR.

  1. Create a Deis Cluster
  2. Register a build pack or any app
  3. do git push deis master

Also, please provide a description of the desired result after the tester completes the above steps.

    ],
    "restartPolicy": "Never",
    "serviceAccountName": ""
  },
  "status": {}
}

waiting for the pod to come up ...
waiting for the pod to come up ...
download tar file complete
extracting tar file complete
Step 1 : FROM alpine:3.1
 ---> bdf8036b1c64
----------
---------

waiting for controller to launch App...
Launching App ...
Done, casual-sculptor:v2 deployed to Deis

Use 'deis open' to view this application in your browser

To learn more, use 'deis help' or visit http://deis.io
    "restartPolicy": "Never",
    "serviceAccountName": ""
  },
  "status": {}
}

waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...
waiting for the pod to come up ...

Pull Request Hygiene TODOs

Please make sure the below checklist is complete.

smothiki commented 8 years ago

Every message waits for 8 seconds

smothiki commented 8 years ago

There are no remote end hung errors

smothiki commented 8 years ago

@mboersma Apologies for formating , Tried with microsoft visual studio code with go plugin . realized that it doesn't have gofmt in it

smothiki commented 8 years ago

Will the newlines show up in the git client? It would ruin the UX to have the useful log info scroll away off the page.

Println flushes the messages so will be getting the wait messages at git push end immediately. We are printing the messages only during a build pod pull and while launching the application. We might loose build pod Log info if the launch of the App takes too long. The message wait time is 8 seconds as of now which I think is really high

arschles commented 8 years ago

@smothiki can you fill in the "Summary of Changes" section and ensure that each checkbox is checked in "Pull Request Hygiene TODOs" before merging?

smothiki commented 8 years ago

@arschles made tick configurable . PTAL

mboersma commented 8 years ago

Could you make the commit message shorter and fix its typo? Maybe:

feat(pkg/gitreceive): print progress to keep session alive

smothiki commented 8 years ago

Done