From d67729a032a9205e160a89c2a91e0ecb78e27adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Qi=CE=BC=24hi=D0=AFu=C3=AD?= <39378935+srstack@users.noreply.github.com> Date: Tue, 19 Apr 2022 11:50:04 +0800 Subject: [PATCH 1/2] ci: support-auto-update-homebrew (#1844) --- .github/workflows/release-tiup.yaml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/release-tiup.yaml b/.github/workflows/release-tiup.yaml index a0821e1431..047cca3056 100644 --- a/.github/workflows/release-tiup.yaml +++ b/.github/workflows/release-tiup.yaml @@ -26,6 +26,8 @@ jobs: release: runs-on: ubuntu-latest timeout-minutes: 30 + outputs: + REL_VER: ${{ steps.build_tiup.outputs.REL_VER }} strategy: fail-fast: true matrix: @@ -195,3 +197,40 @@ jobs: omitNameDuringUpdate: true prerelease: ${{ github.event.release.prerelease }} token: ${{ secrets.GITHUB_TOKEN }} + + brew-upgrade: + runs-on: ubuntu-latest + timeout-minutes: 5 + needs: release + steps: + - name: Check out brew code + uses: actions/checkout@v3 + continue-on-error: true + if: github.event_name == 'release' + with: + repository: pingcap/homebrew-brew + persist-credentials: false + ref: master + path: ${{ github.workspace }}/homebrew-brew + fetch-depth: 0 + + - name: Update and Check tiup version + id: update_version + working-directory: ${{ github.workspace }}/homebrew-brew + continue-on-error: true + if: github.event_name == 'release' + run: | + sed -i 's/version.*/version "${{ needs.release.outputs.REL_VER }}"/g' Formula/tiup.rb + sed -i 's/tag:.*/tag: "${{ needs.release.outputs.REL_VER }}"/g' Formula/tiup.rb + cat Formula/tiup.rb + + - name: Push new homebrew + uses: actions-js/push@master + continue-on-error: true + if: github.event_name == 'release' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + directory: ${{ github.workspace }}/homebrew-brew + message: "tiup: ${{ needs.release.outputs.REL_VER }}" + branch: master + repository: pingcap/homebrew-brew \ No newline at end of file From e5b8861326e6e30181aaff40f289158908a86045 Mon Sep 17 00:00:00 2001 From: nexustar Date: Tue, 19 Apr 2022 14:20:04 +0800 Subject: [PATCH 2/2] dm: bind to 0.0.0.0 (#1845) --- embed/templates/scripts/run_dm-master.sh.tpl | 2 +- embed/templates/scripts/run_dm-master_scale.sh.tpl | 2 +- embed/templates/scripts/run_dm-worker.sh.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/embed/templates/scripts/run_dm-master.sh.tpl b/embed/templates/scripts/run_dm-master.sh.tpl index 246e2097ad..39fde5e418 100644 --- a/embed/templates/scripts/run_dm-master.sh.tpl +++ b/embed/templates/scripts/run_dm-master.sh.tpl @@ -25,7 +25,7 @@ exec bin/dm-master/dm-master \ --v1-sources-path="{{.V1SourcePath}}" \ {{- end}} --name="{{.Name}}" \ - --master-addr="{{.IP}}:{{.Port}}" \ + --master-addr="0.0.0.0:{{.Port}}" \ --advertise-addr="{{.IP}}:{{.Port}}" \ --peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \ --advertise-peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \ diff --git a/embed/templates/scripts/run_dm-master_scale.sh.tpl b/embed/templates/scripts/run_dm-master_scale.sh.tpl index 90572b0241..13a31977aa 100644 --- a/embed/templates/scripts/run_dm-master_scale.sh.tpl +++ b/embed/templates/scripts/run_dm-master_scale.sh.tpl @@ -22,7 +22,7 @@ exec numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} bin/dm-master/d exec bin/dm-master/dm-master \ {{- end}} --name="{{.Name}}" \ - --master-addr="{{.IP}}:{{.Port}}" \ + --master-addr="0.0.0.0:{{.Port}}" \ --advertise-addr="{{.IP}}:{{.Port}}" \ --peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \ --advertise-peer-urls="{{.Scheme}}://{{.IP}}:{{.PeerPort}}" \ diff --git a/embed/templates/scripts/run_dm-worker.sh.tpl b/embed/templates/scripts/run_dm-worker.sh.tpl index df11e96e20..f1074b4967 100644 --- a/embed/templates/scripts/run_dm-worker.sh.tpl +++ b/embed/templates/scripts/run_dm-worker.sh.tpl @@ -23,7 +23,7 @@ exec numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} bin/dm-worker/d exec bin/dm-worker/dm-worker \ {{- end}} --name="{{.Name}}" \ - --worker-addr="{{.IP}}:{{.Port}}" \ + --worker-addr="0.0.0.0:{{.Port}}" \ --advertise-addr="{{.IP}}:{{.Port}}" \ --log-file="{{.LogDir}}/dm-worker.log" \ --join="{{template "MasterList" .Endpoints}}" \