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: verify federation configuration before processing any events #32535

Merged
merged 59 commits into from
Aug 21, 2024

Conversation

debdutdeb
Copy link
Member

@debdutdeb debdutdeb commented Jun 1, 2024

https://rocketchat.atlassian.net/browse/CORE-479
https://rocketchat.atlassian.net/browse/CORE-518

Proposed changes (including videos or screenshots)

We need to verify homeserver <> appservice connection, which is achieved by https://spec.matrix.org/v1.10/application-service-api/#pinging

Also if rocketchat itself is ready for federation or not, using https://federationtester.matrix.org/

Issue(s)

Steps to test or reproduce

Further comments

image

Copy link
Contributor

dionisio-bot bot commented Jun 1, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Jun 1, 2024

🦋 Changeset detected

Latest commit: 72e606d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@rocket.chat/web-ui-registration Major
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Jun 1, 2024

Codecov Report

Attention: Patch coverage is 80.95238% with 20 lines in your changes missing coverage. Please review.

Project coverage is 59.43%. Comparing base (6cb79a0) to head (72e606d).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32535      +/-   ##
===========================================
- Coverage    59.44%   59.43%   -0.01%     
===========================================
  Files         2544     2546       +2     
  Lines        63239    63255      +16     
  Branches     14235    14235              
===========================================
+ Hits         37590    37594       +4     
- Misses       22930    22941      +11     
- Partials      2719     2720       +1     
Flag Coverage Δ
unit 76.02% <80.95%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@debdutdeb debdutdeb changed the title feat: test federation configuration endpoint feat: verify federation configuration button Jun 2, 2024
Copy link
Member

@MarcosSpessatto MarcosSpessatto left a comment

Choose a reason for hiding this comment

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

I know the PR is still in draft, but ideally, we should disable all the federation actions until the configuration is working properly.

packages/core-services/src/types/IFederationService.ts Outdated Show resolved Hide resolved
packages/core-services/src/types/IFederationService.ts Outdated Show resolved Hide resolved
apps/meteor/app/api/server/v1/federation.ts Outdated Show resolved Hide resolved
apps/meteor/app/api/server/v1/federation.ts Outdated Show resolved Hide resolved
apps/meteor/app/api/server/v1/federation.ts Outdated Show resolved Hide resolved
debdutdeb and others added 6 commits August 19, 2024 19:25
…s invalid or it is disabled (#32838)

* i think i covered all

* ..

* ...

* remove lines

* fix and move methods

* ee hooks

* ?

* typescript hiya thanks

* wrong params

* typescript and linter

* lint

* mock right you stupid me

* ???

* hehe

* prettier?

* don't run if fed not enabled

* fix unit tests

* rename function

* rememver to remove callback

* federation tests

* type federation utils functions' returns

* type room service methods

* rename function

* review

* change how blocks

* stupidity

* review

* no breaking changes

* review

* review

* oh conflict resolution

* types

* tests changed

* new tests

* consistent naming

* review

* ops
@debdutdeb debdutdeb marked this pull request as ready for review August 20, 2024 13:00
@debdutdeb debdutdeb requested a review from a team as a code owner August 20, 2024 13:00
@debdutdeb debdutdeb added the stat: QA assured Means it has been tested and approved by a company insider label Aug 21, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 21, 2024
@kodiakhq kodiakhq bot merged commit 2b13061 into develop Aug 21, 2024
51 checks passed
@kodiakhq kodiakhq bot deleted the federation-verify-config branch August 21, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants