aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
299 stars 219 forks source link

Feat(plugins): Set changed=true and print yellow updates when recompiling schemas/templates #4715

Closed gmuloc closed 1 week ago

gmuloc commented 2 weeks ago

Change Summary

1/ set changed=true 2/ if any templates or schemas was recompiled print a yellow log.

Related Issue(s)

Fixes #4709

Component(s) name

plugins

Proposed changes

cf summary

How to test

remove the .hash files in python-avd/pyavd/*/j2templates and python-avd/pyavd/*/schema/schema_fragments/ and run any molecule

No verbosity:

Screenshot 2024-11-12 at 15 28 13

Verbosity 1:

Screenshot 2024-11-12 at 15 27 43

Checklist

Repository Checklist

github-actions[bot] commented 2 weeks ago

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-4715
# Activate the virtual environment
source test-avd-pr-4715/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/gmuloc/avd.git@issue/4709#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/gmuloc/avd.git#/ansible_collections/arista/avd/,issue/4709 --force
# Optional: Install AVD examples
cd test-avd-pr-4715
ansible-playbook arista.avd.install_examples
sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud