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

fix: Config API can't get the default values from raw config #9392

Merged
merged 2 commits into from Nov 20, 2022

Conversation

zhongwencool
Copy link
Member

Fixes 9210

If we define mqtt in emqx.conf as:

mqtt {
  max_qos_allowed = 1 
}

then GET /configs/global_zones will return ...mqtt {max_qos_allowed: 1}..., the mqtt's other field is missing.

This PR tries to get the disappearing defaults back.

mqtt {
  await_rel_timeout = "300s"
  exclusive_subscription = false
  idle_timeout = "15s"
  ignore_loop_deliver = false
  keepalive_backoff = 0.75
  max_awaiting_rel = 100
  max_clientid_len = 65535
  max_inflight = 32
  max_mqueue_len = 2000
  max_packet_size = "11MB"
  max_qos_allowed = 1
  max_subscriptions = "infinity"
  max_topic_alias = 65535
  max_topic_levels = 65535
  mqueue_default_priority = "lowest"
  mqueue_priorities = "disabled"
  "mqueue_store_qos0" = true
  peer_cert_as_clientid = "disabled"
  peer_cert_as_username = "disabled"
  response_information = ""
  retain_available = true
  retry_interval = "30s"
  server_keepalive = "disabled"
  session_expiry_interval = "2h"
  shared_subscription = true
  strict_mode = false
  upgrade_qos = false
  use_username_as_clientid = false
  wildcard_subscription = true
}

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/ dir
  • In case of non-backward compatible changes, reviewer should check this item as a write-off, and add details in Backward Compatibility section

Backward Compatibility

More information

@zhongwencool zhongwencool marked this pull request as ready for review November 18, 2022 07:26
@zhongwencool zhongwencool changed the title fix: can't get default raw config fix: Config API can't get the default values from raw config Nov 18, 2022
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 3494987645

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 37 unchanged lines in 9 files lost coverage.
  • Overall coverage decreased (-0.04%) to 77.966%

Files with Coverage Reduction New Missed Lines %
apps/emqx/src/emqx_config.erl 1 84.83%
apps/emqx/src/emqx_channel.erl 1 87.37%
apps/emqx_conf/src/emqx_conf_schema.erl 1 92.31%
apps/emqx/src/emqx_cm.erl 2 90.37%
apps/emqx/src/emqx_flapping.erl 3 80.85%
apps/emqx_gateway/src/emqx_gateway_cm.erl 3 73.45%
apps/emqx/src/emqx_broker.erl 4 82.97%
apps/emqx_management/src/emqx_mgmt_cli.erl 5 27.43%
apps/emqx/src/emqx_reason_codes.erl 17 86.76%
Totals Coverage Status
Change from base Build 3494892781: -0.04%
Covered Lines: 20888
Relevant Lines: 26791

💛 - Coveralls

@zhongwencool zhongwencool merged commit 8355d7a into emqx:master Nov 20, 2022
@zhongwencool zhongwencool deleted the fix-config-raw-default branch November 20, 2022 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants