From fe543008c67ca3a2495568e4a34971537bcb3d82 Mon Sep 17 00:00:00 2001 From: Aleksandr Goncharov Date: Fri, 17 Jun 2022 17:08:26 +0300 Subject: [PATCH 1/4] Remove all buckets which start with "clitst" during buckets cleanup --- CHANGELOG.md | 3 +++ test/integration/test_raw_api.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6f912ff5..351b5831f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +* Nothing + ## [1.17.2] - 2022-06-24 ### Fixed diff --git a/test/integration/test_raw_api.py b/test/integration/test_raw_api.py index a6fc565f2..5f07eb243 100644 --- a/test/integration/test_raw_api.py +++ b/test/integration/test_raw_api.py @@ -587,6 +587,9 @@ def _clean_and_delete_bucket(raw_api, api_url, account_auth_token, account_id, b def _should_delete_bucket(bucket_name): # Bucket names for this test look like: c7b22d0b0ad7-1460060364-5670 # Other buckets should not be deleted. + if bucket_name.startswith('clitst'): + return True + match = re.match(r'^test-raw-api-[a-f0-9]+-([0-9]+)-([0-9]+)', bucket_name) if match is None: return False From e1e4d42a03c03a23dccd7efc8abec4a3f124861e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nowacki?= Date: Tue, 28 Jun 2022 11:22:19 +0200 Subject: [PATCH 2/4] dont pollute the freshly cleaned environment --- .github/workflows/ci.yml | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6587aa321..a8e828442 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,44 +73,6 @@ jobs: - name: Find and remove old buckets if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead run: nox -vs cleanup_old_buckets - test: - needs: cleanup_buckets - env: - B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }} - B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-beta.1", "pypy-3.7", "pypy-3.8"] - exclude: - - os: "macos-latest" - python-version: "pypy-3.7" - - os: "ubuntu-latest" - python-version: "pypy-3.7" - - os: "macos-latest" - python-version: "pypy-3.8" - - os: "windows-latest" - python-version: "pypy-3.8" - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - cache: "pip" - - name: Install dependencies - run: python -m pip install --upgrade nox pip setuptools - - name: Run unit tests - run: nox -vs unit - env: - SKIP_COVERAGE: ${{ startsWith(matrix.python-version, env.SKIP_COVERAGE_PYTHON_VERSION_PREFIX) }} - - name: Run integration tests - if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} - run: nox -vs integration -- --dont-cleanup-old-buckets doc: needs: build runs-on: ubuntu-latest From 98f1bfa2ca790ad1588bff84967f0ecad9bfe7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nowacki?= Date: Tue, 28 Jun 2022 11:28:57 +0200 Subject: [PATCH 3/4] lint this --- .github/workflows/ci.yml | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8e828442..ca46778bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,47 +11,7 @@ env: SKIP_COVERAGE_PYTHON_VERSION_PREFIX: "pypy" jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: codespell-project/actions-codespell@2391250ab05295bddd51e36a8c6295edb6343b0e - with: - ignore_words_list: datas - - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.PYTHON_DEFAULT_VERSION }} - cache: "pip" - - name: Install dependencies - run: python -m pip install --upgrade nox pip setuptools - - name: Run linters - run: nox -vs lint - - name: Validate changelog - if: ${{ ! startsWith(github.ref, 'refs/heads/dependabot/') }} - uses: zattoo/changelog@v1 - with: - token: ${{ github.token }} - build: - needs: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.PYTHON_DEFAULT_VERSION }} - cache: "pip" - - name: Install dependencies - run: python -m pip install --upgrade nox pip setuptools - - name: Build the distribution - run: nox -vs build cleanup_buckets: - needs: lint env: B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }} B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }} From 437c0811c91f157abd06d62b84f924112d477d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nowacki?= Date: Tue, 28 Jun 2022 11:29:29 +0200 Subject: [PATCH 4/4] doc this --- .github/workflows/ci.yml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca46778bf..822d16ad4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,24 +33,4 @@ jobs: - name: Find and remove old buckets if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead run: nox -vs cleanup_old_buckets - doc: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.PYTHON_DEFAULT_VERSION }} - cache: "pip" - - name: Install dependencies - env: - DEBIAN_FRONTEND: noninteractive - run: | - sudo apt-get update -y - sudo apt-get install -y graphviz plantuml - python -m pip install --upgrade nox pip setuptools - - name: Build the docs - run: nox --non-interactive -vs doc +