Skip to content
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

Use a separate orchestrator for each namespace #855

Merged
merged 38 commits into from
Jun 14, 2022

Commits on Jun 3, 2022

  1. Reorganize ns manager and orchestrator

    Update namespace manager to contain an orchestrator per namespace.
    
    Now, namespace manager will validate & get all plugins, validate all
    namespaces defined in configuration, and instantiate
    an orchestrator for each namespace.
    
    Orchestrator now receives the defined plugins for that orchestrator's
    namespace and instantiates the managers.
    
    This is a first pass - some items are still broken and need further
    work.
    
    Signed-off-by: Alex Shorsher <alex.shorsher@kaleido.io>
    shorsher authored and awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    d616fa8 View commit details
    Browse the repository at this point in the history
  2. Instantiate Namespace Manager as the root object

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    056e8b1 View commit details
    Browse the repository at this point in the history
  3. Remove global routes

    Some of these may come back in a different form, but they need to be
    removed for the moment because they exist outside of the namespaced
    orchestrators.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    494e897 View commit details
    Browse the repository at this point in the history
  4. Fix up orchestrator tests

    Temporarily disable many of the tests that are no longer relevant.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    fceb2ee View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    30bc9e6 View commit details
    Browse the repository at this point in the history
  6. Resolve circular dependencies in new tree

    Most of the orchestrator and namespace manager tests are disabled, but
    the rest of the tests now pass.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    3a15d6c View commit details
    Browse the repository at this point in the history
  7. Fix startup issues

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    a843638 View commit details
    Browse the repository at this point in the history
  8. Bring back /pins route

    Move this out of /status (since it's just a collection query), and put
    it under namespaces like most of the other routes.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    5aaccaa View commit details
    Browse the repository at this point in the history
  9. Add mutex around prometheus singletons

    Avoid setting these twice.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    865b919 View commit details
    Browse the repository at this point in the history
  10. Add back /status/batchmanager route

    Now under /namespaces.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    2678910 View commit details
    Browse the repository at this point in the history
  11. Bring back /websockets route

    Remove the "/status" prefix, since this is a global route and no longer
    grouped with the other "status" routes.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    6c01acb View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Group orchestrator config into a struct

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    9635e2b View commit details
    Browse the repository at this point in the history
  2. Complete orchestrator unit tests

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    cd6c5dd View commit details
    Browse the repository at this point in the history
  3. Complete namespace manager tests

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    0f3facb View commit details
    Browse the repository at this point in the history
  4. Implement GetNamespaces on namespace manager

    Returns very basic information about all available namespaces. Note that
    there is no "GetNamespaces" query on orchestrator or the database layer now,
    as these details may be spread across multiple databases.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    ccc87cb View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2022

  1. Organize plugins onto child structs

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    4cd08bb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0f24541 View commit details
    Browse the repository at this point in the history
  3. Fix SPI routes to use proper namespaces

    Only the "get many" route for operations is broken now.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    a07bd87 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2022

  1. Initialize ff_system for legacy networks

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    45881b5 View commit details
    Browse the repository at this point in the history
  2. Factor out base PluginConfig struct

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    e6dcaff View commit details
    Browse the repository at this point in the history
  3. Split out plugin RegisterListener from Init

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    161b6ef View commit details
    Browse the repository at this point in the history
  4. Move plugin init to namespace manager

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    9f6be18 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Add separate plugin types in namespace manager

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    15ddcd5 View commit details
    Browse the repository at this point in the history
  2. Blockchain plugin can track multiple listeners

    Each listener will ignore events outside its namespace.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    de9ad86 View commit details
    Browse the repository at this point in the history
  3. Data Exchange plugin can track multiple listeners

    Each listener will ignore events outside its namespace.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    492193a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    382cb3e View commit details
    Browse the repository at this point in the history
  5. Database plugin can track multiple listeners

    Each listener will ignore events outside its namespace.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    588c8f8 View commit details
    Browse the repository at this point in the history
  6. Tokens plugin can track multiple listeners

    Each listener will ignore events outside its namespace.
    
    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    dc11215 View commit details
    Browse the repository at this point in the history
  7. Tweak namespace parsing from dx

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    e19f2a4 View commit details
    Browse the repository at this point in the history
  8. Add remaining test coverage

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    6e9cce6 View commit details
    Browse the repository at this point in the history
  9. Remove unneeded "name" field

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    7aed6c7 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2022

  1. Configuration menu
    Copy the full SHA
    f684b6a View commit details
    Browse the repository at this point in the history
  2. Always include namespace when querying pins

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    82467b4 View commit details
    Browse the repository at this point in the history
  3. Fix for pin filter

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    dd4adf9 View commit details
    Browse the repository at this point in the history
  4. Return empty list for identity plugins

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    f7559c9 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. Use "different namespace" instead of "wrong namespace" in log

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    140567d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6091326 View commit details
    Browse the repository at this point in the history
  3. Replace "/spi/v1/operations" with "/spi/v1/namespaces/{ns}/operations"

    Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
    awrichar committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    f96daef View commit details
    Browse the repository at this point in the history