Skip to content

Conversation

@StacieClark-Elastic
Copy link
Member

Proposed commit message

Enhanced error handling in the CEL program to prevent "no such key: product_batch_size'" errors by ensuring proper propagation of the state data configuration during failures. This was accomplished by wrapping the objects returned from errors with state.with()

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.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

@StacieClark-Elastic StacieClark-Elastic requested a review from a team as a code owner July 28, 2025 23:02
@StacieClark-Elastic StacieClark-Elastic added Integration:m365_defender Microsoft Defender XDR bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Jul 28, 2025
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@StacieClark-Elastic StacieClark-Elastic force-pushed the bugfix/m365-defender-failed-request-recovery branch from fb352df to 42f4f61 Compare July 28, 2025 23:02
@StacieClark-Elastic StacieClark-Elastic marked this pull request as draft July 28, 2025 23:17
@StacieClark-Elastic StacieClark-Elastic force-pushed the bugfix/m365-defender-failed-request-recovery branch from a261c20 to 7ad062a Compare July 29, 2025 15:59
@StacieClark-Elastic StacieClark-Elastic marked this pull request as ready for review July 29, 2025 16:00
@elastic-vault-github-plugin-prod
Copy link

elastic-vault-github-plugin-prod bot commented Jul 29, 2025

🚀 Benchmarks report

Package m365_defender 👍(3) 💚(0) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
vulnerability 2145.92 1730.1 -415.82 (-19.38%) 💔

To see the full report comment with /test benchmark fullreport

Copy link
Contributor

@chrisberkhout chrisberkhout left a comment

Choose a reason for hiding this comment

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

Looks good. Some suggestions about closing things at the level of indentation at which they were opened.

Comment on lines 104 to 105
}
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
)
})

Avoids a half indentation and make it clearer that the following ) closes the .as( in line 63.

Copy link
Member Author

Choose a reason for hiding this comment

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

I used celfmt on the entire file. It won't allow ({ or }). This causes some changes on lines that weren't changed but it follows the convention that celfmt sets.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, celfmt doesn't have the best taste, but it has simple taste. These no longer cuddle.

Comment on lines 169 to 170
}
)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I used celfmt on the entire file. It won't allow ({ or }). This causes some changes on lines that weren't changed but it follows the convention that celfmt sets.

Comment on lines 236 to 252
}
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
)
})

And here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I used celfmt on the entire file. It won't allow ({ or }). This causes some changes on lines that weren't changed but it follows the convention that celfmt sets.

Enhanced error handling in the CEL program to prevent 'no such key: product_batch_size' errors by ensuring proper propagation of the state data configuration during failures. This was accomplished by wrapping the objects returned from errors with state.with()
@StacieClark-Elastic StacieClark-Elastic force-pushed the bugfix/m365-defender-failed-request-recovery branch from e52a839 to a46530c Compare July 29, 2025 18:16
…am with state.with()

instead of wrapping each error event with state.with()
@elastic-sonarqube
Copy link

@elasticmachine
Copy link

💚 Build Succeeded

History

@StacieClark-Elastic StacieClark-Elastic merged commit 18748f2 into elastic:main Jul 30, 2025
9 checks passed
@elastic-vault-github-plugin-prod

Package m365_defender - 3.14.0 containing this change is available at https://epr.elastic.co/package/m365_defender/3.14.0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:m365_defender Microsoft Defender XDR Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants