From 053cf2bcc0cff8bb97d1fd4e9c06f29464eed701 Mon Sep 17 00:00:00 2001 From: ilia Date: Mon, 9 Jun 2025 11:35:43 +0300 Subject: [PATCH 1/4] update packages --- panoply/constants.py | 2 +- setup.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/panoply/constants.py b/panoply/constants.py index a54d744..e5b2905 100644 --- a/panoply/constants.py +++ b/panoply/constants.py @@ -1,2 +1,2 @@ -__version__ = "3.2.0" +__version__ = "3.2.1" __package_name__ = "panoply-python-sdk" diff --git a/setup.py b/setup.py index 194d62c..f890c08 100644 --- a/setup.py +++ b/setup.py @@ -17,12 +17,11 @@ version=__version__, packages=["panoply", "panoply.errors"], install_requires=[ - "requests==2.21.0", + "requests==2.32.3", "oauth2client==4.1.1", "backoff==1.10.0", "sshtunnel==0.1.5", - "paramiko==2.11.0", - "cryptography == 42.0.8", + "paramiko==3.5.1", ], extras_require={ "test": [ From 90090d4e1f436565e05c69a83f8d94c6e86a44bd Mon Sep 17 00:00:00 2001 From: ilia Date: Mon, 9 Jun 2025 12:10:23 +0300 Subject: [PATCH 2/4] update github action to use ubuntu-22.04 --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b02737..091bc71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,12 +8,12 @@ on: branches: [master] env: - python_version: 3.8.2 + python_version: 3.11.12 jobs: check-version: name: ๐Ÿ” Check version - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: version: ${{ steps.retrieve-version.outputs.version }} steps: @@ -31,7 +31,7 @@ jobs: run-tests: name: ๐Ÿงช Run tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: ๐Ÿ™ Checkout repository uses: actions/checkout@v3 @@ -63,7 +63,7 @@ jobs: name: ๐ŸŽ‰ Create release needs: [check-version, run-tests] if: github.event_name == 'push' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write steps: @@ -77,7 +77,7 @@ jobs: name: ๐Ÿ”” Send notifications needs: [check-version, run-tests, create-release] if: github.event_name == 'push' && always() - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: ๐Ÿ“ Retrieve workflow result id: retrieve-workflow-result From 916305bc6720fb530c5bc0e1e982280083f85b2f Mon Sep 17 00:00:00 2001 From: ilia Date: Mon, 9 Jun 2025 12:29:01 +0300 Subject: [PATCH 3/4] replace the github action with our reusable --- .github/workflows/main.yml | 115 ++----------------------------------- 1 file changed, 4 insertions(+), 111 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 091bc71..bc3ef6f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,118 +5,11 @@ on: branches: [master] pull_request: - branches: [master] - -env: - python_version: 3.11.12 jobs: - check-version: - name: ๐Ÿ” Check version - runs-on: ubuntu-22.04 - outputs: - version: ${{ steps.retrieve-version.outputs.version }} - steps: - - name: ๐Ÿ™ Checkout repository - uses: actions/checkout@v3 - - - name: ๐Ÿ“ Retrieve version - id: retrieve-version - run: | - echo "::set-output name=version::$(python setup.py --version 2> /dev/null)" - - - name: ๐Ÿ” Check git tag availability - run: | - ! git ls-remote --exit-code --tags origin v${{ steps.retrieve-version.outputs.version }} - - run-tests: - name: ๐Ÿงช Run tests - runs-on: ubuntu-22.04 - steps: - - name: ๐Ÿ™ Checkout repository - uses: actions/checkout@v3 - - - name: ๐Ÿ”ง Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ env.python_version }} - cache: pip - cache-dependency-path: setup.py - - - name: ๐Ÿ“ฆ Install dependencies - run: | - python -m pip install -e .[test] - - - name: ๐Ÿ‘๏ธ Run linters - run: | - pycodestyle --format=pylint --max-line-length=120 --count . - - - name: ๐Ÿงช Run tests - run: | - coverage run -m unittest discover tests - - - name: ๐Ÿ“ข Report coverage - run: | - coverage report -im - - create-release: - name: ๐ŸŽ‰ Create release - needs: [check-version, run-tests] - if: github.event_name == 'push' - runs-on: ubuntu-22.04 + python-package: + name: ๐Ÿ Python Package + uses: panoplyio/actions/.github/workflows/python-package.yml@master + secrets: inherit permissions: contents: write - steps: - - name: ๐ŸŽ‰ Create release - uses: softprops/action-gh-release@v1 - with: - tag_name: v${{ needs.check-version.outputs.version }} - target_commitish: ${{ github.sha }} - - send-notifications: - name: ๐Ÿ”” Send notifications - needs: [check-version, run-tests, create-release] - if: github.event_name == 'push' && always() - runs-on: ubuntu-22.04 - steps: - - name: ๐Ÿ“ Retrieve workflow result - id: retrieve-workflow-result - run: | - if [ ${{ needs.check-version.result }} = 'success' ] \ - && [ ${{ needs.run-tests.result }} = 'success' ] \ - && [ ${{ needs.create-release.result }} = 'success' ] - then - echo "::set-output name=result::success" - echo "::set-output name=message::succeeded" - elif [ ${{ needs.check-version.result }} = 'cancelled' ] \ - || [ ${{ needs.run-tests.result }} = 'cancelled' ] \ - || [ ${{ needs.create-release.result }} = 'cancelled' ] - then - echo "::set-output name=result::cancelled" - echo "::set-output name=message::canceled" - else - echo "::set-output name=result::failure" - echo "::set-output name=message::failed" - fi - - - name: ๐Ÿ“ Retrieve origin url message - id: retrieve-origin-url-message - run: | - echo "::set-output name=message::" - - - name: ๐Ÿ”” Send Slack notification - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_TITLE: ' ' - SLACK_COLOR: ${{ steps.retrieve-workflow-result.outputs.result }} - SLACK_MESSAGE: >- - - of ${{ steps.retrieve-origin-url-message.outputs.message }} - on - by ${{ github.actor }} - ${{ steps.retrieve-workflow-result.outputs.message }} - SLACK_MSG_AUTHOR: ' ' - SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_FOOTER: ' ' - MSG_MINIMAL: true From 248628043430ce46e46a665377dc7d55fdb19bdb Mon Sep 17 00:00:00 2001 From: ilia Date: Mon, 9 Jun 2025 13:40:51 +0300 Subject: [PATCH 4/4] use full github action instead of reusable from panoplyio/actions, because sdk repo is public and cannot use private actions --- .github/workflows/main.yml | 112 +++++++++++++++++++++++++++++++++++-- 1 file changed, 108 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc3ef6f..3bf7b07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,11 +5,115 @@ on: branches: [master] pull_request: + branches: [master] + +env: + python_version: 3.11.12 jobs: - python-package: - name: ๐Ÿ Python Package - uses: panoplyio/actions/.github/workflows/python-package.yml@master - secrets: inherit + check-version: + name: ๐Ÿ” Check version + runs-on: ubuntu-22.04 + outputs: + version: ${{ steps.retrieve-version.outputs.version }} + steps: + - name: ๐Ÿ™ Checkout repository + uses: actions/checkout@v3 + + - name: ๐Ÿ“ Retrieve version + id: retrieve-version + run: | + echo "::set-output name=version::$(python setup.py --version 2> /dev/null)" + + - name: ๐Ÿ” Check git tag availability + run: | + ! git ls-remote --exit-code --tags origin v${{ steps.retrieve-version.outputs.version }} + + run-tests: + name: ๐Ÿงช Run tests + runs-on: ubuntu-22.04 + steps: + - name: ๐Ÿ™ Checkout repository + uses: actions/checkout@v3 + + - name: ๐Ÿ”ง Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ env.python_version }} + cache: pip + cache-dependency-path: setup.py + + - name: ๐Ÿ“ฆ Install dependencies + run: | + python -m pip install -e .[test] + + - name: ๐Ÿ‘๏ธ Run linters + run: | + pycodestyle --format=pylint --max-line-length=120 --count . + + - name: ๐Ÿงช Run tests + run: | + coverage run -m unittest discover tests + + - name: ๐Ÿ“ข Report coverage + run: | + coverage report -im + + create-release: + name: ๐ŸŽ‰ Create release + needs: [check-version, run-tests] + if: github.event_name == 'push' + runs-on: ubuntu-22.04 permissions: contents: write + steps: + - name: ๐ŸŽ‰ Create release + uses: softprops/action-gh-release@v1 + with: + tag_name: v${{ needs.check-version.outputs.version }} + target_commitish: ${{ github.sha }} + + send-notifications: + name: ๐Ÿ”” Send notifications + needs: [check-version, run-tests, create-release] + if: github.event_name == 'push' && always() + runs-on: ubuntu-22.04 + steps: + - name: ๐Ÿ“ Retrieve workflow result + id: retrieve-workflow-result + run: | + case "${{ inputs.job-status }}" in + success) + action='Published' + ;; + failure) + action='Failed to publish' + ;; + cancelled) + action='Cancelled publishing' + ;; + *) + echo "::error::Unknown job status: `$JOB_STATUS`" + exit 1 + ;; + esac + version="" + repository="" + echo "message=$action $version from $repository" >> $GITHUB_OUTPUT + + - name: ๐Ÿ”” Send Slack notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_TITLE: ' ' + SLACK_COLOR: ${{ steps.retrieve-workflow-result.outputs.result }} + SLACK_MESSAGE: >- + + of ${{ steps.retrieve-origin-url-message.outputs.message }} + on + by ${{ github.actor }} + ${{ steps.retrieve-workflow-result.outputs.message }} + SLACK_MSG_AUTHOR: ' ' + SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_FOOTER: ' ' + MSG_MINIMAL: true