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

Delete namespace #4684

Merged
merged 10 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
18 changes: 18 additions & 0 deletions api/server/handlers/project/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@
continue
}

if cluster.CloudProvider == "Hosted" {
req := connect.NewRequest(&porterv1.DeletePorterCloudClusterRequest{

Check failure on line 55 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Go Linter

undefined: porterv1.DeletePorterCloudClusterRequest

Check failure on line 55 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Go Linter

undefined: porterv1.DeletePorterCloudClusterRequest

Check failure on line 55 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Go Linter

undefined: porterv1.DeletePorterCloudClusterRequest

Check failure on line 55 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Go Linter

undefined: porterv1.DeletePorterCloudClusterRequest

Check failure on line 55 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Running Go Tests (ubuntu-latest, api)

undefined: porterv1.DeletePorterCloudClusterRequest

Check failure on line 55 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Running Go Tests (ubuntu-latest, cmd)

undefined: porterv1.DeletePorterCloudClusterRequest
ClusterId: int64(cluster.ID),
ProjectId: int64(cluster.ProjectID),
})

_, err = p.Config().ClusterControlPlaneClient.DeletePorterCloudCluster(ctx, req)

Check failure on line 60 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Go Linter

p.Config().ClusterControlPlaneClient.DeletePorterCloudCluster undefined (type porterv1connect.ClusterControlPlaneServiceClient has no field or method DeletePorterCloudCluster) (typecheck)

Check failure on line 60 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Go Linter

p.Config().ClusterControlPlaneClient.DeletePorterCloudCluster undefined (type porterv1connect.ClusterControlPlaneServiceClient has no field or method DeletePorterCloudCluster)) (typecheck)

Check failure on line 60 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Go Linter

p.Config().ClusterControlPlaneClient.DeletePorterCloudCluster undefined (type porterv1connect.ClusterControlPlaneServiceClient has no field or method DeletePorterCloudCluster)) (typecheck)

Check failure on line 60 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Running Go Tests (ubuntu-latest, api)

p.Config().ClusterControlPlaneClient.DeletePorterCloudCluster undefined (type porterv1connect.ClusterControlPlaneServiceClient has no field or method DeletePorterCloudCluster)

Check failure on line 60 in api/server/handlers/project/delete.go

View workflow job for this annotation

GitHub Actions / Running Go Tests (ubuntu-latest, cmd)

p.Config().ClusterControlPlaneClient.DeletePorterCloudCluster undefined (type porterv1connect.ClusterControlPlaneServiceClient has no field or method DeletePorterCloudCluster)
if err != nil {
e := "error deleting cluster"
sunguroku marked this conversation as resolved.
Show resolved Hide resolved
err = telemetry.Error(ctx, span, err, e)
p.HandleAPIError(w, r, apierrors.NewErrPassThroughToClient(err, http.StatusInternalServerError))
return
}

// technically multiple clusters shouldn't exist in a porter cloud project.
continue
}

contractRevision, err := p.Config().Repo.APIContractRevisioner().List(ctx, proj.ID, repository.WithClusterID(cluster.ID))
if err != nil {
e := "error finding contract revisions for cluster"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Advanced: React.FC<AdvancedProps> = ({ index }) => {
Specify how much time service processes are given to gracefully shut
down when they receive SIGTERM
<a
href="https://docs.porter.run/standard/deploying-applications/zero-downtime-deployments#graceful-shutdown"
href="https://docs.porter.run/configure/zero-downtime-deployments#graceful-shutdown"
target="_blank"
rel="noreferrer"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Advanced: React.FC<AdvancedProps> = ({ index }) => {
Specify how much time service processes are given to gracefully shut
down when they receive SIGTERM
<a
href="https://docs.porter.run/standard/deploying-applications/zero-downtime-deployments#graceful-shutdown"
href="https://docs.porter.run/configure/zero-downtime-deployments#graceful-shutdown"
target="_blank"
rel="noreferrer"
>
Expand Down
Loading