diff --git a/.github/workflows/ansible-test-windows.yml b/.github/workflows/ansible-test-windows.yml index fa12cd40..df3223ad 100644 --- a/.github/workflows/ansible-test-windows.yml +++ b/.github/workflows/ansible-test-windows.yml @@ -213,7 +213,7 @@ jobs: run: ansible-test coverage xml -v --requirements # See the reports at https://codecov.io/gh/lowlydba/lowlydba.sqlserver - - uses: codecov/codecov-action@0b35c9ecc4f0529d0eb674914510c22f85b196b4 # v7.1.0 + - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: fail_ci_if_error: false diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index db12207f..81956c9d 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -86,7 +86,7 @@ jobs: working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} # See the reports at https://codecov.io/gh/lowlydba/lowlydba.sqlserver - - uses: codecov/codecov-action@0b35c9ecc4f0529d0eb674914510c22f85b196b4 # v7.1.0 + - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: fail_ci_if_error: false env: @@ -180,7 +180,7 @@ jobs: working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} # See the reports at https://codecov.io/gh/lowlydba/lowlydba.sqlserver - - uses: codecov/codecov-action@0b35c9ecc4f0529d0eb674914510c22f85b196b4 # v7.1.0 + - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: fail_ci_if_error: false env: diff --git a/changelogs/fragments/406-sp-whoisactive-test-download.yml b/changelogs/fragments/406-sp-whoisactive-test-download.yml new file mode 100644 index 00000000..6f82c58b --- /dev/null +++ b/changelogs/fragments/406-sp-whoisactive-test-download.yml @@ -0,0 +1,3 @@ +--- +trivial: + - sp_whoisactive integration tests - download the script once with retries and install from ``local_file`` to avoid intermittent 403 rate-limit failures. diff --git a/tests/integration/targets/sp_whoisactive/tasks/main.yml b/tests/integration/targets/sp_whoisactive/tasks/main.yml index a10cc1b8..ea5f3cac 100644 --- a/tests/integration/targets/sp_whoisactive/tasks/main.yml +++ b/tests/integration/targets/sp_whoisactive/tasks/main.yml @@ -2,14 +2,28 @@ - name: Var block vars: target_database: "master" + whoisactive_local_file: "/tmp/sp_WhoIsActive.sql" module_defaults: lowlydba.sqlserver.sp_whoisactive: sql_instance: "{{ sqlserver_instance }}" sql_username: "{{ sqlserver_username }}" sql_password: "{{ sqlserver_password }}" database: "{{ target_database }}" + local_file: "{{ whoisactive_local_file }}" tags: ["sp_whoisactive"] block: + # Downloading once with retries avoids intermittent 403s (rate limiting) from the module's own download. + - name: Download sp_whoisactive script + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/amachanic/sp_whoisactive/master/sp_WhoIsActive.sql + dest: "{{ whoisactive_local_file }}" + mode: "0644" + force: true + register: download + until: download is succeeded + retries: 5 + delay: 10 + - name: Install sp_whoisactive lowlydba.sqlserver.sp_whoisactive: register: result