Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

fix: allow system tests to override API Security sampling interval#44

Merged
RomainMuller merged 2 commits intomainfrom
romain.marcadier/APPSEC-56547/api-sec-sampling-v2
Apr 3, 2025
Merged

fix: allow system tests to override API Security sampling interval#44
RomainMuller merged 2 commits intomainfrom
romain.marcadier/APPSEC-56547/api-sec-sampling-v2

Conversation

@RomainMuller
Copy link
Copy Markdown
Contributor

Some system tests must override the sampling interval to 0 in order to
be able to test schema extraction works as intended. This requires
reading the default interval from an environment variable.

Some system tests must override the sampling interval to 0 in order to
be able to test schema extraction works as intended. This requires
reading the default interval from an environment variable.
@RomainMuller RomainMuller requested a review from a team as a code owner April 3, 2025 10:00
Comment thread apisec/internal/timed/lru.go Outdated
//
// Note: timestamps are stored at second resolution, so the interval will be
// rounded down to the nearest second.
func NewSet(interval time.Duration, clock ClockFunc) *LRU {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

side comment: function name is a little confusing after the renaming

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I just don't see the name anymore at this point -_-

@RomainMuller RomainMuller enabled auto-merge (squash) April 3, 2025 10:09
@RomainMuller RomainMuller merged commit 24b0518 into main Apr 3, 2025
41 checks passed
@RomainMuller RomainMuller deleted the romain.marcadier/APPSEC-56547/api-sec-sampling-v2 branch April 3, 2025 10:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants