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

T7013 route maps integration tests #381

Merged
merged 10 commits into from
Feb 2, 2025

Conversation

omnom62
Copy link
Contributor

@omnom62 omnom62 commented Jan 29, 2025

Change Summary

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

Proposed changes

How to test

Test results

  • Sanity tests passed
  • Unit tests passed

Tested against VyOS versions:

  • 1.3.8
  • 1.4-rolling-202201010100

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the ansible sanity and unit tests
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added unit tests to cover my changes
  • I have added a file to changelogs/fragments to describe the changes

@omnom62 omnom62 marked this pull request as ready for review January 29, 2025 23:00
@omnom62 omnom62 requested review from gaige and a team January 29, 2025 23:00
Copy link
Member

@andamasov andamasov left a comment

Choose a reason for hiding this comment

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

GTG

@kumvijaya kumvijaya requested a review from a team January 31, 2025 14:09
@gaige
Copy link
Contributor

gaige commented Feb 2, 2025

@omnom62 I just checked out this PR and ran the integration tests against 1.3.8, 1.4.1, and 1.5-rolling; I failed all three in the asserts after

TASK [vyos_route_maps : Provide the running configuration for parsing (config to be parsed)] ***

Can you confirm which versions your tests succeeded against?

Also possible there may be a missing check-in or file, as the problem appears to be an undefined merged_commands, which may be because parsed test doesn't include the version code, and there's no default, which is likely due to parsed.yaml not calling _get_version.yaml or _populate.yaml

Errors:

    "msg": "The conditional check 'result.parsed|symmetric_difference(merged.after) == []' failed. The error was: error while evaluating conditional (result.parsed|symmetric_difference(merged.after) == []): {'before': [], 'commands': '{{ merged_commands }}', 'after': [{'route_map': 'test3', 'entries': [{'sequence': 1, 'action': 'permit', 'match': {'metric': 1, 'peer': '192.0.2.32'}, 'set': {'local_preference': '4', 'metric': '5', 'metric_type': 'type-1', 'origin': 'egp', 'originator_id': '192.0.2.34', 'tag': '5', 'weight': '4'}}]}, {'route_map': 'test1', 'entries': [{'sequence': 1, 'description': 'test', 'action': 'permit', 'continue_sequence': 2}]}]}: 'merged_commands' is undefined"
}
fatal: [v14.dc.cluetrust.com]: FAILED! => {
    "msg": "The conditional check 'result.parsed|symmetric_difference(merged.after) == []' failed. The error was: error while evaluating conditional (result.parsed|symmetric_difference(merged.after) == []): {'before': [], 'commands': '{{ merged_commands }}', 'after': [{'route_map': 'test3', 'entries': [{'sequence': 1, 'action': 'permit', 'match': {'metric': 1, 'peer': '192.0.2.32'}, 'set': {'local_preference': '4', 'metric': '5', 'metric_type': 'type-1', 'origin': 'egp', 'originator_id': '192.0.2.34', 'tag': '5', 'weight': '4'}}]}, {'route_map': 'test1', 'entries': [{'sequence': 1, 'description': 'test', 'action': 'permit', 'continue_sequence': 2}]}]}: 'merged_commands' is undefined"
}
fatal: [v15.dc.cluetrust.com]: FAILED! => {
    "msg": "The conditional check 'result.parsed|symmetric_difference(merged.after) == []' failed. The error was: error while evaluating conditional (result.parsed|symmetric_difference(merged.after) == []): {'before': [], 'commands': '{{ merged_commands }}', 'after': [{'route_map': 'test3', 'entries': [{'sequence': 1, 'action': 'permit', 'match': {'metric': 1, 'peer': '192.0.2.32'}, 'set': {'local_preference': '4', 'metric': '5', 'metric_type': 'type-1', 'origin': 'egp', 'originator_id': '192.0.2.34', 'tag': '5', 'weight': '4'}}]}, {'route_map': 'test1', 'entries': [{'sequence': 1, 'description': 'test', 'action': 'permit', 'continue_sequence': 2}]}]}: 'merged_commands' is undefined"
}

Copy link
Contributor

@gaige gaige left a comment

Choose a reason for hiding this comment

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

Please address these comments prior to merge. Also see the top-level comment on the merge_commands failure.

@omnom62
Copy link
Contributor Author

omnom62 commented Feb 2, 2025

@omnom62 I just checked out this PR and ran the integration tests against 1.3.8, 1.4.1, and 1.5-rolling; I failed all three in the asserts after

TASK [vyos_route_maps : Provide the running configuration for parsing (config to be parsed)] ***

Can you confirm which versions your tests succeeded against?

Also possible there may be a missing check-in or file, as the problem appears to be an undefined merged_commands, which may be because parsed test doesn't include the version code, and there's no default, which is likely due to parsed.yaml not calling _get_version.yaml or _populate.yaml

Errors:

    "msg": "The conditional check 'result.parsed|symmetric_difference(merged.after) == []' failed. The error was: error while evaluating conditional (result.parsed|symmetric_difference(merged.after) == []): {'before': [], 'commands': '{{ merged_commands }}', 'after': [{'route_map': 'test3', 'entries': [{'sequence': 1, 'action': 'permit', 'match': {'metric': 1, 'peer': '192.0.2.32'}, 'set': {'local_preference': '4', 'metric': '5', 'metric_type': 'type-1', 'origin': 'egp', 'originator_id': '192.0.2.34', 'tag': '5', 'weight': '4'}}]}, {'route_map': 'test1', 'entries': [{'sequence': 1, 'description': 'test', 'action': 'permit', 'continue_sequence': 2}]}]}: 'merged_commands' is undefined"
}
fatal: [v14.dc.cluetrust.com]: FAILED! => {
    "msg": "The conditional check 'result.parsed|symmetric_difference(merged.after) == []' failed. The error was: error while evaluating conditional (result.parsed|symmetric_difference(merged.after) == []): {'before': [], 'commands': '{{ merged_commands }}', 'after': [{'route_map': 'test3', 'entries': [{'sequence': 1, 'action': 'permit', 'match': {'metric': 1, 'peer': '192.0.2.32'}, 'set': {'local_preference': '4', 'metric': '5', 'metric_type': 'type-1', 'origin': 'egp', 'originator_id': '192.0.2.34', 'tag': '5', 'weight': '4'}}]}, {'route_map': 'test1', 'entries': [{'sequence': 1, 'description': 'test', 'action': 'permit', 'continue_sequence': 2}]}]}: 'merged_commands' is undefined"
}
fatal: [v15.dc.cluetrust.com]: FAILED! => {
    "msg": "The conditional check 'result.parsed|symmetric_difference(merged.after) == []' failed. The error was: error while evaluating conditional (result.parsed|symmetric_difference(merged.after) == []): {'before': [], 'commands': '{{ merged_commands }}', 'after': [{'route_map': 'test3', 'entries': [{'sequence': 1, 'action': 'permit', 'match': {'metric': 1, 'peer': '192.0.2.32'}, 'set': {'local_preference': '4', 'metric': '5', 'metric_type': 'type-1', 'origin': 'egp', 'originator_id': '192.0.2.34', 'tag': '5', 'weight': '4'}}]}, {'route_map': 'test1', 'entries': [{'sequence': 1, 'description': 'test', 'action': 'permit', 'continue_sequence': 2}]}]}: 'merged_commands' is undefined"
}

Mine are successful for all the range:
PLAY RECAP *********************************************************************
target01 : ok=118 changed=17 unreachable=0 failed=0 skipped=18 rescued=0 ignored=5
target02 : ok=118 changed=17 unreachable=0 failed=0 skipped=18 rescued=0 ignored=5
target03 : ok=119 changed=17 unreachable=0 failed=0 skipped=17 rescued=0 ignored=5
target04 : ok=118 changed=17 unreachable=0 failed=0 skipped=18 rescued=0 ignored=5

I checked in everything. Perhaps this was interim
I will also incorporate your recommendations and re-run the tests

@omnom62 omnom62 requested a review from gaige February 2, 2025 20:04
Copy link
Contributor

@gaige gaige left a comment

Choose a reason for hiding this comment

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

Looks like we could remove _get_version.yaml now as it's not in use.

Copy link
Contributor

@gaige gaige 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 under 1.3.8, 1.4.1, and VyOS 1.5-rolling-202411070006

@gaige gaige merged commit 2eea25f into vyos:main Feb 2, 2025
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants