From 1b8f6ccfad9aaedf0777ec4f70baf4419db9211c Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Mon, 4 Apr 2022 15:48:35 +0530 Subject: [PATCH 1/7] Update release.yml --- .github/workflows/release.yml | 72 +++++++---------------------------- 1 file changed, 13 insertions(+), 59 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d588537b..e5470db6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,11 +6,10 @@ on: workflow_dispatch: { } jobs: - find_version: - name: Find Version + publish: + needs: release + name: Deploy Release to PyPI runs-on: ubuntu-latest - outputs: - version: ${{ steps.get-version.outputs.version }} steps: - name: Checkout source uses: actions/checkout@v2.3.2 @@ -18,9 +17,15 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.7 - - name: Get version - id: get-version - run: python -c 'import splunklib; print("::set-output name=version::%s" % splunklib.__version__)' + - name: Install dependencies + run: pip install twine + - name: Build package + run: python setup.py sdist +# - name: Publish package to PyPI +# uses: pypa/gh-action-pypi-publish@v1.3.1 +# with: +# user: __token__ +# password: ${{ secrets.pypi_password }} - name: Install tox run: pip install tox - name: Generate API docs @@ -28,62 +33,11 @@ jobs: rm -rf ./docs/_build tox -e docs cd ./docs/_build/html && zip -r ../docs_html.zip . -x ".*" -x "__MACOSX" - tag_version: - needs: find_version - name: Tag Version - runs-on: ubuntu-latest - steps: - - name: Create tag - uses: tvdias/github-tagger@v0.0.2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ needs.find_version.outputs.version }} - release: - needs: [ find_version, tag_version ] - name: Create Release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.2 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ needs.find_version.outputs.version }} - release_name: Release/${{ needs.find_version.outputs.version }} - body: | - ## Version ${{ needs.find_version.outputs.version }} - - **TODO: Insert CHANGELOG.md contents here.** - draft: false - prerelease: false - - name: Upload Artifact + - name : Docs Upload uses: actions/upload-artifact@v3 with: name: apidocs path: docs/_build/docs_html.zip - publish: - needs: release - name: Deploy Release to PyPI - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v2.3.2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - name: Install dependencies - run: pip install twine - - name: Build package - run: python setup.py sdist - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@v1.3.1 - with: - user: __token__ - password: ${{ secrets.pypi_password }} # Test upload # - name: Publish package to TestPyPI # uses: pypa/gh-action-pypi-publish@master From 1b4ed0fb096065286b21020423728ccf8dbf5c15 Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Mon, 4 Apr 2022 15:49:57 +0530 Subject: [PATCH 2/7] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5470db6..3f70b575 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: push: branches: - - master + - release-workflow-refactor workflow_dispatch: { } jobs: From a72f7b6d6b87a259a367bc49ecca14ecbd49e03b Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Mon, 4 Apr 2022 15:52:01 +0530 Subject: [PATCH 3/7] Update release.yml --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f70b575..1869e4b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,6 @@ on: jobs: publish: - needs: release name: Deploy Release to PyPI runs-on: ubuntu-latest steps: From 71b8ed791d3f95df2f41dd48d6f3c4f45e179b5c Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Mon, 4 Apr 2022 16:02:47 +0530 Subject: [PATCH 4/7] Update release.yml --- .github/workflows/release.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1869e4b8..10645c9d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,7 @@ name: Release on: - push: - branches: - - release-workflow-refactor - workflow_dispatch: { } + release: + types: [published] jobs: publish: @@ -20,11 +18,16 @@ jobs: run: pip install twine - name: Build package run: python setup.py sdist -# - name: Publish package to PyPI -# uses: pypa/gh-action-pypi-publish@v1.3.1 -# with: -# user: __token__ -# password: ${{ secrets.pypi_password }} + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@v1.3.1 + with: + user: __token__ + password: ${{ secrets.pypi_password }} - name: Install tox run: pip install tox - name: Generate API docs From feada519c03f9ac063b1459d32a6cf4645b09adb Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Fri, 8 Apr 2022 15:46:48 +0530 Subject: [PATCH 5/7] Update release.yml Trial run --- .github/workflows/release.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10645c9d..75272a66 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,8 @@ name: Release on: - release: - types: [published] + push: + branches: + - release-workflow-refactor jobs: publish: @@ -23,11 +24,11 @@ jobs: uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@v1.3.1 - with: - user: __token__ - password: ${{ secrets.pypi_password }} +# - name: Publish package to PyPI +# uses: pypa/gh-action-pypi-publish@v1.3.1 +# with: +# user: __token__ +# password: ${{ secrets.pypi_password }} - name: Install tox run: pip install tox - name: Generate API docs From f3213b6a302948099f641fa56db065aba42b75d6 Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Fri, 8 Apr 2022 16:03:23 +0530 Subject: [PATCH 6/7] Update release.yml --- .github/workflows/release.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75272a66..4d11da59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,7 @@ name: Release on: - push: - branches: - - release-workflow-refactor + release: + types: [published] jobs: publish: @@ -19,16 +18,11 @@ jobs: run: pip install twine - name: Build package run: python setup.py sdist - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# - name: Publish package to PyPI -# uses: pypa/gh-action-pypi-publish@v1.3.1 -# with: -# user: __token__ -# password: ${{ secrets.pypi_password }} + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@v1.3.1 + with: + user: __token__ + password: ${{ secrets.pypi_password }} - name: Install tox run: pip install tox - name: Generate API docs From af2898bfadd595ed4497205ab79d4e4529877be1 Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Tue, 12 Apr 2022 20:03:55 +0530 Subject: [PATCH 7/7] Update binding.py Changed error message --- splunklib/binding.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/splunklib/binding.py b/splunklib/binding.py index 6bf4f071..238ab0fd 100644 --- a/splunklib/binding.py +++ b/splunklib/binding.py @@ -295,8 +295,7 @@ def wrapper(self, *args, **kwargs): with _handle_auth_error("Autologin failed."): self.login() with _handle_auth_error( - "Autologin succeeded, but there was an auth error on " - "next request. Something is very wrong."): + "Authentication Failed! If session token is used, it seems to have been expired."): return request_fun(self, *args, **kwargs) elif he.status == 401 and not self.autologin: raise AuthenticationError(