Skip to content

Commit

Permalink
Merge branch 'master' into vite-env
Browse files Browse the repository at this point in the history
  • Loading branch information
ianedwards authored May 22, 2024
2 parents a863ce1 + f9b8183 commit 6af9ede
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
17 changes: 17 additions & 0 deletions api/server/handlers/project/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ func (p *ProjectDeleteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
continue
}

if cluster.CloudProvider == "Hosted" {
req := connect.NewRequest(&porterv1.DeletePorterCloudClusterRequest{
ClusterId: int64(cluster.ID),
ProjectId: int64(cluster.ProjectID),
})

_, err = p.Config().ClusterControlPlaneClient.DeletePorterCloudCluster(ctx, req)
if err != nil {
err = telemetry.Error(ctx, span, err, "error deleting cluster")
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ require (
github.com/nats-io/nats.go v1.24.0
github.com/open-policy-agent/opa v0.44.0
github.com/ory/client-go v1.9.0
github.com/porter-dev/api-contracts v0.2.164
github.com/porter-dev/api-contracts v0.2.169
github.com/riandyrn/otelchi v0.5.1
github.com/santhosh-tekuri/jsonschema/v5 v5.0.1
github.com/stefanmcshane/helm v0.0.0-20221213002717-88a4a2c6e77d
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1570,8 +1570,8 @@ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw=
github.com/porter-dev/api-contracts v0.2.164 h1:99Y96YH9CfAl/aPjnqXbsiEgMHUFxDM9wC5G5sQnmyQ=
github.com/porter-dev/api-contracts v0.2.164/go.mod h1:VV5BzXd02ZdbWIPLVP+PX3GKawJSGQnxorVT2sUZALU=
github.com/porter-dev/api-contracts v0.2.169 h1:bZtfkBkkNRyZtez4zfRxjwTEcIMtwegN9fteGDAw4Q0=
github.com/porter-dev/api-contracts v0.2.169/go.mod h1:VV5BzXd02ZdbWIPLVP+PX3GKawJSGQnxorVT2sUZALU=
github.com/porter-dev/switchboard v0.0.3 h1:dBuYkiVLa5Ce7059d6qTe9a1C2XEORFEanhbtV92R+M=
github.com/porter-dev/switchboard v0.0.3/go.mod h1:xSPzqSFMQ6OSbp42fhCi4AbGbQbsm6nRvOkrblFeXU4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
Expand Down

0 comments on commit 6af9ede

Please sign in to comment.