Skip to content

sei: fix exclude_files pattern #8635

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

Merged
merged 1 commit into from
Dec 9, 2023
Merged

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Dec 4, 2023

Proposed commit message

The current pattern matches all file names ending with gz that are at least three characters long, not the equivalent of the *.gz glob pattern.

[git-generate]
cd packages
for pkg in $(
	(
		for p in $(rg -lF 'exclude_files: [".gz$"]' | cut -f1 -d'/' | sort | uniq); do
			grep "^/packages/$p.*security-external-integrations" ../.github/CODEOWNERS | cut -f3 -d'/' | cut -f1 -d' '
		done
	) | sort | uniq
); do
	(
		rg -F 'exclude_files: [".gz$"]' $pkg >/dev/null || continue
		cd $pkg
		parallel gsed -r -i '"'"s/exclude_files: \\\\[\\\"\\\\.gz\\\\$\\\"\\\\]/exclude_files: ['\\\\\\.gz$']/g"'"' {} ::: $(find . -name '*.yml.hbs')
		elastic-package changelog add --next patch --description "Fix exclude_files pattern." --type bugfix --link https://github.com/elastic/integrations/pull/1
	)
done

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 added bug Something isn't working, use only for issues Team:Security-External Integrations Team:Cloud-Monitoring Label for the Cloud Monitoring team labels Dec 4, 2023
@efd6 efd6 self-assigned this Dec 4, 2023
@efd6 efd6 force-pushed the 8634-exclude_files branch from b249845 to 3f4e574 Compare December 4, 2023 02:12
@elasticmachine
Copy link

elasticmachine commented Dec 4, 2023

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

elasticmachine commented Dec 4, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-12-08T20:04:15.750+0000

  • Duration: 92 min 34 sec

Test stats 🧪

Test Results
Failed 0
Passed 1352
Skipped 6
Total 1358

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Dec 4, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (121/121) 💚
Files 95.533% (278/291) 👎 -4.467
Classes 95.533% (278/291) 👎 -4.467
Methods 93.844% (2500/2664) 👍 18.086
Lines 89.813% (59369/66103) 👎 -10.187
Conditionals 100.0% (0/0) 💚

@efd6 efd6 marked this pull request as ready for review December 4, 2023 03:54
@efd6 efd6 requested review from a team as code owners December 4, 2023 03:54
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@efd6 efd6 force-pushed the 8634-exclude_files branch from 3f4e574 to 9329f4f Compare December 5, 2023 20:14
@efd6 efd6 force-pushed the 8634-exclude_files branch from 9329f4f to 8c672bd Compare December 6, 2023 04:40
@efd6 efd6 force-pushed the 8634-exclude_files branch from 8c672bd to 47c0ece Compare December 6, 2023 04:43
@efd6
Copy link
Contributor Author

efd6 commented Dec 6, 2023

/test

1 similar comment
@efd6
Copy link
Contributor Author

efd6 commented Dec 6, 2023

/test

@efd6 efd6 force-pushed the 8634-exclude_files branch from 47c0ece to 2080ff1 Compare December 7, 2023 23:45
Copy link
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

LGTM

The current pattern matches all file names ending with gz that are at least three
characters long, not the equivalent of the *.gz glob pattern.

[git-generate]
cd packages
for pkg in $(
	(
		for p in $(rg -lF 'exclude_files: [".gz$"]' | cut -f1 -d'/' | sort | uniq); do
			grep "^/packages/$p.*security-external-integrations" ../.github/CODEOWNERS | cut -f3 -d'/' | cut -f1 -d' '
		done
	) | sort | uniq
); do
	(
		rg -F 'exclude_files: [".gz$"]' $pkg >/dev/null || continue
		cd $pkg
		parallel gsed -r -i '"'"s/exclude_files: \\\\[\\\"\\\\.gz\\\\$\\\"\\\\]/exclude_files: ['\\\\\\.gz$']/g"'"' {} ::: $(find . -name '*.yml.hbs')
		elastic-package changelog add --next patch --description "Fix exclude_files pattern." --type bugfix --link elastic#8635
	)
done
@efd6 efd6 force-pushed the 8634-exclude_files branch from 2080ff1 to 87724ad Compare December 8, 2023 20:03
@efd6 efd6 merged commit 1fd7c35 into elastic:main Dec 9, 2023
@elasticmachine
Copy link

Package atlassian_bitbucket - 1.22.1 containing this change is available at https://epr.elastic.co/search?package=atlassian_bitbucket

@elasticmachine
Copy link

Package atlassian_confluence - 1.23.1 containing this change is available at https://epr.elastic.co/search?package=atlassian_confluence

@andrewkroh andrewkroh added Integration:bluecoat Blue Coat Director Logs (Deprecated) Integration:cisco_ftd Cisco FTD Integration:cisco_meraki Cisco Meraki Integration:forcepoint_web Forcepoint Web Security (Community supported) Integration:auditd Auditd Logs Integration:cylance CylanceProtect Logs Integration:f5 F5 Logs (Deprecated) [Integration not found in source] Integration:cisco_aironet Cisco Aironet (Community supported) Integration:cisco_nexus Cisco Nexus Integration:fireeye FireEye Network Security (Community supported) Integration:fortinet_fortimanager Fortinet FortiManager Logs Integration:cef Common Event Format (CEF) Integration:crowdstrike CrowdStrike Integration:fortinet_fortiedr Fortinet FortiEDR Logs Integration:atlassian_confluence Atlassian Confluence (Community supported) Integration:atlassian_jira Atlassian Jira (Community supported) Integration:barracuda Barracuda Web Application Firewall Integration:cisco_secure_email_gateway Cisco Secure Email Gateway Integration:citrix_waf Citrix Web App Firewall Integration:f5_bigip F5 BIG-IP Integration:atlassian_bitbucket Atlassian Bitbucket (Community supported) Integration:cyberarkpas CyberArk Privileged Access Security Integration:fortinet_fortimail Fortinet FortiMail Integration:aws AWS Integration:cisco_ios Cisco IOS Integration:cisco_ise Cisco ISE Integration:fortinet_fortigate Fortinet FortiGate Firewall Logs Integration:hashicorp_vault Hashicorp Vault Integration:checkpoint Check Point labels Jul 22, 2024
@efd6 efd6 deleted the 8634-exclude_files branch February 5, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, use only for issues Integration:atlassian_bitbucket Atlassian Bitbucket (Community supported) Integration:atlassian_confluence Atlassian Confluence (Community supported) Integration:atlassian_jira Atlassian Jira (Community supported) Integration:auditd Auditd Logs Integration:aws AWS Integration:barracuda Barracuda Web Application Firewall Integration:bluecoat Blue Coat Director Logs (Deprecated) Integration:carbonblack_edr VMware Carbon Black EDR Integration:cef Common Event Format (CEF) Integration:checkpoint Check Point Integration:cisco_aironet Cisco Aironet (Community supported) Integration:cisco_asa Cisco ASA Integration:cisco_ftd Cisco FTD Integration:cisco_ios Cisco IOS Integration:cisco_ise Cisco ISE Integration:cisco_meraki Cisco Meraki Integration:cisco_nexus Cisco Nexus Integration:cisco_secure_email_gateway Cisco Secure Email Gateway Integration:citrix_waf Citrix Web App Firewall Integration:crowdstrike CrowdStrike Integration:cyberarkpas CyberArk Privileged Access Security Integration:cylance CylanceProtect Logs Integration:f5_bigip F5 BIG-IP Integration:f5 F5 Logs (Deprecated) [Integration not found in source] Integration:fireeye FireEye Network Security (Community supported) Integration:forcepoint_web Forcepoint Web Security (Community supported) Integration:fortinet_forticlient Fortinet FortiClient Logs (Deprecated) Integration:fortinet_fortiedr Fortinet FortiEDR Logs Integration:fortinet_fortigate Fortinet FortiGate Firewall Logs Integration:fortinet_fortimail Fortinet FortiMail Integration:fortinet_fortimanager Fortinet FortiManager Logs Integration:hashicorp_vault Hashicorp Vault Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sei: incorrect exclude_files syntax in numerous packages
4 participants