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

[libbeeat] add DropFields processor to js API #33458

Merged

Conversation

mib1185
Copy link
Contributor

@mib1185 mib1185 commented Oct 25, 2022

What does this PR do?

This will register the drop_fields processor to the JavaScript API as DropFields, so that it can be used in custom js processors like already used to do with AddFields and many more.

Should also be backported to 7.17.

Why is it important?

Checklist

  • 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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@mib1185 mib1185 requested a review from a team as a code owner October 25, 2022 15:46
@mib1185 mib1185 requested review from belimawr and leehinman and removed request for a team October 25, 2022 15:46
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 25, 2022
@mergify
Copy link
Contributor

mergify bot commented Oct 25, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @mib1185? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 25, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-12-21T06:36:00.581+0000

  • Duration: 76 min 6 sec

Test stats 🧪

Test Results
Failed 0
Passed 25131
Skipped 1954
Total 27085

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@mib1185
Copy link
Contributor Author

mib1185 commented Oct 25, 2022

If this is a bug or security fix, could you label this PR @mib1185? 🙏.

@ mergify🤖 : sorry, but I'm not allowed to add labels in this repo

@belimawr belimawr added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Nov 15, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 15, 2022
@belimawr belimawr added enhancement needs_team Indicates that the issue/PR needs a Team:* label labels Nov 15, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 15, 2022
@belimawr
Copy link
Contributor

@mib1185 would you mind updating this PR with the latest changes on main? You can use the Update branch button here on the PR or do it manually.

@mib1185 mib1185 force-pushed the feature-add-dropfields-processor-to-js-api branch 2 times, most recently from 5631961 to c13dd26 Compare November 18, 2022 16:46
@mib1185 mib1185 requested review from belimawr and removed request for leehinman November 18, 2022 16:46
@belimawr
Copy link
Contributor

@mib1185 Could you also add a changelog entry?

After that it will be good to merge.

@mib1185
Copy link
Contributor Author

mib1185 commented Nov 21, 2022

hi @belimawr
thanks for your review and comments 🙂
Can I add the backport labels, or do you have to do it yourself?

@belimawr
Copy link
Contributor

hi @belimawr thanks for your review and comments slightly_smiling_face Can I add the backport labels, or do you have to do it yourself?

My plan was to skip the backport labels, I saw this PR like an enhancement rather than a bug-fix that should be backported.

Does it make sense to you? Or what are your thoughts on that?

@mib1185
Copy link
Contributor Author

mib1185 commented Nov 22, 2022

I agree that this is not a bugfix, but on the other hand it could also be a benefit for users of the 7.17 (like myself) 🙂

@mib1185 mib1185 force-pushed the feature-add-dropfields-processor-to-js-api branch from f5c57f7 to 1dfdf37 Compare November 27, 2022 19:09
@belimawr
Copy link
Contributor

I agree that this is not a bugfix, but on the other hand it could also be a benefit for users of the 7.17 (like myself) slightly_smiling_face

I totally get that, but we can only backport bug fixes to 7.17.

That's a good opportunity for you to upgrade to the latest 8.x release ;)

I see a couple of checks are still failing, could you run:

make notice

From the root of the project and commit any changes?

@cmacknz
Copy link
Member

cmacknz commented Nov 28, 2022

From the root of the project and commit any changes?

Probably the checks will pass after merging the go.mod updates from #33789 to fix CI in beats in general.

@mib1185 mib1185 force-pushed the feature-add-dropfields-processor-to-js-api branch from 1dfdf37 to c9ee543 Compare November 28, 2022 22:10
@mib1185
Copy link
Contributor Author

mib1185 commented Nov 28, 2022

That's a good opportunity for you to upgrade to the latest 8.x release ;)

I totally understand that (and also willed to do), but I'm actually "forced" to use 7.17, because the upstream system is still based on logstash 7.17 which I do not have any chance to change it for now (not under my responsibility) 🙈

I totally get that, but we can only backport bug fixes to 7.17.

Would it be convenient for you, when we say we fix the missing JS API availablity of the drop_fields processor? 😁

I see a couple of checks are still failing, could you run:

make notice

From the root of the project and commit any changes?

will give it a try tomorrow, rebase unfortunately seems not to solve the CI issues 🙁

@belimawr
Copy link
Contributor

will give it a try tomorrow, rebase unfortunately seems not to solve the CI issues

If you don't manage to fix it, I can also give it a shot.

@belimawr
Copy link
Contributor

Would it be convenient for you, when we say we fix the missing JS API availablity of the drop_fields processor?

Nothing prevents you from running your own fork ;).

@mib1185
Copy link
Contributor Author

mib1185 commented Nov 29, 2022

will give it a try tomorrow, rebase unfortunately seems not to solve the CI issues

If you don't manage to fix it, I can also give it a shot.

Would be great if you could give it a try 🙂

@mergify
Copy link
Contributor

mergify bot commented Nov 30, 2022

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 feature-add-dropfields-processor-to-js-api upstream/feature-add-dropfields-processor-to-js-api
git merge upstream/main
git push upstream feature-add-dropfields-processor-to-js-api

@belimawr
Copy link
Contributor

Let's see if the latest changes on main helps CI to be happy

@sonarcloud
Copy link

sonarcloud bot commented Dec 21, 2022

Please retry analysis of this Pull-Request directly on SonarCloud.

@belimawr belimawr merged commit 255028c into elastic:main Dec 21, 2022
@mib1185 mib1185 deleted the feature-add-dropfields-processor-to-js-api branch December 21, 2022 12:15
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants