Skip to content

Commit 2b591c7

Browse files
shashank-elastictradebot-elastic
authored andcommitted
Fix variable usage impacting schema build performance (#4910)
(cherry picked from commit bbdde20)
1 parent e1b9c13 commit 2b591c7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

detection_rules/integrations.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ def write_manifests(integrations: dict[str, Any]) -> None:
113113
def build_integrations_schemas(overwrite: bool, integration: str | None = None) -> None:
114114
"""Builds a new local copy of integration-schemas.json.gz from EPR integrations."""
115115

116-
saved_integration_schemas = {}
117-
118116
# Check if the file already exists and handle accordingly
119117
if overwrite and SCHEMA_FILE_PATH.exists():
120118
SCHEMA_FILE_PATH.unlink()
@@ -139,7 +137,7 @@ def build_integrations_schemas(overwrite: bool, integration: str | None = None)
139137
print(f"processing {package}")
140138
final_integration_schemas.setdefault(package, {}) # type: ignore[reportUnknownMemberType]
141139
for version, manifest in versions.items():
142-
if package in saved_integration_schemas and version in saved_integration_schemas[package]:
140+
if package in final_integration_schemas and version in final_integration_schemas[package]:
143141
continue
144142

145143
# Download the zip file

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "detection_rules"
3-
version = "1.3.9"
3+
version = "1.3.10"
44
description = "Detection Rules is the home for rules used by Elastic Security. This repository is used for the development, maintenance, testing, validation, and release of rules for Elastic Security’s Detection Engine."
55
readme = "README.md"
66
requires-python = ">=3.12"

0 commit comments

Comments
 (0)