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]: Resolve race condition => Base deployment issue #909

Merged
merged 6 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agenta-backend/agenta_backend/routers/app_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async def add_variant_from_image(
status_code=500,
detail="Image should have a tag starting with the registry name (agenta-server)",
)
elif deployment_manager.validate_image(image) is False:
elif await deployment_manager.validate_image(image) is False:
raise HTTPException(status_code=404, detail="Image not found")

try:
Expand Down
7 changes: 2 additions & 5 deletions agenta-backend/agenta_backend/services/db_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,9 +1153,6 @@ async def update_variant_parameters(
try:
logging.debug("Updating variant parameters")

# Update AppVariantDB parameters
app_variant_db.parameters = parameters

# Update associated ConfigDB parameters and versioning
config_db = app_variant_db.config
new_version = config_db.current_version + 1
Expand All @@ -1168,9 +1165,9 @@ async def update_variant_parameters(
)
config_db.current_version = new_version
config_db.parameters = parameters
# Save updated ConfigDB and AppVariantDB

# Save updated ConfigDB
await engine.save(config_db)
await engine.save(app_variant_db)

except Exception as e:
logging.error(f"Issue updating variant parameters: {e}")
Expand Down
Loading