Skip to content

fix: replace hardcoded kb_env defaults with settings.KB_ENV#14

Merged
VibhavSetlur merged 1 commit intodevelopfrom
fix/kb-env-prod
Feb 21, 2026
Merged

fix: replace hardcoded kb_env defaults with settings.KB_ENV#14
VibhavSetlur merged 1 commit intodevelopfrom
fix/kb-env-prod

Conversation

@VibhavSetlur
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces hardcoded "appdev" defaults with the centralized configuration value settings.KB_ENV throughout the codebase. This improves flexibility by allowing the default KBase environment to be configured via environment variables rather than being hardcoded.

Changes:

  • Updated function parameter defaults in workspace.py to use settings.KB_ENV instead of "appdev"
  • Updated FastAPI Query parameter defaults in routes.py to use settings.KB_ENV and enhanced examples to include both "appdev" and "prod"
  • Updated Pydantic Field default in models.py to use settings.KB_ENV and added necessary import

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
app/utils/workspace.py Updated 7 function signatures to use settings.KB_ENV as the default for kb_env parameters
app/routes.py Updated 6 FastAPI endpoint Query parameters to use settings.KB_ENV as default and improved examples; also updated getattr fallback logic
app/models.py Updated TableDataRequest model Field default to use settings.KB_ENV and added import for settings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@VibhavSetlur VibhavSetlur merged commit c4737a0 into develop Feb 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants