Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
ORY_CONSOLE_URL: https://console.staging.ory.dev
ORY_ORYAPIS_URL: https://staging.oryapis.dev
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: playwright-traces
path: playwright-traces
Expand Down
13 changes: 10 additions & 3 deletions cmd/cloudx/client/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ func (h *CommandHelper) UpdateProject(ctx context.Context, id string, name strin
if _, found := interim["name"]; !found {
interim["name"] = ""
}
_, orgsFound := interim["organizations"]
if !orgsFound {
interim["organizations"] = []client.BasicOrganization{}
}

var payload client.SetProject
var b bytes.Buffer
Expand All @@ -277,16 +281,16 @@ func (h *CommandHelper) UpdateProject(ctx context.Context, id string, name strin
return nil, errors.WithStack(err)
}

if payload.Services.Identity == nil && payload.Services.Permission == nil && payload.Services.Oauth2 == nil {
return nil, errors.Errorf("at least one of the keys `services.identity.config` and `services.permission.config` and `services.oauth2.config` is required and can not be empty")
if payload.Services.Identity == nil && payload.Services.Permission == nil && payload.Services.Oauth2 == nil && payload.Services.AccountExperience == nil {
return nil, errors.Errorf("at least one of the keys `services.identity.config` and `services.permission.config` and `services.oauth2.config` and `services.account_experience.config` is required and can not be empty")
}
if name != "" {
payload.Name = name
}

// If either of the CORS keys is not set after the merge, we need to fetch it from the server
// If the name is not set, and it was not provided, we need to fetch it from the server
needsBackfill := !corsAdminFound || !corsPublicFound || payload.Name == ""
needsBackfill := !corsAdminFound || !corsPublicFound || payload.Name == "" || !orgsFound

if needsBackfill {
res, _, err := c.ProjectAPI.GetProject(ctx, id).Execute()
Expand All @@ -302,6 +306,9 @@ func (h *CommandHelper) UpdateProject(ctx context.Context, id string, name strin
if !corsPublicFound {
payload.CorsPublic = *res.CorsPublic
}
if !orgsFound {
payload.Organizations = res.Organizations
}
}

res, _, err := c.ProjectAPI.SetProject(ctx, id).SetProject(payload).Execute()
Expand Down
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/ory/cli

go 1.24

toolchain go1.24.0
go 1.24.0

replace (
github.com/gorilla/sessions => github.com/ory/sessions v1.2.2-0.20220110165800-b09c17334dc2
Expand All @@ -23,7 +21,7 @@ require (
github.com/gofrs/uuid/v3 v3.1.2
github.com/gomarkdown/markdown v0.0.0-20240730141124-034f12af3bf6
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/ory/client-go v1.15.10
github.com/ory/client-go v1.22.1
github.com/ory/gochimp3 v0.0.0-20200417124117-ccd242db3655
github.com/ory/graceful v0.1.4-0.20230301144740-e222150c51d0
github.com/ory/herodot v0.10.3-0.20230807143059-27cd6936499b
Expand All @@ -40,11 +38,11 @@ require (
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.10.0
github.com/stretchr/testify v1.11.1
github.com/tidwall/gjson v1.18.0
github.com/tidwall/sjson v1.2.5
github.com/urfave/negroni v1.0.0
golang.org/x/oauth2 v0.27.0
golang.org/x/oauth2 v0.30.0
golang.org/x/text v0.23.0
gopkg.in/yaml.v2 v2.4.0
)
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDO
github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY=
github.com/ory/analytics-go/v5 v5.0.1 h1:LX8T5B9FN8KZXOtxgN+R3I4THRRVB6+28IKgKBpXmAM=
github.com/ory/analytics-go/v5 v5.0.1/go.mod h1:lWCiCjAaJkKfgR/BN5DCLMol8BjKS1x+4jxBxff/FF0=
github.com/ory/client-go v1.15.10 h1:d009nseCcvWJt4KcyJUNYTzsWyU7JJ+0fTzE8YWfEd8=
github.com/ory/client-go v1.15.10/go.mod h1:WSa8NSYIoobY1lcSW0pd3k8erI49z15wlQ/GkUhSV+Y=
github.com/ory/client-go v1.22.1 h1:BI/RwsVnIsSlL1xQ70R54eq0MX1qQI9AzV9h0j+TJgs=
github.com/ory/client-go v1.22.1/go.mod h1:TewDVd7lV6emrrSKQCq4xOzS6J1LYjsN80GO0BJE3fc=
github.com/ory/dockertest/v3 v3.11.0 h1:OiHcxKAvSDUwsEVh2BjxQQc/5EHz9n0va9awCtNGuyA=
github.com/ory/dockertest/v3 v3.11.0/go.mod h1:VIPxS1gwT9NpPOrfD3rACs8Y9Z7yhzO4SB194iUDnUI=
github.com/ory/fosite v0.47.1-0.20241101073333-eab241e153a4 h1:1pEVHGC+Dx2xMPMgpRgG3lyejyK8iU9KKfSnLowLYd8=
Expand Down Expand Up @@ -776,8 +776,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/thales-e-security/pool v0.0.2 h1:RAPs4q2EbWsTit6tpzuvTFlgFRJ3S8Evf5gtvVDbmPg=
Expand Down Expand Up @@ -987,8 +987,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210810183815-faf39c7919d5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
Loading