Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
N neo
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Kirill Smelkov
  • neo
  • Merge requests
  • !4

Closed
Created Jun 02, 2023 by Levin Zimmermann@levin.zimmermann
  • Report abuse
Report abuse

Apply new URI scheme to NEO/go + some refactors and tests of URL parser

  • Overview 9
  • Commits 5
  • Changes 5

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:

  1. filter URL in wcfs/__init__.py
  2. 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

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: t-with-new-uri
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7