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

[Bug fix]: CLI overwriting an app does not update configuration #1863

Conversation

aybruhm
Copy link
Member

@aybruhm aybruhm commented Jul 9, 2024

Description

This PR resolves the bug that overwrites an app from the CLI, which leads to the configuration not been updated.

Related Issue

Closes AGE-396

Changes

  • Set api_key to an empty string (in OSS) when it is None to avoid fern raising a NoneType error during request header serialization.
  • Removed the overwrite field from the SaveConfigPayload API model and associated arguments to eliminate redundancy and potential confusion.
  • Removed the use of the redundant payload.overwrite and replaced print statements with logger.info for better logging practices in save_config API router.
  • Ensured that variant parameters are updated accordingly during the overwrite process.
  • Removed redundant code in the serve_cli variant command in agenta-cli.

Copy link

vercel bot commented Jul 9, 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 Jul 9, 2024 2:54pm

@aybruhm aybruhm changed the title Feature/age 396 bug overwriting an app from cli is not updating the prompt [Bug fix]: CLI overwriting an app does not update configuration Jul 9, 2024
@aybruhm aybruhm requested a review from mmabrouk July 9, 2024 15:01
@aybruhm aybruhm marked this pull request as ready for review July 9, 2024 15:01
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Backend bug Something isn't working CLI labels Jul 9, 2024
Copy link
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

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

Wouldn't the right fix just modify line 43 in agenta_init.py to be
api_key: Optional[str] = ""?

I don't understand the reason for all the other changes (except 480 in variant_commands which looks like dead code, and 1784 in db_manager which fixed an edge case and the use of logger instead of print)

@aybruhm
Copy link
Member Author

aybruhm commented Jul 9, 2024

Wouldn't the right fix just modify line 43 in agenta_init.py to be api_key: Optional[str] = ""?

I don't understand the reason for all the other changes (except 480 in variant_commands which looks like dead code, and 1784 in db_manager which fixed an edge case and the use of logger instead of print)

Noted. I'll create a new PR with the right changes.

@aybruhm aybruhm closed this Jul 9, 2024
@aybruhm aybruhm deleted the feature/age-396-bug-overwriting-an-app-from-cli-is-not-updating-the-prompt branch July 9, 2024 15:42
mmabrouk added a commit that referenced this pull request Jul 9, 2024
…ng-an-app-from-cli

 [Bug fix]: CLI overwriting an app does not update configuration #1863
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend bug Something isn't working CLI size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants