diff --git a/.github/actions/run_awx_devel/action.yml b/.github/actions/run_awx_devel/action.yml index 80b02669cf82..79c795c85d77 100644 --- a/.github/actions/run_awx_devel/action.yml +++ b/.github/actions/run_awx_devel/action.yml @@ -43,10 +43,14 @@ runs: - name: Update default AWX password shell: bash run: | - while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -k https://localhost:8043/api/v2/ping/)" != "200" ]] - do - echo "Waiting for AWX..." - sleep 5 + SECONDS=0 + while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -k https://localhost:8043/api/v2/ping/)" != "200" ]]; do + if [[ $SECONDS -gt 600 ]]; then + echo "Timing out, AWX never came up" + exit 1 + fi + echo "Waiting for AWX..." + sleep 5 done echo "AWX is up, updating the password..." docker exec -i tools_awx_1 sh <<-EOSH diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bc82741e8e2..afdbd69eb610 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: common-tests: name: ${{ matrix.tests.name }} runs-on: ubuntu-latest + timeout-minutes: 60 permissions: packages: write contents: read @@ -49,6 +50,7 @@ jobs: dev-env: runs-on: ubuntu-latest + timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -63,6 +65,7 @@ jobs: awx-operator: runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Checkout awx uses: actions/checkout@v3 @@ -112,6 +115,7 @@ jobs: collection-sanity: name: awx_collection sanity runs-on: ubuntu-latest + timeout-minutes: 30 strategy: fail-fast: false steps: @@ -131,6 +135,7 @@ jobs: collection-integration: name: awx_collection integration runs-on: ubuntu-latest + timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -182,6 +187,7 @@ jobs: collection-integration-coverage-combine: name: combine awx_collection integration coverage runs-on: ubuntu-latest + timeout-minutes: 10 needs: - collection-integration strategy: diff --git a/.github/workflows/devel_images.yml b/.github/workflows/devel_images.yml index 179828be7d97..7f8c791bc4e7 100644 --- a/.github/workflows/devel_images.yml +++ b/.github/workflows/devel_images.yml @@ -12,6 +12,7 @@ jobs: push: if: endsWith(github.repository, '/awx') || startsWith(github.ref, 'refs/heads/release_') runs-on: ubuntu-latest + timeout-minutes: 60 permissions: packages: write contents: read diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d50793210ea1..a5dc51fb59ca 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,6 +6,7 @@ jobs: docsite-build: name: docsite test build runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/feature_branch_deletion.yml b/.github/workflows/feature_branch_deletion.yml index 3e574b211b80..3fbd287cb126 100644 --- a/.github/workflows/feature_branch_deletion.yml +++ b/.github/workflows/feature_branch_deletion.yml @@ -9,6 +9,7 @@ on: jobs: push: runs-on: ubuntu-latest + timeout-minutes: 20 permissions: packages: write contents: read diff --git a/.github/workflows/label_issue.yml b/.github/workflows/label_issue.yml index f33efab60015..c5a2b2c7cb4c 100644 --- a/.github/workflows/label_issue.yml +++ b/.github/workflows/label_issue.yml @@ -13,6 +13,7 @@ permissions: jobs: triage: runs-on: ubuntu-latest + timeout-minutes: 20 name: Label Issue steps: @@ -26,6 +27,7 @@ jobs: community: runs-on: ubuntu-latest + timeout-minutes: 20 name: Label Issue - Community steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/label_pr.yml b/.github/workflows/label_pr.yml index 6ee5a34e8b7d..15571a866cf2 100644 --- a/.github/workflows/label_pr.yml +++ b/.github/workflows/label_pr.yml @@ -14,6 +14,7 @@ permissions: jobs: triage: runs-on: ubuntu-latest + timeout-minutes: 20 name: Label PR steps: @@ -25,6 +26,7 @@ jobs: community: runs-on: ubuntu-latest + timeout-minutes: 20 name: Label PR - Community steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pr_body_check.yml b/.github/workflows/pr_body_check.yml index 7af1914bb4c0..9532aa87ede1 100644 --- a/.github/workflows/pr_body_check.yml +++ b/.github/workflows/pr_body_check.yml @@ -10,6 +10,7 @@ jobs: if: github.repository_owner == 'ansible' && endsWith(github.repository, 'awx') name: Scan PR description for semantic versioning keywords runs-on: ubuntu-latest + timeout-minutes: 20 permissions: packages: write contents: read diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 58e3762851a2..81a7878d6e80 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -15,6 +15,7 @@ jobs: promote: if: endsWith(github.repository, '/awx') runs-on: ubuntu-latest + timeout-minutes: 90 steps: - name: Checkout awx uses: actions/checkout@v3 diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index aab4ad83a500..f38cda55ec20 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -23,6 +23,7 @@ jobs: stage: if: endsWith(github.repository, '/awx') runs-on: ubuntu-latest + timeout-minutes: 90 permissions: packages: write contents: write diff --git a/.github/workflows/update_dependabot_prs.yml b/.github/workflows/update_dependabot_prs.yml index a61eb1c17222..bcb0b7674a70 100644 --- a/.github/workflows/update_dependabot_prs.yml +++ b/.github/workflows/update_dependabot_prs.yml @@ -9,6 +9,7 @@ jobs: name: Update Dependabot Prs if: contains(github.event.pull_request.labels.*.name, 'dependencies') && contains(github.event.pull_request.labels.*.name, 'component:ui') runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout branch diff --git a/.github/workflows/upload_schema.yml b/.github/workflows/upload_schema.yml index ae4e23d977ae..0b7bc7bf6e6d 100644 --- a/.github/workflows/upload_schema.yml +++ b/.github/workflows/upload_schema.yml @@ -13,6 +13,7 @@ on: jobs: push: runs-on: ubuntu-latest + timeout-minutes: 60 permissions: packages: write contents: read diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 0c11aab82f67..9376ce0e342b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,6 +10,7 @@ build: 3.11 commands: - pip install --user tox - - python3 -m tox -e docs + - python3 -m tox -e docs --notest -v + - python3 -m tox -e docs --skip-pkg-install -q - mkdir -p _readthedocs/html/ - mv docs/docsite/build/html/* _readthedocs/html/ diff --git a/awx_collection/tests/integration/targets/bulk_job_launch/tasks/main.yml b/awx_collection/tests/integration/targets/bulk_job_launch/tasks/main.yml index cd152a8eef29..f4a107ecfb50 100644 --- a/awx_collection/tests/integration/targets/bulk_job_launch/tasks/main.yml +++ b/awx_collection/tests/integration/targets/bulk_job_launch/tasks/main.yml @@ -60,7 +60,7 @@ - result['job_info']['skip_tags'] == "skipbaz" - result['job_info']['limit'] == "localhost" - result['job_info']['job_tags'] == "Hello World" - - result['job_info']['inventory'] == {{ inventory_id }} + - result['job_info']['inventory'] == inventory_id | int - "result['job_info']['extra_vars'] == '{\"animal\": \"bear\", \"food\": \"carrot\"}'" # cleanup diff --git a/awx_collection/tests/integration/targets/job_list/tasks/main.yml b/awx_collection/tests/integration/targets/job_list/tasks/main.yml index 04495bfcba5a..b9e602cb4972 100644 --- a/awx_collection/tests/integration/targets/job_list/tasks/main.yml +++ b/awx_collection/tests/integration/targets/job_list/tasks/main.yml @@ -16,7 +16,7 @@ - assert: that: - - "{{ matching_jobs.count }} == 1" + - matching_jobs.count == 1 - name: List failed jobs (which don't exist) job_list: @@ -26,7 +26,7 @@ - assert: that: - - "{{ successful_jobs.count }} == 0" + - successful_jobs.count == 0 - name: Get ALL result pages! job_list: diff --git a/awx_collection/tests/integration/targets/job_wait/tasks/main.yml b/awx_collection/tests/integration/targets/job_wait/tasks/main.yml index 60a53f209a79..cc38e171d3da 100644 --- a/awx_collection/tests/integration/targets/job_wait/tasks/main.yml +++ b/awx_collection/tests/integration/targets/job_wait/tasks/main.yml @@ -99,7 +99,7 @@ that: - wait_results is failed - 'wait_results.status == "canceled"' - - "wait_results.msg == 'Job with id {{ job.id }} failed' or 'Job with id={{ job.id }} failed, error: Job failed.'" + - "'Job with id ~ job.id failed' or 'Job with id= ~ job.id failed, error: Job failed.' is in wait_results.msg" # workflow wait test - name: Generate a random string for test diff --git a/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml b/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml index 511dc727552b..6fac5a0bce1f 100644 --- a/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml +++ b/awx_collection/tests/integration/targets/lookup_api_plugin/tasks/main.yml @@ -132,7 +132,7 @@ - name: Get the ID of the first user created and verify that it is correct assert: - that: "{{ query(plugin_name, 'users', query_params={ 'username' : user_creation_results['results'][0]['item'] }, return_ids=True)[0] }} == {{ user_creation_results['results'][0]['id'] }}" + that: "query(plugin_name, 'users', query_params={ 'username' : user_creation_results['results'][0]['item'] }, return_ids=True)[0] == user_creation_results['results'][0]['id'] | string" - name: Try to get an ID of someone who does not exist set_fact: diff --git a/awx_collection/tests/integration/targets/lookup_rruleset/tasks/main.yml b/awx_collection/tests/integration/targets/lookup_rruleset/tasks/main.yml index 6ff771749e82..28ad1da96b25 100644 --- a/awx_collection/tests/integration/targets/lookup_rruleset/tasks/main.yml +++ b/awx_collection/tests/integration/targets/lookup_rruleset/tasks/main.yml @@ -11,7 +11,7 @@ - name: Call ruleset with no rules set_fact: - complex_rule: "{{ query(ruleset_plugin_name, '2022-04-30 10:30:45') }}" + complex_rule: "{{ query(ruleset_plugin_name | string, '2022-04-30 10:30:45') }}" ignore_errors: True register: results diff --git a/awx_collection/tests/integration/targets/schedule/tasks/main.yml b/awx_collection/tests/integration/targets/schedule/tasks/main.yml index 6f9eca1b33b6..c61785d3b756 100644 --- a/awx_collection/tests/integration/targets/schedule/tasks/main.yml +++ b/awx_collection/tests/integration/targets/schedule/tasks/main.yml @@ -36,7 +36,7 @@ - assert: that: - result is failed - - "'Unable to create schedule {{ sched1 }}' in result.msg" + - "'Unable to create schedule '~ sched1 in result.msg" - name: Create with options that the JT does not support schedule: @@ -62,7 +62,7 @@ - assert: that: - result is failed - - "'Unable to create schedule {{ sched1 }}' in result.msg" + - "'Unable to create schedule '~ sched1 in result.msg" - name: Build a real schedule schedule: diff --git a/awx_collection/tests/integration/targets/schedule_rrule/tasks/main.yml b/awx_collection/tests/integration/targets/schedule_rrule/tasks/main.yml index bf416b813dc0..af2d95300172 100644 --- a/awx_collection/tests/integration/targets/schedule_rrule/tasks/main.yml +++ b/awx_collection/tests/integration/targets/schedule_rrule/tasks/main.yml @@ -9,7 +9,7 @@ - name: Test too many params (failure from validation of terms) debug: - msg: "{{ query(plugin_name, 'none', 'weekly', start_date='2020-4-16 03:45:07') }}" + msg: "{{ query(plugin_name | string, 'none', 'weekly', start_date='2020-4-16 03:45:07') }}" ignore_errors: true register: result diff --git a/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml b/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml index a328b8380183..ce41c6bb87d7 100644 --- a/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml +++ b/awx_collection/tests/integration/targets/workflow_launch/tasks/main.yml @@ -57,7 +57,7 @@ - assert: that: - result is failed - - "'Monitoring of Workflow Job - {{ wfjt_name1 }} aborted due to timeout' in result.msg" + - "'Monitoring of Workflow Job - '~ wfjt_name1 ~ ' aborted due to timeout' in result.msg" - name: Kick off a workflow and wait for it workflow_launch: