-
Notifications
You must be signed in to change notification settings - Fork 117
feat: Optimize migrations #603
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
Changes from all commits
168a3b3
6022d03
64a8593
a84a33a
7108568
f01e014
8e58613
6e28ccf
a3fdd5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -15,14 +15,21 @@ import ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
var ErrPostgresURIRequired = fmt.Errorf("postgresURI is required") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type UpgradeMode string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UpgradeModeDisabled UpgradeMode = "disabled" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UpgradeModeJob UpgradeMode = "job" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UpgradeModeInApp UpgradeMode = "in-app" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type Component struct { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pulumi.ResourceState | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ServiceName pulumix.Output[string] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ServiceNamespace pulumix.Output[string] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ServicePort pulumix.Output[int] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ServiceInternalURL pulumix.Output[string] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Migrations pulumix.Output[*batchv1.Job] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type PostgresArgs struct { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -73,13 +80,12 @@ type ComponentArgs struct { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Debug pulumix.Input[bool] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReplicaCount pulumix.Input[int] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GracePeriod pulumix.Input[string] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AutoUpgrade pulumix.Input[bool] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WaitUpgrade pulumix.Input[bool] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BallastSizeInBytes pulumix.Input[int] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NumscriptCacheMaxCount pulumix.Input[int] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BulkMaxSize pulumix.Input[int] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BulkParallel pulumix.Input[int] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TerminationGracePeriodSeconds pulumix.Input[*int] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Upgrade pulumix.Input[UpgradeMode] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ExperimentalFeatures pulumix.Input[bool] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ExperimentalNumscriptInterpreter pulumix.Input[bool] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -129,14 +135,29 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, opts .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ledgerImage := pulumi.Sprintf("ghcr.io/formancehq/ledger:%s", tag) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
autoUpgrade := pulumix.Val(true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if args.AutoUpgrade != nil { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
autoUpgrade = args.AutoUpgrade.ToOutput(ctx.Context()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
upgradeMode := UpgradeModeInApp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if args.Upgrade != nil { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
var ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
upgradeModeChan = make(chan UpgradeMode, 1) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pulumix.ApplyErr(args.Upgrade, func(upgradeMode UpgradeMode) (any, error) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
upgradeModeChan <- upgradeMode | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
close(upgradeModeChan) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return nil, nil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
select { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
case <-ctx.Context().Done(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return nil, ctx.Context().Err() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
case upgradeMode = <-upgradeModeChan: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if upgradeMode == "" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
upgradeMode = UpgradeModeInApp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+138
to
+156
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential deadlock risk in The use of an unbuffered channel with Refactor the code to avoid using channels and handle the input more safely. Consider using upgradeMode := UpgradeModeInApp
if args.Upgrade != nil {
- var (
- upgradeModeChan = make(chan UpgradeMode, 1)
- )
- pulumix.ApplyErr(args.Upgrade, func(upgradeMode UpgradeMode) (any, error) {
- upgradeModeChan <- upgradeMode
- close(upgradeModeChan)
- return nil, nil
- })
-
- select {
- case <-ctx.Context().Done():
- return nil, ctx.Context().Err()
- case upgradeMode = <-upgradeModeChan:
- if upgradeMode == "" {
- upgradeMode = UpgradeModeInApp
- }
- }
+ upgradeModeOutput := args.Upgrade.ToOutput(ctx.Context())
+ err := upgradeModeOutput.ApplyT(func(mode UpgradeMode) (UpgradeMode, error) {
+ if mode == "" {
+ return UpgradeModeInApp, nil
+ }
+ upgradeMode = mode
+ return mode, nil
+ }).(pulumi.Output).Await(ctx.Context())
+ if err != nil {
+ return nil, err
+ }
} 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
waitUpgrade := pulumix.Val(true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if args.WaitUpgrade != nil { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
waitUpgrade = args.WaitUpgrade.ToOutput(ctx.Context()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if upgradeMode != "" && upgradeMode != UpgradeModeDisabled && upgradeMode != UpgradeModeJob && upgradeMode != UpgradeModeInApp { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return nil, fmt.Errorf("invalid upgrade mode: %s", upgradeMode) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
imagePullPolicy := pulumix.Val("") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -351,18 +372,10 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, opts .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if args.AutoUpgrade != nil { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if upgradeMode == UpgradeModeInApp { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
envVars = append(envVars, corev1.EnvVarArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name: pulumi.String("AUTO_UPGRADE"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Value: pulumix.Apply2Err(autoUpgrade, waitUpgrade, func(autoUpgrade, waitUpgrade bool) (string, error) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if waitUpgrade && !autoUpgrade { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return "", fmt.Errorf("waitUpgrade requires autoUpgrade to be true") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if !autoUpgrade { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return "false", nil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return "true", nil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}).Untyped().(pulumi.StringOutput), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name: pulumi.String("AUTO_UPGRADE"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Value: pulumi.String("true"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -472,23 +485,26 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, opts .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Port: pulumi.String("http"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FailureThreshold: pulumi.Int(1), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PeriodSeconds: pulumi.Int(10), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PeriodSeconds: pulumi.Int(60), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TimeoutSeconds: pulumi.IntPtr(3), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReadinessProbe: corev1.ProbeArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HttpGet: corev1.HTTPGetActionArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Path: pulumi.String("/_healthcheck"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Port: pulumi.String("http"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FailureThreshold: pulumi.Int(1), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PeriodSeconds: pulumi.Int(10), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PeriodSeconds: pulumi.Int(60), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TimeoutSeconds: pulumi.IntPtr(3), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StartupProbe: corev1.ProbeArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HttpGet: corev1.HTTPGetActionArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Path: pulumi.String("/_healthcheck"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Port: pulumi.String("http"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FailureThreshold: pulumi.Int(60), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PeriodSeconds: pulumi.Int(5), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PeriodSeconds: pulumi.Int(5), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
InitialDelaySeconds: pulumi.IntPtr(2), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TimeoutSeconds: pulumi.IntPtr(3), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Env: envVars, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -501,11 +517,8 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, opts .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return nil, err | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cmp.Migrations = pulumix.ApplyErr(waitUpgrade, func(waitUpgrade bool) (*batchv1.Job, error) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if !waitUpgrade { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return nil, nil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return batchv1.NewJob(ctx, "wait-migration-completion", &batchv1.JobArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if upgradeMode == UpgradeModeJob { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
_, err = batchv1.NewJob(ctx, "migrate", &batchv1.JobArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Metadata: &metav1.ObjectMetaArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Namespace: namespace.Untyped().(pulumi.StringOutput), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -515,7 +528,7 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, opts .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RestartPolicy: pulumi.String("OnFailure"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Containers: corev1.ContainerArray{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corev1.ContainerArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name: pulumi.String("check"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name: pulumi.String("migrate"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Args: pulumi.StringArray{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pulumi.String("migrate"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -537,7 +550,10 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, opts .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, pulumi.Parent(cmp)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if err != nil { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return nil, err | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service, err := corev1.NewService(ctx, "ledger", &corev1.ServiceArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Metadata: &metav1.ObjectMetaArgs{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -597,7 +597,10 @@ Accept: application/json | |
} | ||
} | ||
} | ||
] | ||
], | ||
"errorCode": "VALIDATION", | ||
"errorMessage": "[VALIDATION] invalid 'cursor' query param", | ||
"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" | ||
} | ||
``` | ||
|
||
|
@@ -3244,7 +3247,7 @@ Authorization ( Scopes: ledger:write ) | |
|*anonymous*|INTERPRETER_PARSE| | ||
|*anonymous*|INTERPRETER_RUNTIME| | ||
|*anonymous*|LEDGER_ALREADY_EXISTS| | ||
|*anonymous*|BUCKET_OUTDATED| | ||
|*anonymous*|OUTDATED_SCHEMA| | ||
|
||
<h2 id="tocS_V2LedgerInfoResponse">V2LedgerInfoResponse</h2> | ||
<!-- backwards compatibility --> | ||
|
@@ -3788,16 +3791,28 @@ and | |
} | ||
} | ||
} | ||
] | ||
], | ||
"errorCode": "VALIDATION", | ||
"errorMessage": "[VALIDATION] invalid 'cursor' query param", | ||
"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9" | ||
} | ||
|
||
``` | ||
|
||
### Properties | ||
|
||
allOf | ||
|
||
|Name|Type|Required|Restrictions|Description| | ||
|---|---|---|---|---| | ||
|*anonymous*|object|false|none|none| | ||
|» data|[[V2BulkElementResult](#schemav2bulkelementresult)]|false|none|none| | ||
|
||
and | ||
|
||
|Name|Type|Required|Restrictions|Description| | ||
|---|---|---|---|---| | ||
|data|[[V2BulkElementResult](#schemav2bulkelementresult)]|true|none|none| | ||
|*anonymous*|[V2ErrorResponse](#schemav2errorresponse)|false|none|none| | ||
Comment on lines
+3804
to
+3815
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix duplicate heading in schema composition The schema composition using Apply this fix to resolve the duplicate heading: -allOf
-
-|Name|Type|Required|Restrictions|Description|
-|---|---|---|---|---|
-|*anonymous*|object|false|none|none|
-|» data|[[V2BulkElementResult](#schemav2bulkelementresult)]|false|none|none|
-
-and
-
|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|*anonymous*|[V2ErrorResponse](#schemav2errorresponse)|false|none|none|
|
||
|
||
<h2 id="tocS_V2BulkElementResult">V2BulkElementResult</h2> | ||
<!-- backwards compatibility --> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure
upgrade-mode
configuration is correctly handledPassing the
upgrade-mode
configuration directly may result in an emptyUpgradeMode
if not set. Provide a default value to prevent unexpected behavior.Modify the code to handle a default
upgrade-mode
: