Skip to content

Removing pkg/errors from beats repo#35896

Merged
amitkanfer merged 36 commits intomainfrom
remove_obsolete_error_package_entirely
Jun 28, 2023
Merged

Removing pkg/errors from beats repo#35896
amitkanfer merged 36 commits intomainfrom
remove_obsolete_error_package_entirely

Conversation

@amitkanfer
Copy link
Copy Markdown
Contributor

No description provided.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 23, 2023
@botelastic
Copy link
Copy Markdown

botelastic bot commented Jun 23, 2023

This pull request doesn't have a Team:<team> label.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jun 23, 2023

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

elasticmachine commented Jun 23, 2023

💚 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: 2023-06-28T12:24:38.408+0000

  • Duration: 148 min 6 sec

Test stats 🧪

Test Results
Failed 0
Passed 30537
Skipped 2207
Total 32744

💚 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!)

@amitkanfer amitkanfer marked this pull request as ready for review June 24, 2023 16:12
@amitkanfer amitkanfer requested a review from a team as a code owner June 24, 2023 16:12
Comment thread metricbeat/module/elasticsearch/elasticsearch.go Outdated
Comment thread metricbeat/module/nats/stats/data.go Outdated
Comment thread metricbeat/module/postgresql/metricset.go
eventMap[eventKey] = &mb.Event{
MetricSetFields: mapstr.M{},
Error: errors.Wrapf(val.Err.Error, "failed on query=%v", counterPath),
Error: fmt.Errorf("failed on query=%v: %w", counterPath, val.Err.Error),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread x-pack/dockerlogbeat/handlers.go Outdated
Comment thread x-pack/dockerlogbeat/magefile.go Outdated
buildStr, errBufRead := ioutil.ReadAll(buildResp.Body)
if errBufRead != nil {
return errors.Wrap(err, "error reading from docker output")
return fmt.Errorf("error reading from docker output"+": %w", errBufRead)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@cmacknz note there was a bug originally here... logged err instead of errBufRead


errReceived := runnable.Run(context.Background(), telemetry.Ignored())
assert.Equal(t, err, e.Cause(errReceived))
assert.Equal(t, "could not create a client for the function: "+err.Error(), errReceived.Error())
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

special attention to this file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If the tests still pass you're good, also this is functionbeat which is deprecated now.

@amitkanfer
Copy link
Copy Markdown
Contributor Author

/test

@amitkanfer amitkanfer closed this Jun 24, 2023
@amitkanfer amitkanfer reopened this Jun 24, 2023
Copy link
Copy Markdown
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

There are "+" string concat scars from the gofmt rewrites, suggest running find . -name '*.go' -exec gsed -i -e 's/"+": %w",/: %w",/g' '{}' \; over the changes.

Comment thread metricbeat/module/docker/network_summary/helper.go Outdated
Comment thread metricbeat/module/elasticsearch/elasticsearch.go Outdated
Comment thread metricbeat/module/nats/stats/data.go Outdated
Comment thread metricbeat/module/nats/stats/data.go Outdated
Comment thread metricbeat/module/postgresql/metricset.go
Comment thread x-pack/dockerlogbeat/handlers.go Outdated
Comment thread x-pack/metricbeat/module/enterprisesearch/stats/data.go Outdated
Comment thread x-pack/metricbeat/module/iis/test/integration.go Outdated
@amitkanfer amitkanfer requested a review from efd6 June 27, 2023 11:17
Copy link
Copy Markdown
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

Some minor nits, but otherwise LGTM.

Comment thread packetbeat/publish/publish.go Outdated
Comment thread x-pack/filebeat/input/netflow/decoder/decoder.go
Comment thread x-pack/filebeat/input/o365audit/dates.go
Comment thread x-pack/filebeat/input/o365audit/listblobs.go Outdated
Comment thread x-pack/filebeat/input/o365audit/poll/poll.go Outdated
"net/url"
"testing"

_ "github.com/denisenkom/go-mssqldb"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unrelated to the change here, but blank imports should generally be in their own stanza with a comment explaining the reason for their existence.

// For registration of "mssql" and "sqlserver" drivers.
_ "github.com/denisenkom/go-mssqldb"

It's odd that it's here given that "sql" is not being imported. Is it cruft? If it's not, maybe it should be in performance_integration_test.go which looks like it could be using it, maybe.

@amitkanfer
Copy link
Copy Markdown
Contributor Author

/test

@amitkanfer amitkanfer merged commit 2fec2d9 into main Jun 28, 2023
@amitkanfer amitkanfer deleted the remove_obsolete_error_package_entirely branch June 28, 2023 15:19
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs_team Indicates that the issue/PR needs a Team:* label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants