-
Notifications
You must be signed in to change notification settings - Fork 713
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
Ensure peer import and sync tasks for data and content work with servers using a prefix path #9533
Ensure peer import and sync tasks for data and content work with servers using a prefix path #9533
Conversation
@rtibbles I also tried importing a facility from a prefixed server to another prefixed server but it says that there's no such user when I enter the admin credentials so I'm guessing this is not a valid scenario: Logs and DB: |
Hrm, I can't think why anything I have done would cause the first issue. I assume this is not extant in release-v0.15.x? The prefix to prefix issue should be valid - I am pretty sure I know why this is happening too, can fix up. |
Indeed I just checked the official 0.15.4 build and have filed a separate issue for that: #9544 |
@pcenov - this should now be updated to properly work when both servers are prefixed. |
@rtibbles I confirm that now the import is working with both servers prefixed but it's no longer working when both are not prefixed and also when I attempt to import a facility from a prefixed server to an unprefixed one. |
Goddammit! |
Thanks @pcenov - I have now tested locally with the 2x2 matrix of (prefix, not-prefixed) with (prefix, not-prefixed) - and all scenarios do now seem to be working. But I'd very much appreciate confirmation! |
@rtibbles - I also tested all possible combinations plus regression tested the normal unprefixed workflows and everything is functioning correctly now. |
Ahah! Thanks @pcenov looks like there's one more code path I need to fix. |
To try to definitively resolve this, I have grepped the codebase for all instances of Would be good to validate full single user import and then automatic syncing flow. |
Double checked and tested today again the Android learn-only device setup from both prefixed/unprefixed server, resource import and syncing - everything is working correctly now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To the great disappointment of @pcenov he did not manage to find any other issues here! 😂 😈
Ready to merge!!! 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is thought to be backward compatible, it's not working correctly when the unprefixed server is runinng 0.15.3. If that's not the goal, it's all right: servers running this code work fine both uprefixed or prefixed.
There are no regressions either: when unprefixed it works correctly with previous versions of kolibri.
If this means that a server running 0.15.3 cannot import from a prefixed server (even if it's running this) then that is expected behaviour. If this means that a server running this version cannot import from an unprefixed 0.15.3, that's an issue. Which is it? |
the first, a server running 0.15.3 can not import from a prefixed server. The second option worked perfectly |
OK, good - this is the behaviour that this PR is fixing! So it seems this is working as intended. |
Summary
References
Fixes #9455
Reviewer guidance
Deployment
URL_PATH_PREFIX
option set in options.ini or with the env varKOLIBRI_PATH_URL_PREFIX
to so something other than/
.For regression testing, worth testing these scenarios without any prefixing to ensure everything is working.
I have done manual testing of the three scenarios above, and ensured that resource import still functions for unprefixed servers.
One caveat is that our zeroconf info does not update well when a server changes its baseurl - not sure if there's something that can be done about that?
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)