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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(emqx_management): Ignore results from the nodes that are down #10369

Merged
merged 3 commits into from Apr 18, 2023

Conversation

ieQu1
Copy link
Member

@ieQu1 ieQu1 commented Apr 11, 2023

Fixes EMQX-9531

Summary

馃 Generated by Copilot at 07ecfd5

Improve error handling of get_stats/1 in emqx_mgmt_api_stats.erl. Filter out nodes that return errors. Add emqx:running_nodes() API to avoid calling mria from EMQX code directly.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Changed lines covered in coverage report
  • Change log has been added to changes/{ce,ee}/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow up
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

@sstrigler
Copy link
Contributor

If I鈥檓 not confusing things, there was a related, recent incident with improperly formatted error messages due to a mix of string and binaries (my assumption), maybe you could fix this as well?

@ieQu1 ieQu1 force-pushed the fix-stats-api branch 2 times, most recently from 224889a to fbfbdc7 Compare April 12, 2023 10:53
@ieQu1 ieQu1 marked this pull request as ready for review April 12, 2023 16:21
@ieQu1 ieQu1 requested review from a team, JimMoen, lafirest and sstrigler as code owners April 12, 2023 16:21
thalesmg
thalesmg previously approved these changes Apr 13, 2023
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 4730265706

  • 39 of 39 (100.0%) changed or added relevant lines in 9 files are covered.
  • 56 unchanged lines in 21 files lost coverage.
  • Overall coverage decreased (-0.07%) to 81.197%

Files with Coverage Reduction New Missed Lines %
apps/emqx_authn/src/enhanced_authn/emqx_enhanced_authn_scram_mnesia.erl 1 86.57%
apps/emqx_bridge/src/emqx_bridge.erl 1 91.27%
apps/emqx_dashboard/src/emqx_dashboard_monitor.erl 1 65.28%
apps/emqx_modules/src/emqx_delayed.erl 1 94.78%
apps/emqx_rule_engine/src/emqx_rule_engine.erl 1 86.23%
apps/emqx/src/emqx_broker.erl 1 87.64%
apps/emqx/src/emqx_schema.erl 1 88.89%
apps/emqx/src/emqx_session.erl 1 87.65%
apps/emqx/src/emqx_stats.erl 1 91.67%
apps/emqx/src/proto/emqx_proto_v2.erl 1 0%
Totals Coverage Status
Change from base Build 4728296228: -0.07%
Covered Lines: 25594
Relevant Lines: 31521

馃挍 - Coveralls

@ieQu1 ieQu1 merged commit c0d8e9c into emqx:master Apr 18, 2023
110 of 111 checks passed
@ieQu1 ieQu1 deleted the fix-stats-api branch April 18, 2023 10:37
@yanzhiemq
Copy link
Collaborator

@ieQu1 It seems EMQX-9531 has nothing to do with this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants