-
Notifications
You must be signed in to change notification settings - Fork 387
Missing release for removing redux-offline
#1425
Comments
cc @hmhealey / @lieut-data |
Ah, we were worried that might happen. We unfortunately never set up mattermost-redux in a way that makes it easy to ensure backwards compatibility for things like this. We have some future plans for a safer replacement for mattermost-redux that will be provided to a plugin by the web app directly, but that won't be coming for a while. While using the latest master doesn't feel great, that's probably your best bet for keeping createPost usable. Our web app referenced mattermost-redux in its package.json by a git commit instead of a published version until very recently, and many of our internally-maintained plugins do the same. In particular, our paid Incident Collaboration plugin points to the latest master, so you can trust we're not going to be making any more breaking changes to that any time soon. |
@hmhealey thanks for bringing some clarity! I understand your reasoning, tho I would've personally wished for a note somewhere on this - when I saw this repo/package, I didn't even think that it might not be intended to be used this way, and I assumed it would still be stable while being migrated into the web app. |
Funny you should mention that since it was the original vision of the package, but unfortunately, it got out of hand quickly with a huge amount of stuff being added that we couldn't ensure compatibility with. Unfortunately, the redux-offline removal was an important performance improvement, and while we were aware it could break someone, we had kind of hoped the area it affected was small enough that it wouldn't actually affect anyone. We were definitely wrong there. In the longer term, we'd like to get a better API for plugins to access Mattermost data that's easier to keep compatibility with (aka it'll be smaller, cleaner, and provided by the web app to plugins directly), but that's unfortunately not a priority at the moment. That said, I'll try to help out where I can to get things working. |
Summary
It looks like
redux-offline
was already removed from the web app, so the actions in this package relying on it don't work anymore.Environment Information
mattermost-enterprise-edition:5.35.0
5.33.1
Steps to reproduce
Create a plugin that uses the
createPost
action or any other action that depended onredux-offline
.Expected behavior
No API request to create the post is sent, and the post stays pending indefinitely on the creating client's side.
Observed behavior
The API request to create the post is sent, the post is persistet and visible for all members of the channel.
Possible fixes
If I'm not mistaken, this problem is caused by removing
redux-offline
in these PRs:and changing
mattermost-webapp
to use its own version in this PR: mattermost/mattermost-webapp#7723While I get the point of doing this, it looks like there was never a release of
mattermost-redux
that also removesredux-offline
, as it's still bundled in the latest5.33.1
release. This breaks plugins that e.g. usecreatePost
frommattermost-redux
, as the code still includes this part:As
redux-offline
was removed from the web app and doesn't look to be bundled withmattermost-redux
, themeta.offline
part is simply never executed.This could be somewhat "fixed" by releasing this change for
mattermost-redux
, however that would still mean plugins relying on these actions that are not updated would remain broken.Addendum: I can comfirm that building
mattermost-redux
from the currentmaster
of this repo and using those files instead ofnpm install
ingmattermost-redux
in a plugin successfully works around this issue - not the best idea tho, IMO.The text was updated successfully, but these errors were encountered: