From ed51fe9f8fd0d4797cab6e1a854d53c0e5533db2 Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Fri, 18 Feb 2022 00:10:33 +0530 Subject: [PATCH] v2.4.1 (#1092) * GHA Yaml lint (#1082) Yaml lint * Register for signals only when running in main thread (#1087) * npm: bump follow-redirects from 1.11.0 to 1.14.8 in /dashboard (#1090) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.11.0 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.11.0...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test-library.yml | 34 ++++++++++++------------------ dashboard/package-lock.json | 31 +++++++++++++++------------ proxy/plugin/program_name.py | 1 - proxy/proxy.py | 4 +++- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index eccb034c44..5fec46783d 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -24,13 +24,15 @@ on: # yamllint disable-line rule:truthy The commit to be released to PyPI and tagged in Git as `release-version`. Normally, you should keep this empty. + required: false YOLO: - default: false + default: "false" description: >- Flag whether test results should block the release (true/false). Only use this under extraordinary circumstances to ignore the test failures and cut the release regardless. + required: false concurrency: group: >- @@ -214,7 +216,7 @@ jobs: needs: - pre-setup # transitive, for accessing settings - runs-on: Ubuntu-latest + runs-on: ubuntu-latest env: PY_COLORS: 1 @@ -329,7 +331,7 @@ jobs: - build - pre-setup # transitive, for accessing settings - runs-on: Ubuntu-latest + runs-on: ubuntu-latest strategy: matrix: toxenv: @@ -541,7 +543,7 @@ jobs: verbose: true test-container: - runs-on: Ubuntu-latest + runs-on: ubuntu-latest permissions: packages: write if: success() @@ -549,8 +551,6 @@ jobs: - pre-setup # transitive, for accessing settings - build name: 🐳 Build & Test - strategy: - fail-fast: false steps: - name: Checkout uses: actions/checkout@v2 @@ -740,7 +740,7 @@ jobs: python3 -m proxy --version ghcr-latest: - runs-on: Ubuntu-latest + runs-on: ubuntu-latest permissions: packages: write if: success() @@ -748,8 +748,6 @@ jobs: - test-container - pre-setup # transitive, for accessing settings name: 🐳 ghcr:latest - strategy: - fail-fast: false steps: - name: Checkout uses: actions/checkout@v2 @@ -824,7 +822,7 @@ jobs: -t $LATEST_TAG . ghcr-openssl: - runs-on: Ubuntu-latest + runs-on: ubuntu-latest permissions: packages: write if: success() @@ -832,8 +830,6 @@ jobs: - test-container - pre-setup # transitive, for accessing settings name: 🐳 ghcr:openssl - strategy: - fail-fast: false steps: - name: Checkout uses: actions/checkout@v2 @@ -906,7 +902,7 @@ jobs: -t $LATEST_TAG . docker-latest: - runs-on: Ubuntu-latest + runs-on: ubuntu-latest permissions: packages: write if: success() @@ -914,8 +910,6 @@ jobs: - test-container - pre-setup # transitive, for accessing settings name: 🐳 docker:latest - strategy: - fail-fast: false steps: - name: Checkout uses: actions/checkout@v2 @@ -981,7 +975,7 @@ jobs: - ghcr-openssl - docker-latest - runs-on: Ubuntu-latest + runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed @@ -996,7 +990,7 @@ jobs: - pre-setup # transitive, for accessing settings if: >- fromJSON(needs.pre-setup.outputs.release-requested) - runs-on: Ubuntu-latest + runs-on: ubuntu-latest environment: name: release @@ -1025,7 +1019,7 @@ jobs: if: >- fromJSON(needs.pre-setup.outputs.is-untagged-devel) || fromJSON(needs.pre-setup.outputs.release-requested) - runs-on: Ubuntu-latest + runs-on: ubuntu-latest environment: name: release-testpypi @@ -1054,7 +1048,7 @@ jobs: needs: - publish-pypi - pre-setup # transitive, for accessing settings - runs-on: Ubuntu-latest + runs-on: ubuntu-latest steps: - name: Fetch the src snapshot @@ -1087,7 +1081,7 @@ jobs: needs: - post-release-repo-update - pre-setup # transitive, for accessing settings - runs-on: Ubuntu-latest + runs-on: ubuntu-latest permissions: contents: write diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json index bbbd23364d..c4922bd583 100644 --- a/dashboard/package-lock.json +++ b/dashboard/package-lock.json @@ -1985,15 +1985,23 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", - "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "dev": true, - "dependencies": { - "debug": "^3.0.0" - }, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], "engines": { "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } } }, "node_modules/forever-agent": { @@ -6691,13 +6699,10 @@ "dev": true }, "follow-redirects": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", - "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", - "dev": true, - "requires": { - "debug": "^3.0.0" - } + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", + "dev": true }, "forever-agent": { "version": "0.6.1", diff --git a/proxy/plugin/program_name.py b/proxy/plugin/program_name.py index 0aaadcb817..4672279127 100644 --- a/proxy/plugin/program_name.py +++ b/proxy/plugin/program_name.py @@ -35,7 +35,6 @@ def before_upstream_connection( raise NotImplementedError() assert self.client.addr if self.client.addr[0] in ('::1', '127.0.0.1'): - assert self.client.addr port = self.client.addr[1] ls = subprocess.Popen( ('lsof', '-i', '-P', '-n'), diff --git a/proxy/proxy.py b/proxy/proxy.py index 3ea2f4a546..b9b602d6de 100644 --- a/proxy/proxy.py +++ b/proxy/proxy.py @@ -14,6 +14,7 @@ import pprint import signal import logging +import threading from typing import TYPE_CHECKING, Any, List, Optional, cast from .core.ssh import SshTunnelListener, SshHttpProtocolHandler @@ -255,7 +256,8 @@ def setup(self) -> None: ('', self.flags.tunnel_remote_port), ) # TODO: May be close listener fd as we don't need it now - self._register_signals() + if threading.current_thread() == threading.main_thread(): + self._register_signals() def shutdown(self) -> None: if self.flags.enable_ssh_tunnel: