Skip to content

Conversation

@belimawr
Copy link
Contributor

What does this PR do?

  • Log as ndjson so logs can easily be parsed/ingested into Elasticsearch
  • Set the log level to debug so we can see the events
  • If the test fails, log the index and search condition used
  • Improve FindESDocs to not log expected failures/errors

Why is it important?

It makes TestKubernetesJournaldInput easier to debug and likely fixes #11220

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

## Disruptive User Impact

How to test this PR locally

DEV=true SNAPSHOT=true EXTERNAL=true DOCKER_VARIANTS="elastic-otel-collector" PACKAGES="docker" PLATFORMS=linux/amd64 mage -v package
SNAPSHOT=true INSTANCE_PROVISIONER=kind mage -v integration:testKubernetesSingle TestKubernetesJournaldInputOtel

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors
@belimawr belimawr self-assigned this Nov 19, 2025
@belimawr belimawr requested a review from a team as a code owner November 19, 2025 16:06
@mergify
Copy link
Contributor

mergify bot commented Nov 19, 2025

This pull request does not have a backport label. Could you fix it @belimawr? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@elasticmachine
Copy link
Collaborator

⏳ Build in-progress, with failures

Failed CI Steps

cc @belimawr

@belimawr
Copy link
Contributor Author

The failing tests seem unrelated: #11253

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Nov 20, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@belimawr belimawr merged commit 3062264 into elastic:main Nov 20, 2025
23 checks passed
@ebeahan
Copy link
Member

ebeahan commented Nov 20, 2025

We've seen this on 9.2 also, so I believe we should backport to at 9.2.

@belimawr thoughts about other backports?

@belimawr belimawr added the backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches label Nov 20, 2025
@github-actions
Copy link
Contributor

@Mergifyio backport 9.1 9.2

@mergify
Copy link
Contributor

mergify bot commented Nov 20, 2025

backport 9.1 9.2

✅ Backports have been created

@belimawr
Copy link
Contributor Author

We've seen this on 9.2 also, so I believe we should backport to at 9.2.

@belimawr thoughts about other backports?

Yeah, that makes sense. Any active branch with this tests.

mergify bot pushed a commit that referenced this pull request Nov 20, 2025
- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors

(cherry picked from commit 3062264)
@belimawr
Copy link
Contributor Author

I'll check all active branches with this test and create the backports.

mergify bot pushed a commit that referenced this pull request Nov 20, 2025
- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors

(cherry picked from commit 3062264)
@belimawr belimawr added the backport-8.19 Automated backport to the 8.19 branch label Nov 20, 2025
mergify bot pushed a commit that referenced this pull request Nov 20, 2025
- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors

(cherry picked from commit 3062264)

# Conflicts:
#	testing/integration/k8s/testdata/journald-otel.yml
belimawr added a commit that referenced this pull request Nov 20, 2025
- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors

(cherry picked from commit 3062264)

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
belimawr added a commit that referenced this pull request Nov 20, 2025
- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors

(cherry picked from commit 3062264)

# Conflicts:
#	testing/integration/k8s/testdata/journald-otel.yml

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
pierrehilbert pushed a commit that referenced this pull request Nov 21, 2025
- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors

(cherry picked from commit 3062264)

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
hayotbisonai pushed a commit to hayotbisonai/elastic-agent that referenced this pull request Nov 23, 2025
- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors
swiatekm pushed a commit that referenced this pull request Nov 24, 2025
- Log as ndjson so logs can easily be parsed/ingested into
Elasticsearch
- Set the log level to debug so we can see the events
- If the test fails, log the index and search condition used
- Improve `FindESDocs` to not log expected failures/errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flaky Test]: TestKubernetesJournaldInputOtelCondition never satisfied

5 participants