Skip to content

Commit

Permalink
Merge branch 'dev' into feature/age-1495-testing-backend-api-checkpoi…
Browse files Browse the repository at this point in the history
…nt-1
  • Loading branch information
aybruhm committed Jan 7, 2025
2 parents c1e14bd + 65bf10b commit 15f737e
Show file tree
Hide file tree
Showing 36 changed files with 1,962 additions and 5 deletions.
1 change: 1 addition & 0 deletions agenta-backend/agenta_backend/models/api/api_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class AppVariantResponse(BaseModel):


class AppVariantRevision(BaseModel):
id: Optional[str] = None
revision: int
modified_by: str
config: ConfigDB
Expand Down
2 changes: 2 additions & 0 deletions agenta-backend/agenta_backend/models/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ async def app_variant_db_revisions_to_output(
for app_variant_revision_db in app_variant_revisions_db:
app_variant_revisions.append(
AppVariantRevision(
id=str(app_variant_revision_db.id) or None,
revision=app_variant_revision_db.revision,
modified_by=app_variant_revision_db.modified_by.username,
config={
Expand All @@ -334,6 +335,7 @@ async def app_variant_db_revision_to_output(
app_variant_revision_db: AppVariantRevisionsDB,
) -> AppVariantRevision:
return AppVariantRevision(
id=str(app_variant_revision_db.id) or None,
revision=app_variant_revision_db.revision,
modified_by=app_variant_revision_db.modified_by.username,
config=ConfigDB(
Expand Down
7 changes: 5 additions & 2 deletions agenta-backend/agenta_backend/routers/app_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,13 @@ async def create_app(
"""
try:
if isCloudEE():
api_key_from_headers = request.headers.get("Authorization")
api_key_from_headers = request.headers.get("Authorization", None)
if api_key_from_headers is not None:
api_key = api_key_from_headers.split(" ")[
-1
] # ["ApiKey", "xxxxx.xxxxxx"]
await check_apikey_action_access(
api_key_from_headers,
api_key,
request.state.user_id,
Permission.CREATE_APPLICATION,
)
Expand Down
5 changes: 5 additions & 0 deletions agenta-cli/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# rename [environ] to the environment you're working/testing on
# for local, rename it to local --- .env.local
_SECRET_KEY=xxxxxxx
AWS_PROFILE_NAME=xxxxxxxxxx
AGENTA_AUTH_KEY_SECRET_ARN=xxxxxxxxxxxxx
233 changes: 230 additions & 3 deletions agenta-cli/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions agenta-cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ setuptools = "^71.1.0"

[tool.poetry.group.dev.dependencies]
pytest-asyncio = "^0.24.0"
mypy = "^1.13.0"
pytest-xdist = "^3.6.1"
uvicorn = "^0.34.0"
requests = "^2.32.3"
pexpect = "^4.9.0"
boto3 = "^1.35.87"

[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
Expand Down
Empty file added agenta-cli/tests/__init__.py
Empty file.
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit 15f737e

Please sign in to comment.