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

[FR] Limit historical rules to the latest 2 #3842

Merged
merged 9 commits into from
Jun 28, 2024
Merged

Conversation

Mikaayenson
Copy link
Contributor

Issues

N/A

Summary

Currently we publish historical rules for each release. At times rules may include multiple updates / versions in the release package, which inflates the number of files in the release package. Today the package has > 5000 artifacts, which impacts memory resources upstream. We have been asked by D&R to update this process to release only the latest 2 versions instead of all to de-risk memory concerns.

I've added a new method keep_latest_versions which filters down to the latest two versions.

Testing

Debug the python -m detection_rules dev build-release

Debugging

Screenshot 2024-06-27 at 1 30 50 PM

Screenshot 2024-06-27 at 1 34 21 PM

Additional Information

@Mikaayenson Mikaayenson added enhancement New feature or request ci/cd fleet-release Issue tracking rule updates released to (OOB) Fleet integration package labels Jun 27, 2024
@Mikaayenson Mikaayenson self-assigned this Jun 27, 2024
@botelastic botelastic bot added the python Internal python for the repository label Jun 27, 2024
@eric-forte-elastic
Copy link
Contributor

eric-forte-elastic commented Jun 27, 2024

🟢 Testing looks good to me, I have the same debugging results as @Mikaayenson

Debugging

Historical Rules before Limiting
Screenshot from 2024-06-27 14-59-50

Historical Rules post limiting

Screenshot from 2024-06-27 15-00-15

detection_rules/devtools.py Outdated Show resolved Hide resolved
@Mikaayenson
Copy link
Contributor Author

Mikaayenson commented Jun 27, 2024

I double confirmed the package is built with the two latest versions and we should be g2g.

Screenshot 2024-06-27 at 5 14 20 PM

Copy link

@banderror banderror left a comment

Choose a reason for hiding this comment

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

LGTM

@Mikaayenson Mikaayenson merged commit 357204e into main Jun 28, 2024
9 checks passed
@Mikaayenson Mikaayenson deleted the limit_historical_rules branch June 28, 2024 11:42
protectionsmachine pushed a commit that referenced this pull request Jun 28, 2024
protectionsmachine pushed a commit that referenced this pull request Jun 28, 2024
protectionsmachine pushed a commit that referenced this pull request Jun 28, 2024
protectionsmachine pushed a commit that referenced this pull request Jun 28, 2024
protectionsmachine pushed a commit that referenced this pull request Jun 28, 2024
protectionsmachine pushed a commit that referenced this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: auto ci/cd enhancement New feature or request fleet-release Issue tracking rule updates released to (OOB) Fleet integration package python Internal python for the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants