This repository was archived by the owner on Sep 30, 2024. It is now read-only.
feat/enterpriseportal: add instance category#64253
Merged
bobheadxi merged 8 commits intoAug 10, 2024
Merged
Conversation
3 tasks
This was referenced Aug 2, 2024
Member
Author
3 tasks
91257ef to
8fb0c02
Compare
0c41032 to
35238a3
Compare
8fb0c02 to
25d2927
Compare
35238a3 to
10e500f
Compare
cfa92bb to
794b367
Compare
10e500f to
fe448ba
Compare
67ac762 to
d279c46
Compare
fe448ba to
94f8044
Compare
d279c46 to
36692fa
Compare
94f8044 to
08922c7
Compare
36692fa to
74800c0
Compare
296c4e8 to
d1cb91b
Compare
aa686a6 to
94f6079
Compare
d1cb91b to
25d4701
Compare
94f6079 to
61b395f
Compare
25d4701 to
d611369
Compare
61b395f to
2df8867
Compare
d611369 to
c13852d
Compare
a45bb7c to
21bb9f1
Compare
0d047cc to
4270378
Compare
d19ad55 to
f745e78
Compare
8bbd8d5 to
ed77a4e
Compare
350fe64 to
ebb0318
Compare
ed77a4e to
153c70b
Compare
jac
approved these changes
Aug 9, 2024
Comment on lines
538
to
551
Member
There was a problem hiding this comment.
Is it intended that this allows setting the zero value without a force update?
e.g. the following test passes
{
name: "empty instance_type w/ update_mask",
update: &subscriptionsv1.UpdateEnterpriseSubscriptionRequest{
Subscription: &subscriptionsv1.EnterpriseSubscription{
Id: mockSubscriptionID,
// All update-able values are zero
},
UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"instance_type"}},
},
// All update-able values should be set to their defaults explicitly
wantUpdateOpts: autogold.Expect(subscriptions.UpsertSubscriptionOptions{
InstanceType: &sql.NullString{
String: "ENTERPRISE_SUBSCRIPTION_INSTANCE_TYPE_UNSPECIFIED",
Valid: true,
},
ForceUpdate: false,
}),
},
Member
Author
There was a problem hiding this comment.
thanks, I added your test case, and updated the implementation such that if the type is zero, we do an InstanceType: &sql.NullString{} (unset as null) update instead
2 tasks
This was referenced Aug 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Per some feedback around https://docs.google.com/document/d/1NyBIQvZ-ziNhiz7Yuzbp4f72Gp6EUrVUoBYnnnviXi8/edit, this adds a "instance type" enumeration for each subscription:
Test plan
Updated tests