Skip to content

Commit 090132d

Browse files
committed
Revert "Add RST support in Sandbox (#2917)"
PR 2917 added two `get(tld)` methods to ClaimsListDao and SignedMarkRevocationList so that RST test TLDs can have separate claims and smdr lists. RST tests are completed and this functionality is no longer needed. we are replaceing all invocations of the above to `get()`.
1 parent f2cfd36 commit 090132d

13 files changed

Lines changed: 9 additions & 457 deletions

File tree

core/src/main/java/google/registry/flows/domain/DomainClaimsCheckFlow.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ public EppResponse run() throws EppException {
108108
verifyClaimsPeriodNotEnded(tld, now);
109109
}
110110
}
111-
Optional<String> claimKey =
112-
ClaimsListDao.get(tldStr).getClaimKey(parsedDomain.parts().get(0));
111+
Optional<String> claimKey = ClaimsListDao.get().getClaimKey(parsedDomain.parts().get(0));
113112
launchChecksBuilder.add(
114113
LaunchCheck.create(
115114
LaunchCheckName.create(claimKey.isPresent(), domainName), claimKey.orElse(null)));

core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public EppResponse run() throws EppException {
279279
checkAllowedAccessToTld(registrarId, tld.getTldStr());
280280
checkHasBillingAccount(registrarId, tld.getTldStr());
281281
boolean isValidReservedCreate = isValidReservedCreate(domainName, allocationToken);
282-
ClaimsList claimsList = ClaimsListDao.get(tld.getTldStr());
282+
ClaimsList claimsList = ClaimsListDao.get();
283283
verifyIsGaOrSpecialCase(
284284
tld,
285285
claimsList,
@@ -311,8 +311,7 @@ public EppResponse run() throws EppException {
311311
// at this point so that we can verify it before the "after validation" extension point.
312312
signedMarkId =
313313
tmchUtils
314-
.verifySignedMarks(
315-
tld.getTldStr(), launchCreate.get().getSignedMarks(), domainLabel, now)
314+
.verifySignedMarks(launchCreate.get().getSignedMarks(), domainLabel, now)
316315
.getId();
317316
}
318317
verifyNotBlockedByBsa(domainName, tld, now, allocationToken);

core/src/main/java/google/registry/flows/domain/DomainFlowTmchUtils.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,15 @@ public DomainFlowTmchUtils(TmchXmlSignature tmchXmlSignature) {
5555
}
5656

5757
public SignedMark verifySignedMarks(
58-
String tld, ImmutableList<AbstractSignedMark> signedMarks, String domainLabel, DateTime now)
58+
ImmutableList<AbstractSignedMark> signedMarks, String domainLabel, DateTime now)
5959
throws EppException {
6060
if (signedMarks.size() > 1) {
6161
throw new TooManySignedMarksException();
6262
}
6363
if (!(signedMarks.get(0) instanceof EncodedSignedMark)) {
6464
throw new SignedMarksMustBeEncodedException();
6565
}
66-
SignedMark signedMark =
67-
verifyEncodedSignedMark(tld, (EncodedSignedMark) signedMarks.get(0), now);
66+
SignedMark signedMark = verifyEncodedSignedMark((EncodedSignedMark) signedMarks.get(0), now);
6867
return verifySignedMarkValidForDomainLabel(signedMark, domainLabel);
6968
}
7069

@@ -76,9 +75,8 @@ public SignedMark verifySignedMarkValidForDomainLabel(SignedMark signedMark, Str
7675
return signedMark;
7776
}
7877

79-
// TODO(b/412715713): remove the tld parameter when RST completes.
80-
public SignedMark verifyEncodedSignedMark(
81-
String tld, EncodedSignedMark encodedSignedMark, DateTime now) throws EppException {
78+
public SignedMark verifyEncodedSignedMark(EncodedSignedMark encodedSignedMark, DateTime now)
79+
throws EppException {
8280
if (!encodedSignedMark.getEncoding().equals("base64")) {
8381
throw new Base64RequiredForEncodedSignedMarksException();
8482
}
@@ -96,7 +94,7 @@ public SignedMark verifyEncodedSignedMark(
9694
throw new SignedMarkParsingErrorException();
9795
}
9896

99-
if (SignedMarkRevocationList.get(tld).isSmdRevoked(signedMark.getId(), now)) {
97+
if (SignedMarkRevocationList.get().isSmdRevoked(signedMark.getId(), now)) {
10098
throw new SignedMarkRevokedErrorException();
10199
}
102100

core/src/main/java/google/registry/model/smd/SignedMarkRevocationList.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import com.google.common.base.Supplier;
2222
import com.google.common.collect.ImmutableMap;
2323
import google.registry.model.ImmutableObject;
24-
import google.registry.tmch.RstTmchUtils;
2524
import jakarta.persistence.CollectionTable;
2625
import jakarta.persistence.Column;
2726
import jakarta.persistence.ElementCollection;
@@ -72,11 +71,6 @@ public static SignedMarkRevocationList get() {
7271
return CACHE.get();
7372
}
7473

75-
// TODO(b/412715713): remove the tld parameter when RST completes.
76-
public static SignedMarkRevocationList get(String tld) {
77-
return RstTmchUtils.getSmdrList(tld).orElseGet(SignedMarkRevocationList::get);
78-
}
79-
8074
/** Create a new {@link SignedMarkRevocationList} without saving it. */
8175
public static SignedMarkRevocationList create(
8276
DateTime creationTime, ImmutableMap<String, DateTime> revokes) {

core/src/main/java/google/registry/model/tmch/ClaimsListDao.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.google.common.annotations.VisibleForTesting;
2323
import com.google.common.collect.ImmutableMap;
2424
import google.registry.model.CacheUtils;
25-
import google.registry.tmch.RstTmchUtils;
2625
import java.time.Duration;
2726
import java.util.Optional;
2827

@@ -73,11 +72,6 @@ public static ClaimsList get() {
7372
return CACHE.get(ClaimsListDao.class);
7473
}
7574

76-
// TODO(b/412715713): remove the tld parameter when RST completes.
77-
public static ClaimsList get(String tld) {
78-
return RstTmchUtils.getClaimsList(tld).orElseGet(ClaimsListDao::get);
79-
}
80-
8175
/**
8276
* Returns the most recent revision of the {@link ClaimsList} in SQL or an empty list if it
8377
* doesn't exist.

core/src/main/java/google/registry/tmch/RstTmchUtils.java

Lines changed: 0 additions & 120 deletions
This file was deleted.

core/src/main/resources/google/registry/tmch/ote.rst.dnl.csv

Lines changed: 0 additions & 10 deletions
This file was deleted.

core/src/main/resources/google/registry/tmch/ote.rst.smdrl.csv

Lines changed: 0 additions & 7 deletions
This file was deleted.

core/src/main/resources/google/registry/tmch/prod.rst.dnl.csv

Lines changed: 0 additions & 10 deletions
This file was deleted.

core/src/main/resources/google/registry/tmch/prod.rst.smdrl.csv

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)