Skip to content
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

[e2e] Add tests for agent.monitoring to otel format #6801

Open
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

khushijain21
Copy link
Contributor

@khushijain21 khushijain21 commented Feb 11, 2025

What does this PR do?

It adds tests for comparing docs ingested by agent.monitoring vs otel.yml

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

How to test this PR locally

Related issues

@khushijain21 khushijain21 requested a review from a team as a code owner February 11, 2025 07:54
@khushijain21 khushijain21 marked this pull request as draft February 11, 2025 07:54
Copy link
Contributor

mergify bot commented Feb 11, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b monitoringdocs upstream/monitoringdocs
git merge upstream/main
git push upstream monitoringdocs

Copy link
Contributor

mergify bot commented Feb 11, 2025

This pull request does not have a backport label. Could you fix it @khushijain21? 🙏
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.

@khushijain21 khushijain21 force-pushed the monitoringdocs branch 3 times, most recently from c45b743 to cdda948 Compare February 14, 2025 06:28
@pierrehilbert pierrehilbert added skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Feb 14, 2025
@khushijain21
Copy link
Contributor Author

khushijain21 commented Feb 17, 2025

Waiting on #6837 for this PR to be ready

pazone and others added 10 commits February 19, 2025 12:42
From the looks of it, none of the update steps interact with each other, so
I don't see a reason to run them serially.

As an example, making a single line change in the otel components file results
in the following timings:

	parallel mage update  9.19s user 1.92s system 366% cpu 3.027 total
	serial mage update  20.20s user 2.93s system 181% cpu 12.748 total
…lastic#6532)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.1 to 6.2.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v6.1.1...v6.2.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lastic#6604)

Bumps [updatecli/updatecli-action](https://github.com/updatecli/updatecli-action) from 2.75.0 to 2.77.0.
- [Release notes](https://github.com/updatecli/updatecli-action/releases)
- [Commits](updatecli/updatecli-action@4aca518...79983ec)

---
updated-dependencies:
- dependency-name: updatecli/updatecli-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add statePersistence value to helm chart presets
* dos2unix NOTICE.txt

* add dos2unix step to notice generator
@khushijain21 khushijain21 marked this pull request as ready for review February 19, 2025 08:56
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@michel-laterman michel-laterman left a comment

Choose a reason for hiding this comment

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

I have nitpicks regarding the test, the test is also failing,

I think you're missing some ignore fields, for example the buildkite output shows differences with the cloud.instance.id and name (among other fields):

+- 	"cloud.instance.id":       string("6692864320899608549"),
--
  | ++ 	"cloud.instance.id":       string("5902608334348578789"),
  | +  	"cloud.instance.name": strings.Join({
  | +  		"bk-agent-prod-gcp-1740034313",
  | +- 		"605048021",
  | ++ 		"705811855",
  | +  	}, ""),

var otelDocs estools.Documents
require.Eventually(t,
func() bool {
findCtx, findCancel := context.WithTimeout(context.Background(), 10*time.Second)
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
findCtx, findCancel := context.WithTimeout(context.Background(), 10*time.Second)
findCtx, findCancel := context.WithTimeout(ctx, 10*time.Second)

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

10 participants