From 143276f6f370a8914952a644fac0f7e5f8c15d9a Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Fri, 3 Oct 2014 11:43:44 -0400 Subject: [PATCH] Improve asset version debugging, lock Gemfile Update readme with Travis debugging info --- assets/README.md | 23 +++++++++++++++++++---- hack/test-assets.sh | 22 ++++++++++++---------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/assets/README.md b/assets/README.md index df6d9bb17f7f..060fe0ab5b37 100644 --- a/assets/README.md +++ b/assets/README.md @@ -13,19 +13,34 @@ Contributing 5. Install dev dependencies by running `hack/install-assets.sh` 6. Launch the console and start watching for asset changes by running `hack/serve-local-assets.sh` - Note: If you see an ENOSPC error running `grunt serve`, you may need to increase the number of files your user can watch by running this command: + Note: If you see an ENOSPC error, you may need to increase the number of files your user can watch by running this command: ``` echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p ``` #### Before opening a pull request -1. Run the test suite with `hack/test-assets.sh` -2. Rebase and squash changes to a single commit +1. If needed, run `hack/build-assets.sh` to update bindata.go +2. Run the test suite with `hack/test-assets.sh` +3. Rebase and squash changes to a single commit #### Production builds 1. Make sure all dev dependencies are up to date by running `hack/install-assets.sh` 2. Run `hack/build-assets.sh` 3. Run `hack/build-go.sh` -The assets served by the OpenShift all-in-one server will now be up to date. By default the assets are served from [http://localhost:8091](http://localhost:8091) \ No newline at end of file +The assets served by the OpenShift all-in-one server will now be up to date. By default the assets are served from [http://localhost:8091](http://localhost:8091) + +#### Debugging Travis failures +If Travis complains that bindata.go is different than the committed version, ensure the committed version is correct: + +1. Run `hack/install-assets.sh` +2. Run `hack/build-assets.sh` +3. If bindata.go is changed, add it to your commit and re-push + +If Travis still complains that bindata.go is different, do the following to get details about what is different: + +1. Run `hack/debug-asset-diff-local.sh` locally +2. Add the generated debug.zip file to a commit and push it to your branch +3. View the diff in the Travis log +4. Once the issue is resolved, remove the commit containing the debug.zip diff --git a/hack/test-assets.sh b/hack/test-assets.sh index 574f2daff71b..27b34b79ad08 100755 --- a/hack/test-assets.sh +++ b/hack/test-assets.sh @@ -28,7 +28,7 @@ popd > /dev/null pushd ${hackdir}/../ > /dev/null Godeps/_workspace/bin/go-bindata -prefix "assets/dist" -pkg "assets" -o "_output/test/assets/bindata.go" assets/dist/... echo "Validating checked in bindata.go is up to date..." - if ! diff _output/test/assets/bindata.go pkg/assets/bindata.go ; then + if ! diff -q _output/test/assets/bindata.go pkg/assets/bindata.go ; then pushd ${hackdir}/../assets > /dev/null @@ -38,17 +38,19 @@ pushd ${hackdir}/../ > /dev/null diff -r dist debug/dist fi - echo "" - echo "Bundler versions..." - bundle list + if [[ "${TRAVIS}" == "true" ]]; then + echo "" + echo "Bundler versions..." + bundle list - echo "" - echo "Bower versions..." - bower list -o + echo "" + echo "Bower versions..." + bower list -o - echo "" - echo "NPM versions..." - npm list + echo "" + echo "NPM versions..." + npm list + fi popd > /dev/null