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 2ff39d564a8b1ed158e361fb40a344a651078ee3 Mon Sep 17 00:00:00 2001 From: David Cui Date: Wed, 23 Feb 2022 14:14:19 -0800 Subject: [PATCH 2/2] update backport workflow and add auto delete Signed-off-by: David Cui --- .github/workflows/backport.yml | 18 +++++++++++++++--- .github/workflows/delete_backport_branch.yml | 15 +++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/delete_backport_branch.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index c0d07fef80f..e47d8d88c02 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,6 +1,6 @@ name: Backport on: - pull_request: + pull_request_target: types: - closed - labeled @@ -8,9 +8,21 @@ on: jobs: backport: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write name: Backport steps: + - name: GitHub App token + id: github_app_token + uses: tibdex/github-app-token@v1.5.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + installation_id: 22958780 + - name: Backport - uses: tibdex/backport@v1 + uses: VachaShah/backport@v1.1.4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ steps.github_app_token.outputs.token }} + branch_name: backport/backport-${{ github.event.number }} diff --git a/.github/workflows/delete_backport_branch.yml b/.github/workflows/delete_backport_branch.yml new file mode 100644 index 00000000000..387a124b8cb --- /dev/null +++ b/.github/workflows/delete_backport_branch.yml @@ -0,0 +1,15 @@ +name: Delete merged branch of the backport PRs +on: + pull_request: + types: + - closed + +jobs: + delete-branch: + runs-on: ubuntu-latest + if: startsWith(github.event.pull_request.head.ref,'backport/') + steps: + - name: Delete merged branch + uses: SvanBoxel/delete-merged-branch@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}