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

Configured endpoint URL resolution #2973

Merged
merged 9 commits into from
Jul 5, 2023
Merged

Commits on Jul 5, 2023

  1. Fix bug with config value store deep copy

    When deep copying the config value store, override values were not
    preserved.
    kdaily committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    666b15b View commit details
    Browse the repository at this point in the history
  2. Shallow copy config value store and providers

    Instead of deep copying, use a shallow copy of the config value store
    when using it for creating a new client from a session. Only use a deep
    copy for updating the section provider.
    
    Update behavior of the smart defaults update functions to use a copy
    of the existing config providers in all cases. Update the logic for
    determining which new provider to create.
    
    Move unit tests for config provider smart defaults to functional tests
    and rework them to better test behavior. A mocked defaults data file is
    used to confirm that the correct values are loaded to protect against
    changes to the live data file.
    kdaily committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    bb1165f View commit details
    Browse the repository at this point in the history
  3. Implement configured endpoint URL resolution

    Adds a config provider to resolve the endpoint URL provided in an
    environment variable or shared configuration file. It resolves the
    endpoint in the following manner:
    
    1. The value provided through the `endpoint_url` parameter provided to
       the client constructor.
    2. The value provided by a service-specific environment variable.
    3. The value provided by the global endpoint environment variable
       (`AWS_ENDPOINT_URL`).
    4. The value provided by a service-specific parameter from a services
       definition section in the shared configuration file.
    5. The value provided by the global parameter from a services definition
       section in the shared configuration file.
    6. The value resolved when no configured endpoint URL is provided.
    
    The endpoint config provider uses the client name (name used to
    instantiate a client object) for construction and add to the config
    value store. This uses multiple lookups to handle service name changes
    for backwards compatibility.
    kdaily committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    fc26db6 View commit details
    Browse the repository at this point in the history
  4. Add functional tests for configured endpoint url resolution

    The tests use a data file to load tests that enumerate the ways that the
    endpoint URL can be defined and asserts that the correct endpoint is
    used in a request and that it is ignored correctly if the appropriate
    shared config file property or environment variable is supplied.
    
    They also assert that the correct config section name and environment
    variable name are used to configure and override the endpoint URL for
    every AWS service.
    kdaily committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    67506d8 View commit details
    Browse the repository at this point in the history
  5. Add debug log when ignoring configured endpoint

    Add a debug statement when specifically ignoring the configured
    endpoint URL from the shared configuration file or an environment
    variable. This will not be logged if the endpoint URL is set through
    the client constructor.
    kdaily committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    6e7d10d View commit details
    Browse the repository at this point in the history
  6. Set transformed service ID at init

    Simplify docstring and fix typos.
    kdaily committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    5661df7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5668135 View commit details
    Browse the repository at this point in the history
  8. Add client config ignore endpoint tests

    Add tests to check that setting the client creation parameter to ignore
    the configured endpoint URLs is respected.
    kdaily committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    bfd017c View commit details
    Browse the repository at this point in the history
  9. Fix test for memory issues on Windows GH Actions

    GitHub Actions was consistently failing on Windows instances with this
    test. Likely cause was loading the large model files into memory, which
    persisted until testing was completed. Since the rest of the model is
    not needed, only return the service name and ID.
    kdaily committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    2fa2224 View commit details
    Browse the repository at this point in the history