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

Apps running in agenta have AGENTA_RUNTIME=true #2378

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

mmabrouk
Copy link
Member

  • Added a new environment variable when the app is started AGENTA_RUNTIME
  • This allows users to use fetch the configuration from the backend when the app is running locally and from the route when it's running in agenta cloud
    if os.getenv("AGENTA_RUNTIME", "false") == "true":
        config = ag.ConfigManager.get_from_route(Config)
    else:
        config = ag.ConfigManager.get_from_registry(
            app_slug="my-app", environment_slug="production"
        )

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 16, 2024
Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agenta ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 0:19am
agenta-documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 0:19am

Copy link
Member

@aybruhm aybruhm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 16, 2024
@mmabrouk mmabrouk merged commit d5f1073 into dev Dec 18, 2024
8 checks passed
@mmabrouk mmabrouk deleted the feat/agenta-runtime-var branch December 18, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants