Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Strech
Copy link
Member

@Strech Strech commented Apr 1, 2025

What does this PR do?

Add unified handling for string keys for AppSec kit events.

Motivation:

This change is motivated by customer who uses string keys (which are impossible till Ruby 2.7) to pass complex keys like usr.login. They wasn't handled before.

Change log entry

Yes. AppSec: Fix Datadog::Kit::AppSec::Events SDK methods to correctly handle given string key usr.login.

Additional Notes:

How to test the change?

@Strech Strech requested a review from a team as a code owner April 1, 2025 12:55
@Strech Strech added the appsec Application Security monitoring product label Apr 1, 2025
@codecov-commenter
Copy link

codecov-commenter commented Apr 1, 2025

Codecov Report

Attention: Patch coverage is 81.81818% with 6 lines in your changes missing coverage. Please review.

Project coverage is 97.76%. Comparing base (23fb133) to head (2c399f5).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
spec/support/platform_helpers.rb 60.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4552      +/-   ##
==========================================
- Coverage   97.78%   97.76%   -0.03%     
==========================================
  Files        1396     1396              
  Lines       85831    85867      +36     
  Branches     4322     4329       +7     
==========================================
+ Hits        83926    83944      +18     
- Misses       1905     1923      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Apr 1, 2025

Datadog Report

Branch report: appsec-handle-usr-login-in-kit-events
Commit report: 2c399f5
Test service: dd-trace-rb

✅ 0 Failed, 20801 Passed, 1378 Skipped, 3m 27.82s Total Time

Copy link
Member

@y9v y9v left a comment

Choose a reason for hiding this comment

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

awesome!

@pr-commenter
Copy link

pr-commenter bot commented Apr 1, 2025

Benchmarks

Benchmark execution time: 2025-04-01 16:06:59

Comparing candidate commit 2c399f5 in PR branch appsec-handle-usr-login-in-kit-events with baseline commit 23fb133 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

@Strech Strech force-pushed the appsec-handle-usr-login-in-kit-events branch from 71b0b68 to 807f1af Compare April 1, 2025 13:43
@Strech Strech force-pushed the appsec-handle-usr-login-in-kit-events branch from 807f1af to f361288 Compare April 1, 2025 15:11
Strech added 2 commits April 1, 2025 17:42
It will allow us to have guard-clause for some specific cases. Example:

```ruby
it 'runs only on Ruby > 3.0', ruby: '> 3.0' do
  expect(something).to be(true)
end
```
@Strech Strech force-pushed the appsec-handle-usr-login-in-kit-events branch from f361288 to 2c399f5 Compare April 1, 2025 15:43
@Strech Strech merged commit 157982b into master Apr 2, 2025
442 checks passed
@Strech Strech deleted the appsec-handle-usr-login-in-kit-events branch April 2, 2025 16:28
@github-actions github-actions bot added this to the 2.14.0 milestone Apr 2, 2025
@p-datadog p-datadog mentioned this pull request Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appsec Application Security monitoring product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants