Change in Foreman React code affecting Katello manifest refresh UI?

Hi all,

We’re currently trying to fix this React-related Katello issue: Bug #28205: subscriptions page does not track manifest action progress - Katello - Foreman

So far we’ve discovered that the dispatch here is returning undefined even though we can see that action in the reducer just fine (w/ debugger). The fact that the action is defined in the reducer but not anywhere in katello/webpack/scenes/Tasks/TaskActions.js makes us think that it is a middleware-related issue. There is a similar issue here that was a middleware problem as well.

We’ve also noticed that the issue goes away when Katello 3.13 is paired with Foreman 1.23, but not when Katello 3.13 is paired with Foreman 1.24. This is leading us to believe that some change in the Foreman React code between 1.23 and nightly caused this issue to pop up.

We found this foreman change here that was a major update to the React middleware and redux-thunk. We’re thinking the issue might originate here, could we have some help deciding if this is true?

cc @MariaAga @sharvit @ezr-ondrej @John_Mitsch @jeremylenz

1 Like

Also, we noticed that if you change let middleware = [thunk, APIMiddleware]; to just let middleware = [thunk]; in foreman/webpack/assets/javascripts/react_app/redux/index.js the problem goes away.

1 Like

return action at the end of APIMiddleware in APIMiddleware.js fixes it as well. This might be the most appropriate fix; I’ll put in a PR to Foreman for it.

https://github.com/theforeman/foreman/pull/7179

Sorry for having to go through those troubles @iballou and thanks a lot for the solution!
I believe the middleware should return the result of it’s processing, not the action it processes, could you please test if that would work for you as well?

Thanks to everyone who was involve fixing this issue :+1:

1 Like