diff --git a/backport--instructions.rej b/backport--instructions.rej new file mode 100644 index 0000000000000..e9eb0dd8baa80 --- /dev/null +++ b/backport--instructions.rej @@ -0,0 +1,83 @@ +Backport of PR #9014 to branch 4.7 failed + +https://github.com/elastic/kibana/pull/9014 + + +- 1 patch failed to apply +- 2 patches were applied successfully + +------------------------------------- + +At this point, you need to manually resolve these conflicts on your machine and +push the changes back up to this upstream branch so the PR is updated with your +changes. The following instructions and scripts should help with that. + +All of the provided scripts assume that the remote "upstream" is where the +backport branch exists and that your local branch has the exact same name as +the upstream branch. + +First, check out this branch locally: + + git fetch upstream jasper/backport/9014/4.7 + git checkout jasper/backport/9014/4.7 + +Now, just follow one of these two paths: + + +1. GUIDED BACKPORT + +You should do the guided backport if you want to apply the backported changes +while resolving the conflicts on each commit. For most cases, this is what you +want to do. + +The following script will rebase the commits that need to be backported onto +a new temporary branch. Resolve any conflicts as you normally would during a +rebase. Do not remove these backport-*.rej files, and feel free to add +additional commits if that's necessary: + + sh backport-guided-begin.rej + +Once the conficts are resolved and the rebase is completed, the following +script will update the local backport branch with the changes, remove the +temporary branch that was created, remove the remnants of this backport commit +and squash the newly resolved commits (and any others you may have added) into +a single backport commit with the proper commit message: + + sh backport-guided-finish.rej + +At this point, you should be on the local backport branch, and it should be +exactly 1 commit ahead of the intended target. The commit message should be +very similar if not identical to the PR itself, and the changeset should +include all of the changes you intended to backport and none of these +backport-*.rej files. + +Now just replace the contents of the pull request with your local changes: + + git push -f upstream jasper/backport/9014/4.7 + + +2. ALMOST COMPLETELY MANUAL + +You should do this option if there are just so many conflicts that it's easier +to rebuild the entire changeset from scratch. You'll still work on the local +backport branch which should be up to date with the intended target. + +Feel free to add as many commits as you'd like and don't worry about fancy +commit messages - we're just going to squash them down and replace the message +when you're finished. + +Once the changes are committed on your local backport branch, the following +script will remove the remnants of this backport commit and squash the newly +created commits into a single backport commit with the proper commit message. + + sh backport-wrangle-into-commit.rej + +At this point, you should be on the local backport branch, and it should be +exactly 1 commit ahead of the intended target. The commit message should be +very similar if not identical to the PR itself, and the changeset should +include all of the changes you intended to backport and none of these +backport-*.rej files. + +Now just replace the contents of the pull request with your local changes: + + git push -f upstream jasper/backport/9014/4.7 diff --git a/backport-commit-message.rej b/backport-commit-message.rej new file mode 100644 index 0000000000000..6c9e7df140dbe --- /dev/null +++ b/backport-commit-message.rej @@ -0,0 +1,38 @@ +Speed up rendering of large docs in doc table + +Backports PR #9014 + +**Commit 1:** +Speed up rendering of large docs in doc table + +Back in 2014 a utility was added to insert (word break opportunity) +tags into doc table fields to improve their display in the browser. This +utility looped over every character in _source when it was selected as a +column in the doc table, which it was be default. That really started to +slow things down when displaying large docs. I compared how the browser +renders things with and without the 's and there's almost no +difference, certainly nothing as dramatic as shown in the linked PR +which added this word breaking functionality. Perhaps browsers have +improved in the last two years, or perhaps something changed in our CSS. +Since we're getting no or negligible value from this utility and it +makes Discover impossible to use with large docs, I simply removed it. + +Fixes https://github.com/elastic/kibana/issues/6328 +Related https://github.com/elastic/kibana/pull/1993 + +* Original sha: fc443bb76dcfa3f1c69cb884c197307d3b0ab7eb +* Authored by Matthew Bargar on 2016-11-09T00:11:45Z + +**Commit 2:** +Improve word breaking in doc table + +To maintain similar word breaking without adding tags I've added +some css styles that do essentially the same job. word-break: break-word +gives us the best formatting but it's not a part of the standard yet +(see link below) so I provided an almost-as-good fallback with +break-all. + +https://bugs.chromium.org/p/chromium/issues/detail?id=492202#c21 + +* Original sha: ac385245e7a253d85486b005bc9e0482e4fe26af +* Authored by Matthew Bargar on 2016-11-10T23:01:30Z \ No newline at end of file diff --git a/backport-guided-begin.rej b/backport-guided-begin.rej new file mode 100755 index 0000000000000..eb8e14509b80a --- /dev/null +++ b/backport-guided-begin.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/9014/4.7" +WORKING_BRANCH="tmp/$BRANCH" +STARTING_SHA="fc443bb76dcfa3f1c69cb884c197307d3b0ab7eb" +ENDING_SHA="ac385245e7a253d85486b005bc9e0482e4fe26af" + +git fetch $REMOTE + +git checkout -b $WORKING_BRANCH $ENDING_SHA +git rebase $STARTING_SHA^ --onto $BRANCH diff --git a/backport-guided-finish.rej b/backport-guided-finish.rej new file mode 100755 index 0000000000000..3300a7377800c --- /dev/null +++ b/backport-guided-finish.rej @@ -0,0 +1,10 @@ +#!/bin/sh + +BRANCH="jasper/backport/9014/4.7" +WORKING_BRANCH="tmp/$BRANCH" + +git checkout $BRANCH +git reset --hard $WORKING_BRANCH +git branch -D $WORKING_BRANCH + +sh backport-wrangle-into-commit.rej diff --git a/backport-wrangle-into-commit.rej b/backport-wrangle-into-commit.rej new file mode 100755 index 0000000000000..bfb4ee4d7dfb6 --- /dev/null +++ b/backport-wrangle-into-commit.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/9014/4.7" +COMMIT_MSG=`cat backport-commit-message.rej` + +git reset --soft $REMOTE/$BRANCH +git stash +git reset --hard HEAD^ +git stash apply --index + +git commit -m "$COMMIT_MSG" --no-verify