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

Update go-concert to 0.1.0 #23770

Merged
merged 4 commits into from
Feb 15, 2021
Merged

Update go-concert to 0.1.0 #23770

merged 4 commits into from
Feb 15, 2021

Conversation

urso
Copy link

@urso urso commented Jan 30, 2021

  • Update dependency

What does this PR do?

Update go-concert to version 0.1.0 and update some code in Beats.

Why is it important?

Uhm... UPDATES \o/

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.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 30, 2021
if err != nil {
l.log.Errorf("Error while stopping filestream logFile reader: %v", err)
}
})
Copy link
Author

Choose a reason for hiding this comment

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

The group now shuts down when the readerCtx gets cancelled. This is a slight change in semantics, as the reader context was closed in the past only after the taskgroup go-routines have finished (Stop used to wait).

In order to make behavior and signal propagation a little more predictable, the change ensures that we have a clear chain of cancellation contexts:
canceler -> readerCtx -> (taskgroup ctx). Before we used to have something like:

canceler -> ctx
canceler -> (taskgroup ctx)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 30, 2021

💚 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

Expand to view the summary

Build stats

  • Build Cause: Pull request #23770 updated

  • Start Time: 2021-02-15T19:33:26.854+0000

  • Duration: 136 min 49 sec

  • Commit: 5f0b5ab

Test stats 🧪

Test Results
Failed 0
Passed 46515
Skipped 4776
Total 51291

Trends 🧪

Image of Build Times

Image of Tests

Steps errors 1

Expand to view the steps failures

metricbeat-windows-8-windows-8 - Install Go/Mage/Python 1.15.8
  • Took 0 min 7 sec . View more details on here
  • Description: .ci/scripts/install-tools.bat

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 46515
Skipped 4776
Total 51291

}
}
return nil
})
Copy link
Author

@urso urso Jan 30, 2021

Choose a reason for hiding this comment

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

Replaced the for loop with timed.Periodic. The for loop did not check the state of the context before executing the select statement. Due to select checking channels in random order the ctx.Done() can be ignored multiple times in the worst case. Switching to Periodic resolves this issue.

continue
}
connCancel()
l.doRun(ctx)
Copy link
Author

Choose a reason for hiding this comment

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

moved the body into a separate method, so we can do defer cancel() to cleanup resources. The handle is created independent of the module and we must cleanup in case the handler panics.

TODO: shall we consider to recover from a panic here or only recover if the handler failed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the package net, we probably won't see many panics from listener function. Also, how could we recover from such issues? If anything fails during that function call it requires action from the user, e.g. fixing addresses or changing the protocol. These are problems from those we cannot recover without user interference.

I would only call recover to take care of panics from handler.

Copy link
Author

Choose a reason for hiding this comment

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

I would only call recover to take care of panics from handler.

yeah, I did mean the handler. Added Recover to connectAndRun

@urso urso requested a review from kvch January 30, 2021 16:47
@andresrc andresrc added the Team:Elastic-Agent Label for the Agent team label Jan 31, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 31, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

Copy link
Contributor

@kvch kvch left a comment

Choose a reason for hiding this comment

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

Thank you! Great improvements!

@urso
Copy link
Author

urso commented Feb 5, 2021

Interesting. Test run was green, but pipeline seems to be aborted near/after the end. Maybe we hit a jenkins maintenance window.

@urso
Copy link
Author

urso commented Feb 5, 2021

/test

1 similar comment
@urso
Copy link
Author

urso commented Feb 5, 2021

/test

@urso urso merged commit 342a845 into elastic:master Feb 15, 2021
@urso urso deleted the update-go-concert-0.1.0 branch February 15, 2021 22:49
@urso urso added the v7.12.0 label Feb 15, 2021
v1v added a commit to v1v/beats that referenced this pull request Feb 16, 2021
…-arm

* upstream/master:
  [Metricbeat][Kubernetes] Extend state_node with more conditions (elastic#23905)
  [CI] googleStorageUploadExt step (elastic#24048)
  Check fields are documented for aws metricsets (elastic#23887)
  Update go-concert to 0.1.0 (elastic#23770)
  [Libbeat][New Processor] XML Decode (elastic#23678)
  Fix: bad substitution of API key (elastic#24036)
  [Filebeat] Add Pensando DFW Module (elastic#21063)
  [Filebeat] Check if processor is supported by ES version (elastic#23763)
  Syslog system tests: be more forgiving (elastic#24021)
urso pushed a commit to urso/beats that referenced this pull request Feb 17, 2021
v1v added a commit to v1v/beats that referenced this pull request Feb 17, 2021
…dows-7

* upstream/master: (332 commits)
  Use ECS v1.8.0 (elastic#24086)
  Add support for postgresql csv logs (elastic#23334)
  [Heartbeat] Refactor config system (elastic#23467)
  [CI] install docker-compose with retry (elastic#24069)
  Add nodes to filebeat-kubernetes.yaml ClusterRole - fixes elastic#24051 (elastic#24052)
  updating manifest files for filebeat threatintel module (elastic#24074)
  Add Zeek Signatures (elastic#23772)
  Update Beats to ECS 1.8.0 (elastic#23465)
  Support running Docker logging plugin on ARM64 (elastic#24034)
  Fix ec2 metricset fields.yml and add integration test (elastic#23726)
  Only build targz and zip versions of Beats if PACKAGES is set in agent (elastic#24060)
  [Filebeat] Add field definitions for known Netflow/IPFIX vendor fields (elastic#23773)
  [Elastic Agent] Enroll with Fleet Server (elastic#23865)
  [Filebeat] Convert logstash logEvent.action objects to strings (elastic#23944)
  [Ingest Management] Fix reloading of log level for services (elastic#24055)
  Add Agent standalone k8s manifest (elastic#23679)
  [Metricbeat][Kubernetes] Extend state_node with more conditions (elastic#23905)
  [CI] googleStorageUploadExt step (elastic#24048)
  Check fields are documented for aws metricsets (elastic#23887)
  Update go-concert to 0.1.0 (elastic#23770)
  ...
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 v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants