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

Fix(eos_cli_config_gen): update logic in monitor_sessions #3823

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

carlbuchmann
Copy link
Member

@carlbuchmann carlbuchmann commented Apr 8, 2024

Change Summary

Monitor-session templates expect both keys monitor_session.sources is arista.avd.defined and monitor_session.destinations to be defined before generating any config but this is not required in EOS, so relaxing this check and requirement.

{% if monitor_sessions is arista.avd.defined %}
!
{%     for monitor_session in monitor_sessions | arista.avd.natural_sort('name') if monitor_session.name is arista.avd.defined %}
{%         if monitor_session.sources is arista.avd.defined and monitor_session.destinations is arista.avd.defined %} # <- remove this if condition.

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

Update logic and optimize tests in template.
Update indentation.
Updated eos_designs_unit test case where monitor session is configured without destination, and now we see configuration being generated.

How to test

All Molecule tests should pass!

@carlbuchmann carlbuchmann requested review from a team as code owners April 8, 2024 17:18
@github-actions github-actions bot added role: eos_cli_config_gen issue related to eos_cli_config_gen role state: Documentation role Updated labels Apr 8, 2024
@carlbuchmann carlbuchmann marked this pull request as draft April 8, 2024 20:19
@carlbuchmann carlbuchmann changed the title Fix(eos_cli_config_gen): make monitor_sessions.[].<sources | destinations> required keys Fix(eos_cli_config_gen): update logic in monitor_sessions Apr 9, 2024
@github-actions github-actions bot added the state: conflict PR with conflict label Apr 17, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added state: conflict PR with conflict state: CI Updated CI scenario have been updated in the PR and removed state: conflict PR with conflict state: Documentation role Updated labels Apr 29, 2024
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the state: conflict PR with conflict label Apr 29, 2024
@carlbuchmann carlbuchmann marked this pull request as ready for review April 29, 2024 20:01
@ClausHolbechArista ClausHolbechArista requested a review from a team April 30, 2024 07:51
@ClausHolbechArista ClausHolbechArista added the one approval This PR has one approval and is only missing one more. label Apr 30, 2024
@gmuloc
Copy link
Contributor

gmuloc commented Apr 30, 2024

As discussed on chat with @ClausHolbechArista, this PR could trigger some changes for existing deployment with only source pr destination that will suddenly start to generate config (hence a "breaking change").

I would be in favor of:
1/ Adding a ! indicating it is breaking (to our output) but it is a bug fix so it is allowed by SemVer
2/ maybe pushing this to 5.0.0 or if we believe we can't wait then making it a patch with an addition in the release notes but we may be argued that we don't follow SemVer stricto sensu

@carlbuchmann carlbuchmann added this to the v5.0.0 milestone Apr 30, 2024
@carlbuchmann carlbuchmann marked this pull request as draft April 30, 2024 12:58
Co-authored-by: Claus Holbech <holbech@arista.com>
@sugetha24 sugetha24 self-requested a review April 30, 2024 18:14
Copy link
Contributor

@sugetha24 sugetha24 left a comment

Choose a reason for hiding this comment

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

LGTM

@carlbuchmann carlbuchmann removed the one approval This PR has one approval and is only missing one more. label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants