Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ansible/ansible-runner
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.3.6
Choose a base ref
...
head repository: ansible/ansible-runner
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.4.0
Choose a head ref

Commits on Nov 1, 2022

  1. Documentation typos (#1149)

    * Add full stop
    
    * Clarify get_inventory's action argument values
    
    * Fix typos in python_interface docs
    JimMadge authored Nov 1, 2022
    Copy the full SHA
    0c88369 View commit details

Commits on Nov 4, 2022

  1. Copy the full SHA
    79b564d View commit details
  2. Copy the full SHA
    6ce27f6 View commit details

Commits on Nov 8, 2022

  1. Add receptor usage detail to the remote execution docs (#1154)

    * Add receptor usage detail to the remote execution docs
    
    Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
    matburt and Akasurde authored Nov 8, 2022
    Copy the full SHA
    fbd928a View commit details

Commits on Nov 9, 2022

  1. Flush buffer in streaming interface before writing zip data

    We ran into a really obscure issue when working on ansible/receptor#683.
    
    I'll try to make this at least somewhat digestable.
    
    Due to a bug in Kubernetes, AWX can't currently run jobs longer than 4 hours when deployed into Kubernetes. More context on that in ansible/awx#11805
    
    To address this issue, we needed a way to restart from a certain point in the logs. The only mechanism Kubernetes provides to do this is by passing "sinceTime" to the API endpoint for retrieving logs from a pod.
    
    Our patch in ansible/receptor#683 worked when we ran it locally, but in OpenShift, jobs errored when unpacking the zip stream at the end of the results of "ansible-runner worker". Upon further investigation this was because the timestamps of the last 2 lines were exactly the same:
    
    ```
    2022-11-09T00:07:46.851687621Z {"status": "successful", "runner_ident": "1"}
    2022-11-08T23:07:58.648753832Z {"zipfile": 1330}
    2022-11-08T23:07:58.648753832Z UEsDBBQAAAAIAPy4aFVGnUFkqQMAAIwK....
    ```
    
    After squinting at this code for a bit I noticed that we weren't flushing the buffer here like we do in the event_handler and other callbacks that are fired in streaming.py. The end. Ugh.
    shanemcd committed Nov 9, 2022
    Copy the full SHA
    ad12c71 View commit details
  2. Merge pull request #1161 from shanemcd/flush-it

    Flush buffer in streaming interface before writing zip data
    shanemcd authored Nov 9, 2022
    Copy the full SHA
    9d0ce96 View commit details

Commits on Dec 12, 2022

  1. Fix Github CI (#1171)

    Shrews authored Dec 12, 2022
    Copy the full SHA
    c6644a1 View commit details

Commits on Jan 3, 2023

  1. Honor inventory filepath (#1065)

    inventory parameter in `run` method, accepts inventory filepath
    relative to the `private_data_dir`. Check added to honor this path.
    
    Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
    Akasurde authored Jan 3, 2023
    Copy the full SHA
    55f0396 View commit details

Commits on Jan 10, 2023

  1. Docs: Use the Ansible Sphinx theme (#1178)

    * use the ansible sphinx theme
    * set docs language
    oraNod authored Jan 10, 2023
    Copy the full SHA
    6439bd3 View commit details

Commits on Jan 16, 2023

  1. Bump certifi from 2021.10.8 to 2022.12.7 in /docs (#1180)

    Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
    Akasurde authored Jan 16, 2023
    Copy the full SHA
    e1509a0 View commit details

Commits on Jan 25, 2023

  1. Fix artifact file permissions (#702, #853) (#1183)

    * Fix artifact file permissions (#702, #853)
    
    Sets artifact file permissions to octal `600` in
    `ansible_runner.utils.dump_artifact`
    shoriminimoe authored Jan 25, 2023
    Copy the full SHA
    a4a981d View commit details

Commits on Mar 1, 2023

  1. Emit periodic keepalive events from Worker (#1191)

    * new CLI arg and envvar for `Worker` mode to optionally emit regular keepalive events; fixes issues with container runtimes that assume long-silent stdout == hung process
    
    ---------
    
    Co-authored-by: Alan Rominger <arominge@redhat.com>
    nitzmahone and AlanCoding authored Mar 1, 2023
    Copy the full SHA
    fd9d67a View commit details

Commits on Mar 2, 2023

  1. Copy the full SHA
    69e8c1a View commit details
  2. Add license and classifiers metadata (#1213)

    * Add license and classifiers metadata
    * Correct license value.
    
    Co-authored-by: Matt Martz <matt@sivel.net>
    Shrews and sivel authored Mar 2, 2023
    Copy the full SHA
    d1417e5 View commit details

Commits on Mar 7, 2023

  1. Give more detail when we cannot process a non-JSON streamed line (#1186)

    Pack the line information into job_explanation for technical reasons
    
    Limit line length in these error messages to print to 1000 characters
    
    Update tests to check for more error reporting
    AlanCoding authored Mar 7, 2023
    Copy the full SHA
    1d04ddb View commit details

Commits on Apr 6, 2023

  1. Remove pkg_resources use (#1224)

    * Remove pkg_resources use
    
    * pkg_resources is deprecated in favor of importlib.metadata
    
    Fixes: #1223 
    
    Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
    Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
    Akasurde and nitzmahone authored Apr 6, 2023
    Copy the full SHA
    3d6f66b View commit details

Commits on Apr 7, 2023

  1. expand importlib-metadata version constraint (#1229)

    * only applicable to Python 3.9; minimizes downstream packaging conflicts
    nitzmahone authored Apr 7, 2023
    Copy the full SHA
    4b3f056 View commit details

Commits on Apr 10, 2023

  1. Copy the full SHA
    0d49f80 View commit details
  2. Fix unclosed files warnings (#1228)

    * Fixed unit tests
    * Fixed integration tests
    
    Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
    Akasurde authored Apr 10, 2023
    Copy the full SHA
    04bc553 View commit details

Commits on Apr 17, 2023

  1. Remove everything relating to default container (#1232)

    * Remove everything relating to default container
    * Faster CI by pre-seeding test container_image
    sivel authored Apr 17, 2023
    Copy the full SHA
    f899811 View commit details

Commits on Apr 24, 2023

  1. Copy the full SHA
    64e8fbe View commit details

Commits on Apr 25, 2023

  1. Copy the full SHA
    0d522c9 View commit details

Commits on Apr 26, 2023

  1. Merge pull request #1238 from sivel/utc-isoformat

    Ensure that UTC ISO8601 datetimes include timezone info
    sivel authored Apr 26, 2023
    Copy the full SHA
    66cd509 View commit details
  2. Copy the full SHA
    e2e89b0 View commit details

Commits on May 2, 2023

  1. Move pytest coverage to toxconfig (#1241)

    Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
    Akasurde authored May 2, 2023
    Copy the full SHA
    a8eb404 View commit details

Commits on May 16, 2023

  1. Copy the full SHA
    0746379 View commit details

Commits on May 31, 2023

  1. Copy the full SHA
    85b3403 View commit details

Commits on Jun 1, 2023

  1. Copy the full SHA
    963827a View commit details

Commits on Jun 2, 2023

  1. Copy the full SHA
    565ed4a View commit details

Commits on Jun 5, 2023

  1. Copy the full SHA
    4bff2e7 View commit details

Commits on Jun 6, 2023

  1. Copy the full SHA
    b0f64a0 View commit details

Commits on Jun 7, 2023

  1. Copy the full SHA
    fc8ba7c View commit details

Commits on Jun 27, 2023

  1. Bump cryptography from 40.0.2 to 41.0.0 in /docs (#1253)

    Bumps [cryptography](https://github.com/pyca/cryptography) from 40.0.2 to 41.0.0.
    - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
    - [Commits](pyca/cryptography@40.0.2...41.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: cryptography
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 27, 2023
    Copy the full SHA
    7b9f270 View commit details

Commits on Jul 6, 2023

  1. Copy the full SHA
    bcb0a41 View commit details
  2. Simplify config settings initialization (#1262)

    Also remove unused BaseConfig._volume_mount_paths variable.
    Shrews authored Jul 6, 2023
    Copy the full SHA
    9c62fb3 View commit details

Commits on Jul 10, 2023

  1. Copy the full SHA
    aed3525 View commit details

Commits on Jul 11, 2023

  1. Add pylint to CI (#1266)

    Shrews authored Jul 11, 2023
    Copy the full SHA
    b2b8a83 View commit details

Commits on Jul 12, 2023

  1. Copy the full SHA
    aef73cf View commit details
  2. Fix for non-str ident (#1268)

    Shrews authored Jul 12, 2023
    Copy the full SHA
    8301351 View commit details

Commits on Jul 13, 2023

  1. Copy the full SHA
    20cc855 View commit details
  2. Copy the full SHA
    72327fa View commit details

Commits on Jul 14, 2023

  1. Enable pylint R1735 (#1271)

    Shrews authored Jul 14, 2023
    Copy the full SHA
    48aa6db View commit details

Commits on Jul 19, 2023

  1. Bump cryptography from 41.0.0 to 41.0.2 in /docs (#1272)

    Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.0 to 41.0.2.
    - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
    - [Commits](pyca/cryptography@41.0.0...41.0.2)
    
    ---
    updated-dependencies:
    - dependency-name: cryptography
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 19, 2023
    Copy the full SHA
    230b3be View commit details
  2. Copy the full SHA
    1db719f View commit details
  3. Copy the full SHA
    2a51c8b View commit details

Commits on Jul 20, 2023

  1. Copy the full SHA
    358dab1 View commit details

Commits on Jul 24, 2023

  1. pylint: enable W0201 (#1277)

    Shrews authored Jul 24, 2023
    Copy the full SHA
    5541472 View commit details
  2. pylint: enable W0212 (#1278)

    Shrews authored Jul 24, 2023
    Copy the full SHA
    edfc174 View commit details

Commits on Jul 25, 2023

  1. Copy the full SHA
    dfd9f36 View commit details

Commits on Jul 26, 2023

  1. Copy the full SHA
    ff45cba View commit details
Showing with 2,804 additions and 3,114 deletions.
  1. +5 −0 .git_archival.txt
  2. +2 −0 .gitattributes
  3. +55 −39 .github/workflows/ci.yml
  4. +1 −2 .yamllint
  5. +0 −246 .zuul.d/jobs.yaml
  6. +0 −12 .zuul.d/playbooks/ansible-runner-container-image-base/pre.yaml
  7. +0 −26 .zuul.d/project.yaml
  8. +0 −69 Dockerfile
  9. +0 −1 MANIFEST.in
  10. +0 −185 Makefile
  11. +0 −263 ansible_runner/streaming.py
  12. +0 −2 bindep.txt
  13. +10 −5 docs/conf.py
  14. +0 −46 docs/container.rst
  15. +9 −5 docs/execution_environments.rst
  16. +2 −5 docs/index.rst
  17. +8 −43 docs/install.rst
  18. +3 −3 docs/intro.rst
  19. +11 −11 docs/python_interface.rst
  20. +33 −0 docs/remote_jobs.rst
  21. +1 −2 docs/requirements.in
  22. +27 −27 docs/requirements.txt
  23. +27 −0 docs/standalone.rst
  24. +0 −6 packaging/debian/changelog
  25. +0 −1 packaging/debian/compat
  26. +0 −19 packaging/debian/control
  27. +0 −172 packaging/debian/copyright
  28. +0 −10 packaging/debian/docker/Dockerfile
  29. +0 −14 packaging/debian/docker/docker-compose.yml
  30. +0 −1 packaging/debian/pydist-overrides
  31. +0 −10 packaging/debian/rules
  32. +0 −1 packaging/debian/source/format
  33. +0 −9 packaging/rpm/Dockerfile.epel-7-x86_64
  34. +0 −8 packaging/rpm/Dockerfile.epel-8-x86_64
  35. +0 −163 packaging/rpm/ansible-runner.spec.j2
  36. +0 −21 packaging/rpm/docker-compose.yml
  37. +40 −0 pyproject.toml
  38. +1 −5 pytest.ini
  39. +0 −5 requirements.txt
  40. +36 −15 setup.cfg
  41. +0 −8 setup.py
  42. +2 −3 { → src}/ansible_runner/__init__.py
  43. +283 −234 { → src}/ansible_runner/__main__.py
  44. +57 −35 { → src}/ansible_runner/cleanup.py
  45. 0 { → src}/ansible_runner/config/__init__.py
  46. +108 −67 { → src}/ansible_runner/config/_base.py
  47. +8 −5 { → src}/ansible_runner/config/ansible_cfg.py
  48. +8 −5 { → src}/ansible_runner/config/command.py
  49. +18 −15 { → src}/ansible_runner/config/doc.py
  50. +13 −10 { → src}/ansible_runner/config/inventory.py
  51. +35 −35 { → src}/ansible_runner/config/runner.py
  52. +0 −1 { → src}/ansible_runner/defaults.py
  53. 0 { → src}/ansible_runner/display_callback/__init__.py
  54. 0 { → src}/ansible_runner/display_callback/callback/__init__.py
  55. +239 −239 { → src}/ansible_runner/display_callback/callback/awx_display.py
  56. 0 { → src}/ansible_runner/exceptions.py
  57. +48 −37 { → src}/ansible_runner/interface.py
  58. +52 −64 { → src}/ansible_runner/loader.py
  59. +8 −8 { → src}/ansible_runner/output.py
  60. 0 { → src}/ansible_runner/plugins/__init__.py
  61. +63 −52 { → src}/ansible_runner/runner.py
  62. +1 −0 { → src}/ansible_runner/runner_config.py
  63. +373 −0 src/ansible_runner/streaming.py
  64. +109 −108 { → src}/ansible_runner/utils/__init__.py
  65. +18 −96 { → src}/ansible_runner/utils/base64io.py
  66. +10 −8 { → src}/ansible_runner/utils/capacity.py
  67. +8 −0 src/ansible_runner/utils/importlib_compat.py
  68. +10 −6 { → src}/ansible_runner/utils/streaming.py
  69. +12 −17 test/conftest.py
  70. +9 −0 test/fixtures/projects/pexpect_timeout_data_loss/project/pb.yml
  71. +11 −0 test/integration/Dockerfile
  72. 0 .zuul.d/playbooks/.zuul.ignore → test/integration/__init__.py
  73. +123 −15 test/integration/conftest.py
  74. 0 test/integration/containerized/__init__.py
  75. +3 −4 test/integration/containerized/test_cleanup_images.py
  76. +9 −6 test/integration/containerized/test_cli_containerized.py
  77. +15 −10 test/integration/containerized/test_container_management.py
  78. +26 −7 test/integration/test___main__.py
  79. +11 −8 test/integration/test_config.py
  80. +84 −0 test/integration/test_core_integration.py
  81. +30 −28 test/integration/test_display_callback.py
  82. +10 −12 test/integration/test_events.py
  83. +126 −39 test/integration/test_interface.py
  84. +6 −7 test/integration/test_main.py
  85. +30 −18 test/integration/test_runner.py
  86. +151 −33 test/integration/test_transmit_worker_process.py
  87. +7 −4 test/requirements.txt
  88. +45 −48 test/unit/config/test__base.py
  89. +10 −6 test/unit/config/test_ansible_cfg.py
  90. +11 −7 test/unit/config/test_command.py
  91. +19 −17 test/unit/config/test_container_volmount_generation.py
  92. +19 −12 test/unit/config/test_doc.py
  93. +10 −6 test/unit/config/test_inventory.py
  94. +35 −55 test/unit/config/test_runner.py
  95. +52 −0 test/unit/test__main__.py
  96. +1 −1 test/unit/test_cleanup.py
  97. +30 −28 test/unit/test_event_filter.py
  98. +10 −9 test/unit/test_loader.py
  99. +42 −26 test/unit/test_runner.py
  100. +16 −0 test/unit/test_streaming.py
  101. +12 −0 test/unit/test_utils.py
  102. +2 −0 test/unit/utils/capacity/test_uuid.py
  103. +22 −2 test/unit/utils/test_dump_artifacts.py
  104. +2 −1 test/unit/utils/test_fifo_pipe.py
  105. +37 −2 test/unit/utils/test_utils.py
  106. +1 −1 test/utils/common.py
  107. +0 −29 tools/bindep.txt
  108. +0 −1 tools/build-requirements.txt
  109. +0 −11 tools/requirements-stable-2.10.txt
  110. +0 −11 tools/requirements-stable-2.11.txt
  111. +0 −11 tools/requirements-stable-2.12.txt
  112. +0 −11 tools/requirements-stable-2.9.txt
  113. +0 −11 tools/requirements.txt
  114. +0 −11 tools/test-setup.sh
  115. +0 −1 tools/upper-constraints-stable-2.10.txt
  116. +0 −1 tools/upper-constraints-stable-2.11.txt
  117. +0 −1 tools/upper-constraints-stable-2.12.txt
  118. +0 −1 tools/upper-constraints-stable-2.9.txt
  119. +23 −15 tox.ini
  120. +0 −82 utils/entrypoint.sh
5 changes: 5 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git_archival.txt export-subst

94 changes: 55 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -8,27 +8,31 @@ on:
jobs:
sanity:
name: ${{ matrix.test.name }}
runs-on: ubuntu-20.04
container:
image: quay.io/ansible/ansible-runner-test-container:2.0.0
env:
PIP_CACHE_DIR: ${{ runner.temp }}/.cache/pip
PY_COLORS: 1
TOXENV: ${{ matrix.test.tox_env }}
runs-on: ubuntu-22.04
env:
TOXENV: ${{ matrix.test.tox_env }}
PY_COLORS: 1

strategy:
fail-fast: false
matrix:
test:
- name: Lint
tox_env: linters
tox_env: linters-py310

- name: Docs
tox_env: docs

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # this is not ideal, but we need tags available to generate versions in tests

- name: Install tox
run: |
python3 -m pip install --upgrade pip
python3 -m pip install "tox==4.11.3"
- name: Create tox environment
run: tox --notest
@@ -38,7 +42,7 @@ jobs:


integration:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Integration - ${{ matrix.py_version.name }}

env:
@@ -49,79 +53,91 @@ jobs:
fail-fast: false
matrix:
py_version:
- name: '3.8'
tox_env: integration-py38

- name: '3.9'
tox_env: integration-py39

- name: '3.10'
tox_env: integration-py310

- name: '3.11'
tox_env: integration-py311

- name: '3.12'
tox_env: integration-py312

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Python ${{ matrix.py_version.name }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version.name }}

- name: Install tox
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox
python3 -m pip install "tox==4.11.3" build
- name: Prepare runner test container
run: |
TMPDIR=$(mktemp -d)
cp test/integration/Dockerfile $TMPDIR
pyproject-build -w -o $TMPDIR
pushd $TMPDIR
docker build --build-arg WHEEL=$(ls -1 ansible_runner*.whl) --rm=true -t ansible-runner-gha${{ github.run_id }}-event-test .
podman build --build-arg WHEEL=$(ls -1 ansible_runner*.whl) --rm=true -t ansible-runner-gha${{ github.run_id }}-event-test .
popd
rm -r $TMPDIR
- name: Create tox environment
run: |
tox --notest
- name: Run integration tests
run: |
docker build --rm=true -t quay.io/ansible/ansible-runner:devel -t quay.io/ansible/ansible-runner:latest .
podman build --rm=true -t quay.io/ansible/ansible-runner:devel -t quay.io/ansible/ansible-runner:latest .
tox
- name: Upload coverage report
run: |
curl --silent --show-error --output codecov https://ansible-ci-files.s3.us-east-1.amazonaws.com/codecov/linux/codecov
chmod +x codecov
./codecov --file test/coverage/reports/coverage.xml --flags {{ matrix.py_version.tox_env }}
RUNNER_TEST_IMAGE_NAME=ansible-runner-gha${{ github.run_id }}-event-test tox
unit:
name: Unit - ${{ matrix.py_version.name}}
runs-on: ubuntu-20.04
container:
image: quay.io/ansible/ansible-runner-test-container:2.0.0
env:
PIP_CACHE_DIR: ${{ runner.temp }}/.cache/pip
TOXENV: ${{ matrix.py_version.tox_env }}
PY_COLORS: 1
runs-on: ubuntu-22.04
env:
TOXENV: ${{ matrix.py_version.tox_env }}
PY_COLORS: 1

strategy:
fail-fast: false
matrix:
py_version:
- name: '3.8'
tox_env: unit-py38

- name: '3.9'
tox_env: unit-py39

- name: '3.10'
tox_env: unit-py310

- name: '3.11'
tox_env: unit-py311

- name: '3.12'
tox_env: unit-py312

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Python ${{ matrix.py_version.name }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version.name }}

- name: Install tox
run: |
python3 -m pip install --upgrade pip
python3 -m pip install "tox==4.11.3"
- name: Create tox environment
run: tox --notest

- name: Run tests
run: tox

- name: Upload coverage report
run: codecov --file test/coverage/reports/coverage.xml --flags {{ matrix.py_version.tox_env }}
3 changes: 1 addition & 2 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
extends: default

ignore: |
.tox
ignore-from-file: .gitignore

rules:
braces:
Loading