Skip to content

Commit 8a7c319

Browse files
authored
SA: Use IgnoreAccountContacts flag to shortcut UpdateRegistrationContact (#8208)
If the IgnoreAccountContacts flag is set, don't bother writing the new contacts to the database and instead just return the account object as it stands. This does not require any test changes because #8198 already changed registrationModelToPb to omit whatever contacts were retrieved from the database before responding to the RA. Part of #8176
1 parent 930e69b commit 8a7c319

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sa/sa.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
corepb "github.com/letsencrypt/boulder/core/proto"
2222
"github.com/letsencrypt/boulder/db"
2323
berrors "github.com/letsencrypt/boulder/errors"
24+
"github.com/letsencrypt/boulder/features"
2425
bgrpc "github.com/letsencrypt/boulder/grpc"
2526
"github.com/letsencrypt/boulder/identifier"
2627
blog "github.com/letsencrypt/boulder/log"
@@ -132,6 +133,10 @@ func (ssa *SQLStorageAuthority) UpdateRegistrationContact(ctx context.Context, r
132133
return nil, errIncompleteRequest
133134
}
134135

136+
if features.Get().IgnoreAccountContacts {
137+
return ssa.GetRegistration(ctx, &sapb.RegistrationID{Id: req.RegistrationID})
138+
}
139+
135140
// We don't want to write literal JSON "null" strings into the database if the
136141
// list of contact addresses is empty. Replace any possibly-`nil` slice with
137142
// an empty JSON array.

0 commit comments

Comments
 (0)