From ce21c642c5591990f4b4fa7c3adcf8f7c990d2c6 Mon Sep 17 00:00:00 2001 From: Serapheim Dimitropoulos Date: Mon, 27 Apr 2020 15:11:11 -0700 Subject: [PATCH 1/2] pylint upgrade: fix new warnings (#218) --- sdb/command.py | 2 +- sdb/commands/zfs/histograms.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdb/command.py b/sdb/command.py index 9d5e09df..83603cca 100644 --- a/sdb/command.py +++ b/sdb/command.py @@ -145,7 +145,7 @@ def help(cls, name: str) -> None: # conditional control flow. # # pylint: disable=unsubscriptable-object - it_text = f"This command accepts inputs of type 'void *'," + it_text = "This command accepts inputs of type 'void *'," if cls.input_type[-1] == '*': it_text += f" and '{cls.input_type[:-1].strip()}'," it_text += f" which will be converted to '{cls.input_type}'." diff --git a/sdb/commands/zfs/histograms.py b/sdb/commands/zfs/histograms.py index aea150c8..9f983b57 100644 --- a/sdb/commands/zfs/histograms.py +++ b/sdb/commands/zfs/histograms.py @@ -143,7 +143,7 @@ def print_histogram(hist: drgn.Object, def _call(self, objs: Iterable[drgn.Object]) -> None: for obj in objs: - print(f'seg-size count') + print('seg-size count') print(f'{"-" * 8} {"-" * 5}') ZFSHistogram.print_histogram(obj, self.args.offset) ZFSHistogram.print_histogram_median(obj, self.args.offset) From 0e1988e2897fe2f02690244012ed8f5000f6fbe1 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 28 Apr 2020 16:27:59 -0700 Subject: [PATCH 2/2] Migrate "sync-with-master" to use "delphix/actions" (#217) --- .github/scripts/install-hub.sh | 3 -- .github/scripts/sync-with-master.sh | 39 -------------------------- .github/workflows/sync-with-master.yml | 6 ++-- 3 files changed, 3 insertions(+), 45 deletions(-) delete mode 100755 .github/scripts/install-hub.sh delete mode 100755 .github/scripts/sync-with-master.sh diff --git a/.github/scripts/install-hub.sh b/.github/scripts/install-hub.sh deleted file mode 100755 index 5caf70f4..00000000 --- a/.github/scripts/install-hub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -eux - -curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s v2.14.2 diff --git a/.github/scripts/sync-with-master.sh b/.github/scripts/sync-with-master.sh deleted file mode 100755 index d8e48786..00000000 --- a/.github/scripts/sync-with-master.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -eux - -# -# This variable must be passed into this script. -# -[[ -n "${BRANCH}" ]] || exit 1 - -# -# We need these config parameters set in order to do the git-merge. -# -git config user.name "${GITHUB_ACTOR}" -git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - -# -# We need the full git repository history in order to do the git-merge. -# -git fetch --unshallow - -# -# In order to open a pull request, we need to push to a remote branch. -# To avoid conflicting with existing remote branches, we use branches -# within the "sync-with-master" namespace. -# -git checkout -b "sync-with-master/${BRANCH}" "origin/${BRANCH}" -git merge -Xtheirs origin/master -git push -f origin "sync-with-master/${BRANCH}" - -# -# Opening a pull request may fail if there already exists a pull request -# for the branch; e.g. if a previous pull request was previously made, -# but not yet merged by the time we run this "sync" script again. Thus, -# rather than causing the automation to report a failure in this case, -# we swallow the error and report success. -# -# Additionally, as along as the git branch was properly updated (via the -# "git push" above), the existing PR will have been updated as well, so -# the "hub" command is unnecessary (hence ignoring the error). -# -git log -1 --format=%B | hub pull-request -F - -b "${BRANCH}" || true diff --git a/.github/workflows/sync-with-master.yml b/.github/workflows/sync-with-master.yml index 5d98d1d1..a6a7a447 100644 --- a/.github/workflows/sync-with-master.yml +++ b/.github/workflows/sync-with-master.yml @@ -14,8 +14,8 @@ jobs: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - - run: ./.github/scripts/install-hub.sh - - run: ./.github/scripts/sync-with-master.sh + - uses: delphix/actions/sync-with-master@master + with: + branch-to-sync: ${{ matrix.branch }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: ${{ matrix.branch }}