We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The interface Ramp is an optional field for VersioningAssignmentRule, we should be able to set it to nil regardless of the type of the nil object
Ramp
VersioningAssignmentRule
nil
Currently we can set it to untyped nil, but with a typed nil it panics with a bad memory reference.
func Test_WorkerVersioningRules_typed_nil(t *testing.T) { ramp := &VersioningRampByPercentage{ Percentage: 45.0, } ramp = nil u := UpdateWorkerVersioningRulesOptions{ TaskQueue: "myQueue", Operation: &VersioningOperationInsertAssignmentRule{ RuleIndex: 0, Rule: VersioningAssignmentRule{ TargetBuildID: "2.0", Ramp: ramp, }, }, } /// This panics....!! _, err := u.validateAndConvertToProto("my_namespace") }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
The interface
Ramp
is an optional field forVersioningAssignmentRule
, we should be able to setit to
nil
regardless of the type of thenil
objectActual Behavior
Currently we can set it to untyped
nil
, but with a typednil
it panics with abad memory reference.
Steps to Reproduce the Problem
The text was updated successfully, but these errors were encountered: