Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor(eos_designs): Move debug vars dump to action plugin instead of it's own task #4540

Conversation

ClausHolbechArista
Copy link
Contributor

Change Summary

Move debug vars dump to action plugin instead of it's own task

Related Issue(s)

Increased run time after we removed tags since Ansible gathers all vars for every device before evaluating when on the task.

Component(s) name

arista.avd.eos_designs

Proposed changes

Move dump of hostvars to eos_designs_structured_config action plugin, since that already runs per device and has access to all vars.

How to test

Tested manually and compared output between devel and branch:

molecule converge -s eos_designs_unit_tests -- -e avd_eos_designs_debug="{{ true }}"

Note some reordering is expected where the internal data structures are built using sets.

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@ClausHolbechArista ClausHolbechArista added this to the v5.0.0 milestone Oct 2, 2024
Copy link

github-actions bot commented Oct 2, 2024

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4540
# Activate the virtual environment
source test-avd-pr-4540/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/ClausHolbechArista/avd.git@refactor/eos_designs/move-debug-to-structured-config-action-plugin#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/ClausHolbechArista/avd.git#/ansible_collections/arista/avd/,refactor/eos_designs/move-debug-to-structured-config-action-plugin --force
# Optional: Install AVD examples
cd test-avd-pr-4540
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added the role: eos_designs issue related to eos_designs role label Oct 2, 2024
@carlbuchmann carlbuchmann self-requested a review October 2, 2024 14:03
@gmuloc gmuloc added the one approval This PR has one approval and is only missing one more. label Oct 3, 2024
Copy link

sonarcloud bot commented Oct 3, 2024

Copy link
Member

@carlbuchmann carlbuchmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - tested in local repo... it's fast!

@carlbuchmann carlbuchmann merged commit a51a0d5 into aristanetworks:devel Oct 4, 2024
40 checks passed
@ClausHolbechArista ClausHolbechArista deleted the refactor/eos_designs/move-debug-to-structured-config-action-plugin branch October 23, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
one approval This PR has one approval and is only missing one more. rn: Refactor(eos_designs) role: eos_designs issue related to eos_designs role
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants