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: copy cluster-override.conf from old version #10484

Merged
merged 4 commits into from Apr 24, 2023

Conversation

zhongwencool
Copy link
Member

@zhongwencool zhongwencool commented Apr 23, 2023

Fixes #10474
EMQX-9680

Previously, when we copied the initial configuration from an old node, if there was no 'has_deprecated_file' field, we treated it as a new mechanism using cluster.hocon. However, the old node never returned the has_deprecated_file' field before upgrading (due to a problem with the old code), so during rolling upgrade, it was always assumed that cluster.hocon was in effect when it should have been cluster-override.conf.

It's hard to write rolling upgrade CT test. I have verify on v5.0.21 and v5.0.23

Summary

馃 Generated by Copilot at 7af9c18

Improved cluster configuration synchronization for mixed-version nodes. Refactored emqx_conf_app.erl and bumped emqx_conf version to 0.1.18.

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

@zhongwencool zhongwencool requested a review from a team as a code owner April 23, 2023 07:45
@coveralls
Copy link
Collaborator

coveralls commented Apr 23, 2023

Pull Request Test Coverage Report for Build 4783657330

  • 3 of 4 (75.0%) changed or added relevant lines in 1 file are covered.
  • 40 unchanged lines in 13 files lost coverage.
  • Overall coverage decreased (-0.005%) to 81.188%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/emqx_conf/src/emqx_conf_app.erl 3 4 75.0%
Files with Coverage Reduction New Missed Lines %
apps/emqx/src/emqx_broker.erl 1 88.2%
apps/emqx/src/emqx_channel.erl 1 87.64%
apps/emqx/src/emqx_connection.erl 1 85.15%
apps/emqx/src/emqx_listeners.erl 1 86.81%
apps/emqx/src/emqx_logger.erl 1 80.49%
apps/emqx/src/emqx_message.erl 1 94.83%
apps/emqx/src/emqx_quic_data_stream.erl 1 75.21%
apps/emqx_resource/src/emqx_resource_manager.erl 2 88.56%
apps/emqx/src/emqx_cm.erl 2 90.99%
apps/emqx_resource/src/emqx_resource_buffer_worker.erl 3 94.42%
Totals Coverage Status
Change from base Build 4777157010: -0.005%
Covered Lines: 25691
Relevant Lines: 31644

馃挍 - Coveralls

Copy link
Member

@zmstone zmstone left a comment

Choose a reason for hiding this comment

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

Writeoff for merge without test case.
Please make sure that:

  1. The change has been tested (manually?)
  2. There is a follow up task to add test case.

@zhongwencool
Copy link
Member Author

Writeoff for merge without test case. Please make sure that:

  1. The change has been tested (manually?)
  2. There is a follow up task to add test case.

follow up task: https://emqx.atlassian.net/browse/EMQX-9690

@zhongwencool zhongwencool merged commit 22d6a2e into emqx:master Apr 24, 2023
140 checks passed
@zhongwencool zhongwencool deleted the fix-copy-conf branch April 24, 2023 09:06
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.

Upgrading to EMQX 5.0.23 from 5.0.22 appears to lose previously configured settings and break.
3 participants