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

1/n [vscode & server] Reload Environment when invoking the Run Step #1376

Merged
merged 1 commit into from
Feb 29, 2024

Commits on Feb 29, 2024

  1. 1/n [vscode & server] Reload Environment when invoking the Run Step

    This diff modifies the AIConfig backend server to reload the environment everytime the Run Step is invoked. This will allow api keys that are newly added to be picked up from the aiconfig server, without the need to restart the server.
    
    I validated that `load_dotenv` does not add any noticeable latency.
    ```
    import time
    import dotenv
    
    start = time.time()
    dotenv.load_dotenv()
    end = time.time()
    print(end-start)
    _____
    0.0010402202606201172s
    ```
    
    Surfaced from #1371, a restart of the server will no longer be required.
    
    Ontop of this, we can pass a .env path directly the server initialization, instead of relying on a set of lowest-common-ancestor checks
    
    Discussed offline with @saqadri
    
    ## Testplan
    
    https://github.com/lastmile-ai/aiconfig/assets/141073967/c67cbb5c-785a-40b4-9aac-6cccfaff0004
    Ankush Pala ankush@lastmileai.dev committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    868ac2f View commit details
    Browse the repository at this point in the history