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

Remove shipper #39584

Merged
merged 6 commits into from
May 17, 2024
Merged

Remove shipper #39584

merged 6 commits into from
May 17, 2024

Conversation

belimawr
Copy link
Contributor

@belimawr belimawr commented May 15, 2024

Proposed commit message

Remove all code related to the shipper because we are not using it any more.

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.

Disruptive User Impact

There is no disruptive impact because the shipper was never released, not even as alpha.

## Author's Checklist
## How to test this PR locally

Related issues

## Use cases
## Screenshots
## Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 15, 2024
Copy link
Contributor

mergify bot commented May 15, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @belimawr? 🙏.
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

@belimawr belimawr added the Team:Elastic-Agent Label for the Agent team label May 15, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 15, 2024
@belimawr belimawr marked this pull request as ready for review May 15, 2024 19:19
@belimawr belimawr requested review from a team as code owners May 15, 2024 19:19
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@ycombinator ycombinator added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label May 15, 2024
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@faec faec left a comment

Choose a reason for hiding this comment

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

Looks great except for one behavior change in the disk queue, once that's resolved I'll approve

libbeat/publisher/queue/diskqueue/segments.go Outdated Show resolved Hide resolved
@faec
Copy link
Contributor

faec commented May 17, 2024

Sorry one more thing: please also delete Batch.FreeEntries in libbeat/publisher/event.go, that was a shipper-only feature.

Copy link
Contributor

mergify bot commented May 17, 2024

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 remove-shipper upstream/remove-shipper
git merge upstream/main
git push upstream remove-shipper

This commit improves the code necessary for replacing the deprecated
`ioutil.ReadDir` call by `io.ReadDir`. A single for loop is used to
iterate over the dirEntries and if there is an error reading the
FileInfo from a DirEntry, we log it and continue to the next
dirEntry. This effectively adds more resilience to the original code
that would not process any segment if the call to `ioutil.ReadDir` had
failed.
Remove all references, usages and tests to `Batch.FreeEntries` that
was used only by the shipper.
@belimawr
Copy link
Contributor Author

Sorry one more thing: please also delete Batch.FreeEntries in libbeat/publisher/event.go, that was a shipper-only feature.

Done by b775674

Copy link
Contributor

@faec faec left a comment

Choose a reason for hiding this comment

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

Love to see code being deleted 😄 Thanks!

@belimawr belimawr merged commit cabda46 into elastic:main May 17, 2024
106 of 108 checks passed
@belimawr belimawr deleted the remove-shipper branch May 17, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team 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.

None yet

5 participants