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

Allow snapshot comparison for keys with null value on one side #140

Closed
alperenkose opened this issue Jan 3, 2024 · 0 comments · Fixed by #128
Closed

Allow snapshot comparison for keys with null value on one side #140

alperenkose opened this issue Jan 3, 2024 · 0 comments · Fixed by #128
Assignees
Labels
enhancement New feature or request

Comments

@alperenkose
Copy link
Collaborator

Is your feature request related to a problem?

Not encountered in a snapshot yet but if left side of a snapshot has null value while the right side has a str or dict, it throws an exception like below:

Traceback (most recent call last):
  File "snapshot_load_compare.py", line 135, in <module>
    report = compare.compare_snapshots(reports)
  File "/pan-os-upgrade-assurance/panos_upgrade_assurance/snapshot_compare.py", line 128, in compare_snapshots
    result.update({report_type: self._functions_mapping[report_type](**report_config)})
  File "/pan-os-upgrade-assurance/panos_upgrade_assurance/snapshot_compare.py", line 590, in get_diff_and_threshold
    diff = self.calculate_diff_on_dicts(
  File "/pan-os-upgrade-assurance/panos_upgrade_assurance/snapshot_compare.py", line 428, in calculate_diff_on_dicts
    nested_results = SnapshotCompare.calculate_diff_on_dicts(
  File "/pan-os-upgrade-assurance/panos_upgrade_assurance/snapshot_compare.py", line 439, in calculate_diff_on_dicts
    raise exceptions.WrongDataTypeException(f"Unknown value format for key {key}.")
panos_upgrade_assurance.exceptions.WrongDataTypeException: Unknown value format for key authcode.

Describe the solution you'd like

It should present a diff for null vs other snapshot with data

@alperenkose alperenkose added the enhancement New feature or request label Jan 3, 2024
@alperenkose alperenkose self-assigned this Jan 3, 2024
@alperenkose alperenkose linked a pull request Jan 3, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant