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

Semantic diff query optimized #577

Merged
merged 46 commits into from
Sep 12, 2023
Merged

Conversation

tanyaveksler
Copy link
Member

No description provided.

Keeping optimized properties separated per rule (instead of the union of all policy rules)
Fixed handling HostEPs in optimized implementation.

Signed-off-by: Tanya <[email protected]>
Keeping optimized properties separated per rule (instead of the union of all policy rules)
Fixed handling HostEPs in optimized implementation.

Signed-off-by: Tanya <[email protected]>
Returning 'passed' code for skipped queries.

Signed-off-by: Tanya <[email protected]>
Keeping optimized properties separated per rule (instead of the union of all policy rules)
Fixed handling HostEPs in optimized implementation.

Signed-off-by: Tanya <[email protected]>
Keeping optimized properties separated per rule (instead of the union of all policy rules)
Fixed handling HostEPs in optimized implementation.

Signed-off-by: Tanya <[email protected]>
…e times for the same rule, for example when a rule appears twice in a config).

Signed-off-by: Tanya <[email protected]>
Signed-off-by: Tanya <[email protected]>
Commented out containment fullExplanation result comparison in tests, since optimized solution gives more accurate result that differs from the original expected result, and thus the test fails.

Signed-off-by: Tanya <[email protected]>
Commented out twoWayContainment fullExplanation result comparison in tests, since optimized solution gives more accurate result that differs from the original expected result, and thus the tests fail.

Signed-off-by: Tanya <[email protected]>
Signed-off-by: Tanya <[email protected]>
Commenting out detailed difference result for some tests, since optimized implementation results are sometimes more detailed than the original ones.

Signed-off-by: Tanya <[email protected]>
Adding implemented queries also to run_all_tests.py

Signed-off-by: Tanya <[email protected]>
…dded semantic comparison of original and optimized results, and returning original result (to avoid test failures).

In case of optimized_run == 'true' returning optimized result.

Signed-off-by: Tanya <[email protected]>
Signed-off-by: Tanya <[email protected]>
Signed-off-by: Tanya <[email protected]>
… debug mode.

In optimized run, extracting referenced ip-blocks from connectivity properties.

Signed-off-by: Tanya <[email protected]>
@tanyaveksler tanyaveksler self-assigned this Jul 30, 2023
@tanyaveksler tanyaveksler requested a review from adisos July 30, 2023 15:27
nca/FWRules/ConnectivityGraph.py Outdated Show resolved Hide resolved
nca/NetworkConfig/NetworkConfigQuery.py Outdated Show resolved Hide resolved
nca/NetworkConfig/NetworkConfigQuery.py Show resolved Hide resolved
nca/NetworkConfig/NetworkConfigQuery.py Outdated Show resolved Hide resolved
tanyaveksler and others added 4 commits August 6, 2023 12:16
Signed-off-by: Tanya <[email protected]>
In filter_conns_by_input_or_internal_constraints, computing ip_block_mask only when exclude_ipv6 flag is true.

Signed-off-by: Tanya <[email protected]>
nca/CoreDS/Peer.py Outdated Show resolved Hide resolved
@@ -812,7 +832,7 @@ def compute_connectivity_output_optimized(self):
ref_ip_blocks = self.config.get_referenced_ip_blocks(exclude_ipv6)
for ip_block in ref_ip_blocks:
ip_blocks_mask |= ip_block
opt_peers_to_compare.filter_ipv6_blocks(ip_blocks_mask)
opt_peers_to_compare.filter_ip_blocks_by_mask(ip_blocks_mask)
Copy link
Member

Choose a reason for hiding this comment

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

can't the arg to filter_ip_blocks_by_mask just be IpBlock.get_all_ips_block(exclude_ipv6=True) instead of ip_blocks_mask ? (and use the function check_for_excluding_ipv6_addresses() instead of using self.output_config.excludeIPv6Range )?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, changed similarly to TwoNetworkConfigsQuery.filter_conns_by_input_or_internal_constraints

Copy link
Member

Choose a reason for hiding this comment

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

opened issue #594 related to follow-ups for the ipv6 filtering aspects.

tanyaveksler and others added 4 commits August 15, 2023 10:45
Co-authored-by: Adi Sosnovich <[email protected]>
…(whenever at least one Ipv6 block appears in any policy in the config, none of IPv6 blocks will be filtered out).

Signed-off-by: Tanya <[email protected]>
@tanyaveksler tanyaveksler merged commit 4f01c54 into master Sep 12, 2023
16 checks passed
@tanyaveksler tanyaveksler deleted the semantic-diff-query-optimized branch September 12, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants