Skip to content

feat: add DELETE /apps endpoint#1336

Merged
wesjdj merged 24 commits into
add-apps-featurefrom
add-apps-delete
Jun 18, 2026
Merged

feat: add DELETE /apps endpoint#1336
wesjdj merged 24 commits into
add-apps-featurefrom
add-apps-delete

Conversation

@wesjdj

@wesjdj wesjdj commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

/deploy

@wesjdj wesjdj requested review from a team, SalimKayal and sgaist as code owners June 1, 2026 14:03
@wesjdj wesjdj marked this pull request as draft June 1, 2026 14:16
@RenkuBot

RenkuBot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

You can access the deployment of this PR at https://renku-ci-ds-1336.dev.renku.ch

@wesjdj wesjdj force-pushed the add-apps-delete branch from 311096b to 7b203b6 Compare June 3, 2026 11:21
@wesjdj wesjdj force-pushed the add-apps-delete branch from e2c232e to 5f0d56b Compare June 3, 2026 12:27

@olevski olevski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good Wes. I will come back to it when it is fully ready.

Comment on lines +72 to +81
async def delete_app(self, user: base_models.APIUser, app_name: str) -> None:
"""Delete an app by its name."""
if not user.is_authenticated or user.id is None:
raise errors.UnauthorizedError(message="You do not have the required permissions for this operation.")

runtime_state = await self.k8s_client.get_app_deployment(app_name)
if runtime_state is None:
logger.info(f"App with name {app_name} was not found.")
return None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You are missing the authorization check.

Suggested change
async def delete_app(self, user: base_models.APIUser, app_name: str) -> None:
"""Delete an app by its name."""
if not user.is_authenticated or user.id is None:
raise errors.UnauthorizedError(message="You do not have the required permissions for this operation.")
runtime_state = await self.k8s_client.get_app_deployment(app_name)
if runtime_state is None:
logger.info(f"App with name {app_name} was not found.")
return None
async def delete_app(self, user: base_models.APIUser, app_name: str) -> None:
"""Delete an app by its name."""
if not user.is_authenticated or user.id is None:
raise errors.UnauthorizedError(message="You do not have the required permissions for this operation.")
authorized = await self.authz.has_permission(user, ResourceType.project, launcher.project_id, Scope.WRITE)
if not authorized:
raise errors.MissingResourceError(
message=f"Project with id '{launcher.project_id}' does not exist or you do not have access to it."
)
runtime_state = await self.k8s_client.get_app_deployment(app_name)
if runtime_state is None:
logger.info(f"App with name {app_name} was not found.")
return None

@wesjdj wesjdj force-pushed the add-apps-delete branch from 5f0d56b to ea0d84d Compare June 5, 2026 12:28
Base automatically changed from add-apps-beta to add-apps-feature June 8, 2026 08:48
@wesjdj wesjdj marked this pull request as ready for review June 10, 2026 13:12
@wesjdj wesjdj merged commit 7c76bbe into add-apps-feature Jun 18, 2026
15 of 19 checks passed
@wesjdj wesjdj deleted the add-apps-delete branch June 18, 2026 09:17
@RenkuBot

Copy link
Copy Markdown
Contributor

Tearing down the temporary RenkuLab deployment for this PR.

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.

3 participants