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
Graph - reuse parse content dto, skip empty packs #4154
Conversation
logger.debug( | ||
f'DEMISTO_SDK_GRAPH_FORCE_CREATE = {os.getenv("DEMISTO_SDK_GRAPH_FORCE_CREATE")}' | ||
) | ||
if os.getenv("DEMISTO_SDK_GRAPH_FORCE_CREATE") == "true": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put inside a variable and reuse it also in the line 76
@@ -17,25 +18,41 @@ | |||
USE_MULTIPROCESSING = False # toggle this for better debugging | |||
|
|||
|
|||
@lru_cache | |||
def from_path(path: Path = CONTENT_PATH, packs_to_parse: Optional[Tuple[str]] = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why isn't it a class method of ContentDTO
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I documented, for some reason I get cache miss whin it's in the class.
Co-authored-by: Guy Afik <53861351+GuyAfik@users.noreply.github.com>
Co-authored-by: Guy Afik <53861351+GuyAfik@users.noreply.github.com>
…misto/demisto-sdk into skip_graph_validation_on_old_validate
…on_on_old_validate
Changelog(s) in markdown:
|
This fixes the following:
ContentDTO.from_path
, so if the content was parsed in the sdk run, it will not parsefixes: https://jira-dc.paloaltonetworks.com/browse/CIAC-9717