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

Fixes problem where conf variable was used before initialization #16088

Merged

Commits on May 27, 2021

  1. Fixes problem where conf variable was used before initialization

    There was a problem that when we initialized configuration, we've run
    validate() which - among others - checkd if the connection is an `sqlite`
    but when the SQLAlchemy connection was not configured via variable but
    via secret manager, it has fallen back to secret_backend, which should
    be configured via conf and initialized.
    The problem is that the "conf" object is not yet created, because
    the "validate()" method has not finished yet and
    "initialize_configuration" has not yet returned.
    This led to snake eating its own tail.
    
    This PR defers the validate() method to after secret backends have
    been initialized. The effect of it is that secret backends might
    be initialized with configuration that is not valid, but there are
    no real negative consequences of this.
    
    Fixes: apache#16079
    Fixes: apache#15685
    
    starting
    potiuk committed May 27, 2021
    Copy the full SHA
    9fb9101 View commit details
    Browse the repository at this point in the history