Apply new URI scheme to NEO/go + some refactors and tests of URL parser
Hello Kirill,
I want to continue !3 (closed) by patching the NEO/go part of the URL parser. So this is basically about moving from
neo(s)://[credentials@]master1,master2,...,masterN/name?options
to
neo(s)://[credentials@]master1,master2,...,masterN/name?server_options#client_options
Maybe it looks as if this change wouldn't be necessary now, but due to the movement of client options to the fragment part, NEO/go currently silently ignores the client options which were given by the user, which isn't much better than raising errors for valid parameters (the state before we changed the URL scheme).
This patch is also about making the NEO/go URL parsing a bit more robust. I thought it's a good idea to add a test to the parser and also to refactor this a bit for simpler testing.
Maybe you wouldn't agree with one part of levin.zimmermann/neoppod@59d136b7: the idea to only raise warnings instead of returning an error for not yet supported client options. Generally I think we need to fix WCFS for software instances where NEO client options are specified. So if we don't raise a warning, but return an error, I think we have the options:
- filter URL in
wcfs/__init__.py
- filter URL in SlapOS
instance-wcfs.cfg.in
(drop all options)
I wouldn't like to drop the fragment part in SlapOS' instance-wcfs.cfg.in
, because I think here the URL should just be correct.
So alternatively I could start writing the patch for wcfs/__init__.py
which drops the fragment before parsing the URL to ZODB/go.
But I thought, we only need to drop the fragment part for the calculation of the mountpoint, and we don't need to drop the fragment for the URI which is parsed to Open
in order to create the ZODB client?
Best, Levin