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

feat(cluster): supports inviting nodes to join the cluster in an asynchronous manner #12267

Merged
merged 9 commits into from Jan 16, 2024

Conversation

HJianBo
Copy link
Member

@HJianBo HJianBo commented Jan 8, 2024

Fixes https://emqx.atlassian.net/browse/EMQX-11690

Release version: v/e5.5.0

Summary

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
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • 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

@HJianBo HJianBo marked this pull request as ready for review January 8, 2024 06:04
@HJianBo HJianBo requested review from lafirest and a team as code owners January 8, 2024 06:04
@HJianBo HJianBo force-pushed the new-timeout-param-for-invite branch 2 times, most recently from 4879e83 to fe38629 Compare January 12, 2024 08:41
@HJianBo HJianBo changed the title feat(cluster): expose the timeout parameter to invite node feat(cluster): supports inviting nodes to join the cluster in an asynchronous manner Jan 12, 2024
@HJianBo HJianBo force-pushed the new-timeout-param-for-invite branch from c0e5d66 to c9b9662 Compare January 12, 2024 08:56
invite_node(put, #{bindings := #{node := Node0}, body := Body}) ->
Node = ekka_node:parse_name(binary_to_list(Node0)),
case maps:get(<<"timeout">>, Body, ?DEFAULT_INVITE_TIMEOUT) of
T when not is_integer(T) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: could that be verified with schema?

Copy link
Member Author

Choose a reason for hiding this comment

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

In theory, it really should. But for the moment, I haven't found a suitable example to check the format of a field request via schema. 😭

savonarola
savonarola previously approved these changes Jan 12, 2024
@HJianBo HJianBo force-pushed the new-timeout-param-for-invite branch from cfc3065 to 4b3ecff Compare January 13, 2024 07:33
@HJianBo HJianBo requested a review from Rory-Z as a code owner January 13, 2024 07:33
@HJianBo HJianBo changed the base branch from master to release-55 January 13, 2024 07:34
Comment on lines +47 to 50
"/cluster/invitation",
"/cluster/:node/invite",
"/cluster/:node/invite_async",
"/cluster/:node/force_leave"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should add async option to invite instead of introduce a new api ?

zmstone
zmstone previously approved these changes Jan 15, 2024
rel/i18n/emqx_mgmt_api_cluster.hocon Outdated Show resolved Hide resolved
rel/i18n/emqx_mgmt_api_cluster.hocon Outdated Show resolved Hide resolved
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
@qzhuyan
Copy link
Contributor

qzhuyan commented Jan 15, 2024

Fixes #12267

could you double check the ticket/issue? it refers to this PR?

@HJianBo HJianBo merged commit b6d0365 into emqx:release-55 Jan 16, 2024
165 checks passed
@HJianBo HJianBo deleted the new-timeout-param-for-invite branch January 16, 2024 02:11
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