From 69a658e3007877fe591755f95057d3e511911653 Mon Sep 17 00:00:00 2001 From: David Cui Date: Wed, 5 May 2021 18:06:21 -0700 Subject: [PATCH 1/2] fixed no-error-output bug in workbench (#32) Signed-off-by: David Cui --- workbench/public/components/Main/main.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workbench/public/components/Main/main.tsx b/workbench/public/components/Main/main.tsx index 2ff52b90b05..625c485f80e 100644 --- a/workbench/public/components/Main/main.tsx +++ b/workbench/public/components/Main/main.tsx @@ -276,8 +276,11 @@ export class Main extends React.Component { let err = response.data.resp; console.log("Error occurred when processing query response: ", err) - // Mark fulfilled to true as long as the data is fulfilled - if (response.data.body) { + // Exclude a special case from the error cases: + // When downloading the csv result, it gets the "Unable to parse/serialize body" response + // But data is also returned in data body. For this case: + // Mark fulfilled to true for this case to write the csv result to downloading file + if (response.data.body && err == "Unable to parse/serialize body") { return { fulfilled: true, errorMessage: err, @@ -287,6 +290,7 @@ export class Main extends React.Component { return { fulfilled: false, errorMessage: err, + data: '' }; } From c27e55cabe6546177fdb80676d537c769d7ded22 Mon Sep 17 00:00:00 2001 From: David Cui Date: Wed, 23 Feb 2022 10:52:25 -0800 Subject: [PATCH 2/2] add auto backporting for sql Signed-off-by: David Cui --- .github/workflows/backport.yml | 16 ++++++++++++++++ DEVELOPER_GUIDE.rst | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000000..c0d07fef80f --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,16 @@ +name: Backport +on: + pull_request: + types: + - closed + - labeled + +jobs: + backport: + runs-on: ubuntu-latest + name: Backport + steps: + - name: Backport + uses: tibdex/backport@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/DEVELOPER_GUIDE.rst b/DEVELOPER_GUIDE.rst index 1b634241db9..e9bb943fe75 100644 --- a/DEVELOPER_GUIDE.rst +++ b/DEVELOPER_GUIDE.rst @@ -381,3 +381,13 @@ Doctest >>>>>>> Python doctest library makes our document executable which keeps it up-to-date to source code. The doc generator aforementioned served as scaffolding and generated many docs in short time. Now the examples inside is changed to doctest gradually. For more details please read `Doctest <./dev/Doctest.md>`_. + + +Backports +>>>>>>>>> + +The Github workflow in `backport.yml <.github/workflows/backport.yml>`_ creates backport PRs automatically when the original PR +with an appropriate label `backport ` is merged to main with the backport workflow run successfully on the +PR. For example, if a PR on main needs to be backported to `1.x` branch, add a label `backport 1.x` to the PR and make sure the +backport workflow runs on the PR along with other checks. Once this PR is merged to main, the workflow will create a backport PR +to the `1.x` branch.