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

Refactor try catch in Agent Syscollector/Vuls/Stats #3462

Merged
merged 10 commits into from
Jul 16, 2021

Conversation

gabiwassan
Copy link
Contributor

Hi team,
This PR implements a new strategy to catch and store/show errors in the Agent Syscollector/Vuls/Stats sections.

Close: #3431

gabiwassan and others added 5 commits July 12, 2021 13:41
* Implement try catch groups

* Add test

* test(groups): Added simple snapshot test.

* Add changelog

* Change context

* Change title

Co-authored-by: gabiwassan <gabriel.wassan@wazuh.com>
* fix(syscollector): Fixed dispatch for updateCurrentAgentData

* fix(syscollector): Refactor for agents-sections.
Copy link
Member

@Machi3mfl Machi3mfl left a comment

Choose a reason for hiding this comment

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

LGTM!

@MauGaP MauGaP self-assigned this Jul 14, 2021
Copy link
Contributor

@pablomarga pablomarga left a comment

Choose a reason for hiding this comment

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

LGTM!

this.setState({
error: `Data could not be fetched for ${this.props.vulName}`,
});
} finally {
Copy link
Contributor

Choose a reason for hiding this comment

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

This finally statement could be removed?

@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 3.01% ( 1072 / 35568 )
Branches 1.15% ( 321 / 27945 )
Functions 1.94% ( 168 / 8642 )
Lines 3.04% ( 1035 / 33994 )

@gabiwassan gabiwassan merged commit aa7a26b into 4.3-7.10 Jul 16, 2021
@gabiwassan gabiwassan deleted the feat/trycatch-syscollector branch July 16, 2021 15:56
Machi3mfl pushed a commit that referenced this pull request Jul 19, 2021
* fix(syscollector): Added try catch strategy.

* Implement try catch strategy in Groups (#3415)

* Implement try catch groups

* Add test

* test(groups): Added simple snapshot test.

* Add changelog

* Change context

* Change title

Co-authored-by: gabiwassan <gabriel.wassan@wazuh.com>

* Create Cypress Workflow for 4.3-7.10 (#3444)

* Fixed dispatch for updateCurrentAgentData (#3453)

* fix(syscollector): Fixed dispatch for updateCurrentAgentData

* fix(syscollector): Refactor for agents-sections.

* doc(changelog): Updated

* Updating test. (#3470)

* test(unittest): Updating test.

* test(unittest): Updating test.

* test(agent-table): Added unit test & fix collectCoverage

Co-authored-by: Pablo Martínez <pablo.martinez@wazuh.com>
Co-authored-by: Matias Ezequiel Moreno <49887871+matiasmoreno876@users.noreply.github.com>
gabiwassan added a commit that referenced this pull request Aug 5, 2021
* fix(syscollector): Added try catch strategy.

* Implement try catch strategy in Groups (#3415)

* Implement try catch groups

* Add test

* test(groups): Added simple snapshot test.

* Add changelog

* Change context

* Change title

Co-authored-by: gabiwassan <gabriel.wassan@wazuh.com>

* Create Cypress Workflow for 4.3-7.10 (#3444)

* Fixed dispatch for updateCurrentAgentData (#3453)

* fix(syscollector): Fixed dispatch for updateCurrentAgentData

* fix(syscollector): Refactor for agents-sections.

* doc(changelog): Updated

* Updating test. (#3470)

* test(unittest): Updating test.

* test(unittest): Updating test.

* test(agent-table): Added unit test & fix collectCoverage

Co-authored-by: Pablo Martínez <pablo.martinez@wazuh.com>
Co-authored-by: Matias Ezequiel Moreno <49887871+matiasmoreno876@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants