Skip to content

Commit

Permalink
Merge branch 'devel' into verify-pyavd-extra-reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc authored Nov 13, 2024
2 parents 471b5c0 + 059f886 commit e3c7d51
Show file tree
Hide file tree
Showing 61 changed files with 1,371 additions and 1,051 deletions.
6 changes: 1 addition & 5 deletions .github/requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Installing PyAVD from source.
# The package path below is relative to the repo root and will only work if the pip install is executed from there.
./python-avd
# The -r path is relative to this file.
-r ../ansible_collections/arista/avd/requirements.txt
# Needed for molecule
jsonschema-rs>=0.24
./python-avd[ansible-collection]
7 changes: 7 additions & 0 deletions .github/workflows/new-cvp-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}

env:
# Set -vvv is ACTIONS_STEP_DEBUG is set
# Apparently it is set in secrets when running with debug
ANSIBLE_VERBOSITY: ${{ secrets.ACTIONS_STEP_DEBUG && 3 || 0 }}
AVD_NEVER_RUN_FROM_SOURCE: 1

jobs:
# ----------------------------------------------- #
# CV INTEGRATION MOLECULE TEST FOR CV_WORKFLOW #
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
# Set -vvv is ACTIONS_STEP_DEBUG is set
# Apparently it is set in secrets when running with debug
ANSIBLE_VERBOSITY: ${{ secrets.ACTIONS_STEP_DEBUG && 3 || 0 }}
AVD_NEVER_RUN_FROM_SOURCE: 1

jobs:
file-changes:
Expand Down Expand Up @@ -111,7 +112,7 @@ jobs:
python-version: ${{ matrix.python_version }}
- name: 'Install Python requirements'
run: |
pip install -r ansible_collections/arista/avd/requirements-dev.txt -r ansible_collections/arista/avd/requirements.txt --upgrade
pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
# ----------------------------------- #
# EOS CLI CONFIG GEN MOLECULE
Expand All @@ -127,7 +128,7 @@ jobs:
- 'eos_cli_config_gen_deprecated_vars'
- 'eos_cli_config_gen_negative_unit_tests'
ansible_version:
- 'ansible-core<2.18.0 --upgrade'
- 'ansible-core<2.19.0 --upgrade'
# Also test minimum ansible version for one scenario.
include:
- avd_scenario: 'eos_cli_config_gen'
Expand Down Expand Up @@ -166,7 +167,7 @@ jobs:
fail-fast: true
matrix:
avd_scenario: ['dhcp_configuration', 'dhcp_provisioning']
ansible_version: ['ansible-core<2.18.0 --upgrade']
ansible_version: ['ansible-core<2.19.0 --upgrade']
needs: [ file-changes ]
if: needs.file-changes.outputs.dhcp == 'true'
steps:
Expand Down Expand Up @@ -233,6 +234,9 @@ jobs:
- avd_scenario: 'eos_designs_unit_tests'
ansible_version: 'ansible-core<2.18.0 --upgrade'
pip_requirements: '.github/requirements-ci.txt'
- avd_scenario: 'eos_designs_unit_tests'
ansible_version: 'ansible-core<2.19.0 --upgrade'
pip_requirements: '.github/requirements-ci.txt'
needs: [ file-changes ]
if: needs.file-changes.outputs.eos_design == 'true' || needs.file-changes.outputs.config_gen == 'true'
steps:
Expand Down Expand Up @@ -274,7 +278,7 @@ jobs:
avd_scenario:
- 'eos_config_deploy_cvp'
ansible_version:
- 'ansible-core<2.18.0 --upgrade'
- 'ansible-core<2.19.0 --upgrade'
include:
- avd_scenario: 'eos_config_deploy_cvp'
ansible_version: 'ansible-core==2.15.0'
Expand Down Expand Up @@ -314,7 +318,7 @@ jobs:
avd_scenario:
- 'eos_validate_state'
ansible_version:
- 'ansible-core<2.18.0 --upgrade'
- 'ansible-core<2.19.0 --upgrade'
include:
- avd_scenario: 'eos_validate_state'
ansible_version: 'ansible-core==2.15.0'
Expand Down Expand Up @@ -362,7 +366,7 @@ jobs:
# 3.13 - Still waiting for support in ansible-test
- name: 'Install Python requirements'
run: |
pip install "ansible-core<2.18.0" -r .github/requirements-ci.txt --upgrade
pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
- name: 'Run ansible-test sanity'
run: |
cd ansible_collections/arista/avd/
Expand All @@ -384,7 +388,7 @@ jobs:
3.10
- name: 'Install Python requirements'
run: |
pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.18.0" -r .github/requirements-ci.txt --upgrade
pip install mock pytest pytest-mock pytest-xdist pyyaml "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
- name: 'Run ansible-test units test cases'
run: |
cd ansible_collections/arista/avd/
Expand All @@ -407,7 +411,7 @@ jobs:
# 3.13 - Still waiting for support in ansible-test
- name: 'Install Python requirements'
run: |
pip install "ansible-core<2.18.0" -r .github/requirements-ci.txt --upgrade
pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
- name: 'Run ansible-test integration test cases'
run: |
cd ansible_collections/arista/avd/
Expand All @@ -432,7 +436,7 @@ jobs:
3.13
- name: 'Install Python & Ansible requirements'
run: |
pip install -r ansible_collections/arista/avd/requirements-dev.txt -r ansible_collections/arista/avd/requirements.txt --upgrade
pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml
- name: 'Run ansible-test integration test cases'
run: |
Expand All @@ -456,7 +460,7 @@ jobs:
- uses: actions/checkout@v4
- name: 'Install Python & Ansible requirements'
run: |
pip install "ansible-core<2.18.0" -r .github/requirements-ci.txt --upgrade
pip install "ansible-core<2.19.0" -r .github/requirements-ci.txt --upgrade
ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml
- name: Install galaxy-importer
# Install the specific version of galaxy-importer used on galaxy.ansible.com
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.2
rev: v0.7.3
hooks:
# Run the linter.
- id: ruff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Developing with your local Python environment requires you to configure and inst
Recommended steps with Python virtual environment:

1. Create and activate a Python virtual environment.
2. Install Python requirements located in the AVD repository: [requirements-dev.txt](https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/requirements-dev.txt) and [requirements.txt](https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/requirements.txt).
2. Install Python requirements located in the AVD repository: [requirements-dev.txt](https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/requirements-dev.txt).

!!! note
Ensure the virtual environment is located outside of the AVD project directory.
Expand All @@ -72,7 +72,7 @@ source avd-venv/bin/activate
# The installation _must_ be performed from the root of the cloned avd repository.
cd avd
# Requirements files are located in `ansible_collections/arista/avd` of the avd repository.
pip3 install -r ansible_collections/arista/avd/requirements-dev.txt -r ansible_collections/arista/avd/requirements.txt --upgrade
pip3 install -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
```

!!! note
Expand Down
2 changes: 1 addition & 1 deletion ansible_collections/arista/avd/meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
requires_ansible: '>=2.15.0,<2.18.0'
requires_ansible: '>=2.15.0,<2.19.0'
plugin_routing:
filter:
convert_dicts:
Expand Down

This file was deleted.

Loading

0 comments on commit e3c7d51

Please sign in to comment.