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

Refactor providers.Schemas and add a global schema cache #33482

Merged
merged 12 commits into from
Jul 6, 2023

Commits on Jul 6, 2023

  1. Configuration menu
    Copy the full SHA
    d199d42 View commit details
    Browse the repository at this point in the history
  2. Add basic global schema cache

    Add a single global schema cache for providers. This allows multiple
    provider instances to share a single copy of the schema, and prevents
    loading the schema multiple times for a given provider type during a
    single command.
    
    This does not currently work with some provider releases, which are
    using GetProviderSchema to trigger certain initializations. A new server
    capability will be introduced to trigger reloading their schemas, but
    not store duplicate results.
    jbardin committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    53901a7 View commit details
    Browse the repository at this point in the history
  3. use the same struct for all schema access

    Unify the struct used for Schemes and GetProviderSchemaResponse so that
    we can have a single cache which handles all schema access.
    jbardin committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    9d97465 View commit details
    Browse the repository at this point in the history
  4. update providers.Schemas type

    Use the global providers.SchemaCache and update all schema access to the
    providers.Schemas, except where the provider.GetProviderSchemaResponse
    type name would be expected.
    
    Some tests that reuse provider factories needed a little more careful
    handling. Change the fixed func to only reset the provider on the first
    call.
    jbardin committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    ec3a38e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d487ce2 View commit details
    Browse the repository at this point in the history
  6. update schemas type

    jbardin committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    4e8dd58 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    36d3413 View commit details
    Browse the repository at this point in the history
  8. s/Schemas/ProviderSchema/

    jbardin committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    cf5ebaf View commit details
    Browse the repository at this point in the history
  9. disable cache for now

    jbardin committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    68d86e8 View commit details
    Browse the repository at this point in the history
  10. remove fixed FIXME

    jbardin committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    b9d8d99 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    76332db View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a77baa8 View commit details
    Browse the repository at this point in the history