Merge ~barryprice/charm-k8s-discourse/+git/charm-k8s-discourse:master into charm-k8s-discourse:master

Proposed by Barry Price
Status: Rejected
Rejected by: Barry Price
Proposed branch: ~barryprice/charm-k8s-discourse/+git/charm-k8s-discourse:master
Merge into: charm-k8s-discourse:master
Diff against target: 18 lines (+9/-1)
1 file modified
image/scripts/pod_setup (+9/-1)
Reviewer Review Type Date Requested Status
Barry Price Needs Fixing
prod-jenkaas-is (community) continuous-integration Approve
Canonical IS Reviewers Pending
Review via email: mp+412553@code.launchpad.net

Commit message

Loop the precompile stage to work around LP:1952681

To post a comment you must log in.
Revision history for this message
prod-jenkaas-is (prod-jenkaas-is) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
prod-jenkaas-is (prod-jenkaas-is) wrote :
review: Approve (continuous-integration)
Revision history for this message
Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

ce8a938... by Barry Price

Clarify output, skip the sed step to avoid mucking around with PIPESTATUS

Revision history for this message
Barry Price (barryprice) wrote (last edit ):

Not sure why, but bundle doesn't seem to be exiting cleanly even on a successful run - so marking this Rejected and adopting a dumber but safer approach:

https://code.launchpad.net/~barryprice/charm-k8s-discourse/+git/charm-k8s-discourse/+merge/412557

review: Needs Fixing

Unmerged commits

ce8a938... by Barry Price

Clarify output, skip the sed step to avoid mucking around with PIPESTATUS

5b0d839... by Barry Price

Loop the precompile stage to work around LP:1952681

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/image/scripts/pod_setup b/image/scripts/pod_setup
2index d716174..ca1c036 100755
3--- a/image/scripts/pod_setup
4+++ b/image/scripts/pod_setup
5@@ -38,4 +38,12 @@ fi
6
7 # It is safe to build assets in the background to improve startup time.
8 export SKIP_NODE_UGLIFY="true"
9-su -s /bin/bash -c "bin/bundle exec rake assets:precompile RAILS_ENV=$RAILS_ENV" ${CONTAINER_APP_USERNAME} 2>&1 |sed 's/^/asset-build: /'
10+## LP#1952681: Some files fail minification - the process does leave us with usable assets, but aborts - so we need to retry
11+success=0
12+attempt=1
13+while [[ "$success" -eq 0 ]];
14+do
15+ echo "Running assets:precompile, attempt #${attempt}";
16+ su -s /bin/bash -c "bin/bundle exec rake assets:precompile RAILS_ENV=$RAILS_ENV" ${CONTAINER_APP_USERNAME} 2>&1 && success=1;
17+ ((attempt++))
18+done

Subscribers

People subscribed via source and target branches