-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Integrations Logs E2E Rotation Flaky Fix (v2) #32939
Open
soberpeach
wants to merge
43
commits into
main
Choose a base branch
from
lucas.liseth/integration-log-rotation-e2e-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+166
−31
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
b17ac6c
Test integrations logs writes 10 at a time
soberpeach 3bd2114
Switch greater than or equal to
soberpeach 38efced
Rename files to comply with linter
soberpeach 70acb8e
Rename check files to comply with linter
soberpeach 3670985
Add a check for fake intake logs
soberpeach 7529c56
Merge branch 'main' into lucas.liseth/integration-launcher-e2e-test
soberpeach d19caa8
Remove devmode
soberpeach 86d1004
Check for logs tags
soberpeach fc36e97
Add max size check
soberpeach 375ddf8
Remove testing for implementation
soberpeach 14c1fca
Merge branch 'lucas.liseth/integration-launcher-e2e-test' into lucas.…
soberpeach 8afa07f
Update maxsize test to check fakeintake
soberpeach ad92114
Treat fakeintake as a black box
soberpeach c949b19
Merge branch 'main' into lucas.liseth/integration-log-max-size-e2e-test
soberpeach 758e3ae
Add log ID checking for log rotation test
soberpeach c17dec4
Merge branch 'main' into lucas.liseth/integration-log-max-size-e2e-test
soberpeach 7430b2d
Prevent truncated logs by reducing log size
soberpeach f44e61e
Updated tests to use yaml template
soberpeach f4ef995
Merge branch 'main' into lucas.liseth/integration-log-rotation-e2e-test
soberpeach 894174f
Remove comment from python check
soberpeach 61ebd79
Remove flaky monotonic counter
soberpeach e907737
Combined python check files
soberpeach 8a01fb5
Remove devmode
soberpeach 1b26684
Renamed file
soberpeach 536c064
Update fixtures file
soberpeach caba1fb
Updated bounds for logs check
soberpeach f9d74d6
Merge branch 'main' into lucas.liseth/integration-log-rotation-e2e-test
soberpeach ac80d1c
Replace UUID for logs with increasing counts
soberpeach e00b74f
Merge branch 'main' into lucas.liseth/integration-log-rotation-e2e-test
soberpeach ca4ae9b
Mofify test to remove flakiness
soberpeach 5ca8269
Remove print statement
soberpeach a1c9f7e
addressed comments
soberpeach 39d0c08
Merge branch 'main' into lucas.liseth/integration-log-rotation-e2e-test
soberpeach 2f7d392
Sort logs before checking for checking for match
soberpeach 9ef13f2
Accumulate logs before checking counter
soberpeach bd62bc2
Merge branch 'main' into lucas.liseth/integration-log-rotation-e2e-test
soberpeach b05c7f0
Disregard first number and only count subsequent
soberpeach 2d770a4
Address PR comments
soberpeach 0451297
Fix logs_test comparison
soberpeach a597abe
Update comment and log size
soberpeach 02b64c2
Create unique service for each test run
soberpeach 40c7c1f
Merge branch 'main' into lucas.liseth/integration-log-rotation-e2e-test
soberpeach 2fa7b06
Remove devmode
soberpeach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...new-e2e/tests/agent-metrics-logs/log-agent/linux-log/integrations/fixtures/integration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from datadog_checks.base import AgentCheck | ||
from datadog_checks.base.utils.time import get_timestamp | ||
|
||
|
||
class HelloCheck(AgentCheck): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.counter = 0 # Initialize increasing variable | ||
|
||
def check(self, instance): | ||
data = {} | ||
log_str = instance['log_message'] | ||
data['timestamp'] = get_timestamp() | ||
data['ddtags'] = instance['integration_tags'] | ||
|
||
log_str = instance['log_message'] | ||
if instance['unique_message']: | ||
log_str = instance['log_message'] * instance['log_size'] | ||
self.counter += 1 | ||
log_str = "counter: " + str(self.counter) + ' ' + log_str | ||
data['message'] = log_str | ||
else: | ||
data['message'] = log_str | ||
|
||
num_logs = instance['log_count'] | ||
|
||
for _ in range(num_logs): | ||
self.send_log(data) |
13 changes: 0 additions & 13 deletions
13
test/new-e2e/tests/agent-metrics-logs/log-agent/linux-log/integrations/fixtures/tenLogs.py
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
test/new-e2e/tests/agent-metrics-logs/log-agent/linux-log/integrations/fixtures/tenLogs.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like the integrations_logs_files_max_size setting survives this updateEnv call, meaning that the log files are't actually getting rotated during this test.