Skip to content

Improve federation support #69

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

Merged
merged 8 commits into from
Apr 11, 2025
Merged

Improve federation support #69

merged 8 commits into from
Apr 11, 2025

Conversation

christophfriedrich
Copy link
Collaborator

This adds id fields to the objects in the array returned by listFederation in Capabilities, so that the backend details can be linked to what's in federation:backends and federation:missing, which are just lists of IDs.

Also, it fixes that listFederation used to always return the empty array, as it expected federation to be an array, while it's actually always an object.

If coming from a spec-compliant backend, `this.data.federation` is an object, so the function used to always return the empty array. The code now transforms the object into an array, and also adds the former object keys to each item as an `id` property.
Thanks automatic tests
@christophfriedrich
Copy link
Collaborator Author

@m-mohr Please check the additional commits I just added and then I think we could put a new version number and merge this? Or should we wait in case more changes become necessary while working on more stuff in the depending repos?

@m-mohr
Copy link
Member

m-mohr commented Apr 11, 2025

I think we can merge this after resolving the comments, but should continue working on the other cases, e.g. jobs, services before we release.

@christophfriedrich
Copy link
Collaborator Author

Okay, implemented your last recent comment. I didn't address the "couldn't find backendId" case in the JSDoc for lack of a good description plus not finding it too relevant anyway; if you happen to come up with a good text let me know.

@m-mohr m-mohr merged commit 45f5a6c into master Apr 11, 2025
4 of 6 checks passed
@m-mohr m-mohr deleted the improve-federation-support branch April 11, 2025 20:59
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.

Inconsistent documentation Linking federation backend IDs to the full details of the backend
2 participants