Skip to content

fix(terraform): add value-based fallback for cross-module graph edge resolution - #7735

Open
talazuri wants to merge 4 commits into
mainfrom
feature/BCE-31405-tf-cross-module
Open

talazuri wants to merge 4 commits into
mainfrom
feature/BCE-31405-tf-cross-module

Conversation

@talazuri

Copy link
Copy Markdown
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

New/Edited policies (Delete if not relevant)

Description

Include a description of what makes it a violation and any relevant external links.

Fix

How does someone fix the issue in code and/or in runtime?

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes

self._set_connected_node(destination_attributes, origin_attributes)
continue
if origin_attributes.get(CustomAttributes.BLOCK_TYPE) == BlockType.OUTPUT:
print(1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this be removed?

if node.get(CustomAttributes.RESOURCE_TYPE) in connected_type_set:
file_path = node.get(CustomAttributes.FILE_PATH, "")
vals = connected_values_by_file.setdefault(file_path, set())
for val in node.values():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This iteration matches by string, is there a risk of FPs here? We can have similar name nodes in different places.

except StopIteration:
continue

def _value_based_fallback(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what is the performance impact of this function? I see lots of node iterations and for large graphs it could have a real impact

This branch is waiting to be deployed

1 waiting deployment
scan-security — 95df55fb Waiting Oct 11, 2026 by eshmayovitz via start-security-scan #6717
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.

3 participants