Compare commits

..
Author SHA1 Message Date
Weimin YuandGitHub 96e33f5b4f Check for missing BSA unblockable domains (#2394)
* Check for missing BSA unblockable domains

All unblockable domains created before the last refresh run should be
reported as unblockable (registered).

All reserved domains that are not registered should be reported as
unblockable (reserved). Note that transient errors may be reported for
newly added reserved domains since we do not maintain update time for
when a reserved label is associated with a TLD. However, this scenario
is extremely rare in operations.

* Addressing review
2024-04-03 00:44:05 +00:00
sarahcaseybotandGitHub dff2d90325 Add batching to DeleteProberDataAction (#2322)
* Add batching to DeleteProberDataAction

* Only get time once

* Add separate query for dry run

* Update querries to actually properly delete all the data

* Fix merge conflicts

* Add test for foreign key constraints

* Make transaction repeatable read

* Make queries to subtables native

* Add native query for GracePeriodHistory

* Kill job after 20 hours

* remove extra time check from read query
2024-03-29 20:51:19 +00:00
sarahcaseybotandGitHub fa344776a1 Drop the should_publish column from ReservedList (#2392) 2024-03-29 16:21:11 +00:00
Pavlo TkachandGitHub eb164809de Add console favicon (#2391) 2024-03-27 20:32:01 +00:00
Pavlo TkachandGitHub 4ddbeb6d06 Add console registrar field focus handler, split whois address field (#2388) 2024-03-27 18:55:57 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fa53391395 Bump express from 4.19.1 to 4.19.2 in /console-webapp (#2387)
Bumps [express](https://github.com/expressjs/express) from 4.19.1 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.1...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 17:28:43 +00:00
sarahcaseybotandGitHub 856e70cf8e Add indexes on domainRepoId to DomainHistoryHost and PollMessage (#2380)
* Add index for domainRepoId to PollMessage and DomainHistoryHost

* Add flyway fix for Concurrent

* fix gradle.properties

* Modify lockfiles

* Update the release tool and add IF NOT EXISTS

* Test removing transactional lock from deploy script

* Add transactional lock flag to actual flyway commands in script

* Remove flag from info command

* Add configuration for integration test
2024-03-26 16:44:14 +00:00
Lai JiangandGitHub 2037611931 Upgrade to Gradle 8.7 (#2386) 2024-03-25 23:57:40 +00:00
Lai JiangandGitHub af1f6e5708 Compile to Java 21 bytecode (#2374)
We have been running in Java 21 runtime for a couple of weeks and every
works as expected.
2024-03-25 13:50:39 +00:00
48 changed files with 612 additions and 163 deletions
+2 -2
View File
@@ -342,8 +342,8 @@ subprojects {
// search for `flex-template-base-image` and update the parameter value.
// There are at least two instances, one in core/build.gradle, one in
// release/stage_beam_pipeline.sh
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
project.tasks.test.dependsOn runPresubmits
+3 -3
View File
@@ -8639,9 +8639,9 @@
"dev": true
},
"node_modules/express": {
"version": "4.19.1",
"resolved": "https://registry.npmjs.org/express/-/express-4.19.1.tgz",
"integrity": "sha512-K4w1/Bp7y8iSiVObmCrtq8Cs79XjJc/RU2YYkZQ7wpUu5ZyZ7MtPHkqoMz4pf+mgXfNvo2qft8D9OnrH2ABk9w==",
"version": "4.19.2",
"resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
"integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
"dev": true,
"dependencies": {
"accepts": "~1.3.8",
@@ -18,7 +18,7 @@
*matTreeNodeDef="let node; when: hasChild"
(click)="onClick(node)"
>
<div class="mat-tree-node" [class.active]="router.url.endsWith(node.path)">
<div class="mat-tree-node" [class.active]="router.url.includes(node.path)">
<button
class="console-app__nav-icon_expand"
mat-icon-button
@@ -13,6 +13,7 @@
[ngModel]="registrarInput()"
(ngModelChange)="registrarInput.set($event)"
[ngModelOptions]="{ standalone: true }"
(focus)="onFocus()"
[matAutocomplete]="auto"
/>
<mat-autocomplete
@@ -34,15 +34,14 @@ export class RegistrarSelectorComponent {
option.toLowerCase().includes(filterValue)
);
});
this.onSelect(registrarService.registrarId());
}
onFocus() {
// We reset the list of options after selection, so that user doesn't have to clear it out
this.filteredOptions = this.allRegistrarIds();
}
onSelect(registrarId: string) {
this.registrarService.updateSelectedRegistrar(registrarId);
// We reset the list of options after selection, so that user doesn't have to clear it out
setTimeout(() => {
this.filteredOptions = this.allRegistrarIds();
}, 10);
}
}
@@ -20,6 +20,11 @@
mat-table {
min-width: 800px;
}
.contact__name-column-title {
color: #5f6368;
font-weight: 500;
padding: 10px 0;
}
}
&__empty-contacts {
display: flex;
@@ -38,9 +43,4 @@
right: 20px;
top: 5px;
}
.contact__name-column-title {
color: #5f6368;
font-weight: 500;
padding: 10px 0;
}
}
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { Component, effect } from '@angular/core';
import { Component, effect, ViewEncapsulation } from '@angular/core';
import { MatTableDataSource } from '@angular/material/table';
import { take } from 'rxjs';
import { RegistrarService } from 'src/app/registrar/registrar.service';
@@ -27,6 +27,7 @@ import {
selector: 'app-contact',
templateUrl: './contact.component.html',
styleUrls: ['./contact.component.scss'],
encapsulation: ViewEncapsulation.None,
})
export default class ContactComponent {
public static PATH = 'contact';
@@ -68,18 +69,18 @@ export default class ContactComponent {
public contactService: ContactService,
private registrarService: RegistrarService
) {
effect(() => {
if (this.contactService.contacts()) {
this.dataSource = new MatTableDataSource<ViewReadyContact>(
this.contactService.contacts().map(contactTypeToViewReadyContact)
);
}
});
effect(() => {
if (this.registrarService.registrarId()) {
this.contactService.isContactDetailsView = false;
this.contactService.isContactNewView = false;
this.contactService
.fetchContacts()
.pipe(take(1))
.subscribe((contacts) => {
this.dataSource = new MatTableDataSource<ViewReadyContact>(
contacts.map(contactTypeToViewReadyContact)
);
});
this.contactService.fetchContacts().pipe(take(1)).subscribe();
}
});
}
@@ -36,9 +36,12 @@ export default class WhoisComponent {
if (registrar?.localizedAddress?.state) {
result += `${registrar?.localizedAddress?.state} `;
}
if (registrar?.localizedAddress?.street) {
if (registrar?.localizedAddress?.countryCode) {
result += registrar?.localizedAddress?.countryCode;
}
if (registrar?.localizedAddress?.zip) {
result += registrar?.localizedAddress?.zip;
}
return result;
});
@@ -51,7 +51,17 @@
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Street Address: </mat-label>
<mat-label>Street Address (line 1): </mat-label>
<input
matInput
type="text"
[ngModelOptions]="{ standalone: true }"
[(ngModel)]="registrarInEdit.localizedAddress.street![0]"
/>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Street Address (line 2): </mat-label>
<input
matInput
type="text"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 1.4 KiB

+2
View File
@@ -17,6 +17,7 @@ import java.util.Optional
plugins {
id 'java-library'
id "org.flywaydb.flyway" version "10.8.1"
id 'maven-publish'
}
@@ -317,6 +318,7 @@ dependencies {
// Flyway classes needed to generate the golden file.
implementation deps['org.flywaydb:flyway-core']
implementation deps['org.flywaydb:flyway-database-postgresql']
closureCompiler deps['com.google.javascript:closure-compiler']
}
+10 -1
View File
@@ -1,4 +1,13 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
empty=classpath
com.fasterxml.jackson.core:jackson-annotations:2.15.2=classpath
com.fasterxml.jackson.core:jackson-core:2.15.2=classpath
com.fasterxml.jackson.core:jackson-databind:2.15.2=classpath
com.fasterxml.jackson.dataformat:jackson-dataformat-toml:2.15.2=classpath
com.fasterxml.jackson:jackson-bom:2.15.2=classpath
com.google.code.gson:gson:2.10.1=classpath
gradle.plugin.org.flywaydb:gradle-plugin-publishing:10.8.1=classpath
org.flywaydb.flyway:org.flywaydb.flyway.gradle.plugin:10.8.1=classpath
org.flywaydb:flyway-core:10.8.1=classpath
empty=
+2 -2
View File
@@ -407,7 +407,7 @@ org.eclipse.jetty:jetty-session:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-util:12.0.7=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-xml:12.0.7=testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -482,7 +482,7 @@ org.ow2.asm:asm:7.0=soy
org.ow2.asm:asm:9.2=compileClasspath,nonprodCompileClasspath
org.ow2.asm:asm:9.6=deploy_jar,jacocoAnt,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.pcollections:pcollections:3.1.4=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
org.postgresql:postgresql:42.7.3=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.reflections:reflections:0.10.2=checkstyle
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.seleniumhq.selenium:selenium-api:3.141.59=testCompileClasspath,testRuntimeClasspath
@@ -16,15 +16,19 @@ package google.registry.batch;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static google.registry.dns.DnsUtils.requestDomainDnsRefresh;
import static google.registry.model.reporting.HistoryEntry.Type.DOMAIN_DELETE;
import static google.registry.model.tld.Tlds.getTldsOfType;
import static google.registry.persistence.PersistenceModule.TransactionIsolationLevel.TRANSACTION_REPEATABLE_READ;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.request.Action.Method.POST;
import static google.registry.request.RequestParameters.PARAM_BATCH_SIZE;
import static google.registry.request.RequestParameters.PARAM_DRY_RUN;
import static google.registry.request.RequestParameters.PARAM_TLDS;
import static google.registry.util.RegistryEnvironment.PRODUCTION;
import static org.joda.time.DateTimeZone.UTC;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
@@ -41,12 +45,11 @@ import google.registry.request.Action;
import google.registry.request.Parameter;
import google.registry.request.auth.Auth;
import google.registry.util.RegistryEnvironment;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import javax.inject.Inject;
import org.hibernate.CacheMode;
import org.hibernate.ScrollMode;
import org.hibernate.ScrollableResults;
import org.hibernate.query.Query;
import javax.persistence.TypedQuery;
import org.joda.time.DateTime;
import org.joda.time.Duration;
@@ -61,6 +64,7 @@ import org.joda.time.Duration;
auth = Auth.AUTH_API_ADMIN)
public class DeleteProberDataAction implements Runnable {
// TODO(b/323026070): Add email alert on failure of this action
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
/**
@@ -90,31 +94,38 @@ public class DeleteProberDataAction implements Runnable {
// Note: creationTime must be compared to a Java object (CreateAutoTimestamp) but deletionTime can
// be compared directly to the SQL timestamp (it's a DateTime)
private static final String DOMAIN_QUERY_STRING =
"FROM Domain d WHERE d.tld IN :tlds AND d.domainName NOT LIKE 'nic.%' AND"
"FROM Domain d WHERE d.tld IN :tlds AND d.domainName NOT LIKE 'nic.%%' AND"
+ " (d.subordinateHosts IS EMPTY OR d.subordinateHosts IS NULL) AND d.creationTime <"
+ " :creationTimeCutoff AND ((d.creationTime <= :nowAutoTimestamp AND d.deletionTime >"
+ " current_timestamp()) OR d.deletionTime < :nowMinusSoftDeleteDelay) ORDER BY d.repoId";
+ " :creationTimeCutoff AND (d.deletionTime > :now OR d.deletionTime <"
+ " :nowMinusSoftDeleteDelay)";
/** Number of domains to retrieve and delete per SQL transaction. */
private static final int BATCH_SIZE = 1000;
private static final int DEFAULT_BATCH_SIZE = 1000;
@Inject
@Parameter(PARAM_DRY_RUN)
boolean isDryRun;
/** List of TLDs to work on. If empty - will work on all TLDs that end with .test. */
@Inject
@Parameter(PARAM_TLDS)
ImmutableSet<String> tlds;
@Inject
@Config("registryAdminClientId")
int batchSize;
String registryAdminRegistrarId;
@Inject
DeleteProberDataAction() {}
DeleteProberDataAction(
@Parameter(PARAM_DRY_RUN) boolean isDryRun,
@Parameter(PARAM_TLDS) ImmutableSet<String> tlds,
@Parameter(PARAM_BATCH_SIZE) Optional<Integer> batchSize,
@Config("registryAdminClientId") String registryAdminRegistrarId) {
this.isDryRun = isDryRun;
this.tlds = tlds;
this.batchSize = batchSize.orElse(DEFAULT_BATCH_SIZE);
this.registryAdminRegistrarId = registryAdminRegistrarId;
}
@Override
public void run() {
checkArgument(batchSize > 0, "The batch size must be greater than 0");
checkState(
!Strings.isNullOrEmpty(registryAdminRegistrarId),
"Registry admin client ID must be configured for prober data deletion to work");
@@ -131,13 +142,30 @@ public class DeleteProberDataAction implements Runnable {
"If tlds are given, they must all exist and be TEST tlds. Given: %s, not found: %s",
tlds,
Sets.difference(tlds, deletableTlds));
runSqlJob(deletableTlds);
}
private void runSqlJob(ImmutableSet<String> deletableTlds) {
AtomicInteger softDeletedDomains = new AtomicInteger();
AtomicInteger hardDeletedDomains = new AtomicInteger();
tm().transact(() -> processDomains(deletableTlds, softDeletedDomains, hardDeletedDomains));
AtomicReference<ImmutableList<Domain>> domainsBatch = new AtomicReference<>();
DateTime startTime = DateTime.now(UTC);
do {
tm().transact(
TRANSACTION_REPEATABLE_READ,
() ->
domainsBatch.set(
processDomains(
deletableTlds, softDeletedDomains, hardDeletedDomains, startTime)));
// Only process one batch in dryrun mode
if (isDryRun) {
break;
}
logger.atInfo().log(
"deleteProberData hard deleted %d names with %d batchSize",
hardDeletedDomains.get(), batchSize);
// Automatically kill the job if it is running for over 20 hours
} while (DateTime.now(UTC).isBefore(startTime.plusHours(20))
&& domainsBatch.get().size() == batchSize);
logger.atInfo().log(
"%s %d domains.",
isDryRun ? "Would have soft-deleted" : "Soft-deleted", softDeletedDomains.get());
@@ -146,46 +174,32 @@ public class DeleteProberDataAction implements Runnable {
isDryRun ? "Would have hard-deleted" : "Hard-deleted", hardDeletedDomains.get());
}
private void processDomains(
private ImmutableList<Domain> processDomains(
ImmutableSet<String> deletableTlds,
AtomicInteger softDeletedDomains,
AtomicInteger hardDeletedDomains) {
DateTime now = tm().getTransactionTime();
// Scroll through domains, soft-deleting as necessary (very few will be soft-deleted) and
// keeping track of which domains to hard-delete (there can be many, so we batch them up)
try (ScrollableResults scrollableResult =
AtomicInteger hardDeletedDomains,
DateTime now) {
TypedQuery<Domain> query =
tm().query(DOMAIN_QUERY_STRING, Domain.class)
.setParameter("tlds", deletableTlds)
.setParameter(
"creationTimeCutoff", CreateAutoTimestamp.create(now.minus(DOMAIN_USED_DURATION)))
.setParameter("nowMinusSoftDeleteDelay", now.minus(SOFT_DELETE_DELAY))
.setParameter("nowAutoTimestamp", CreateAutoTimestamp.create(now))
.unwrap(Query.class)
.setCacheMode(CacheMode.IGNORE)
.scroll(ScrollMode.FORWARD_ONLY)) {
.setParameter("now", now);
ImmutableList<Domain> domainList =
query.setMaxResults(batchSize).getResultStream().collect(toImmutableList());
ImmutableList.Builder<String> domainRepoIdsToHardDelete = new ImmutableList.Builder<>();
ImmutableList.Builder<String> hostNamesToHardDelete = new ImmutableList.Builder<>();
for (int i = 1; scrollableResult.next(); i = (i + 1) % BATCH_SIZE) {
Domain domain = (Domain) scrollableResult.get(0);
processDomain(
domain,
domainRepoIdsToHardDelete,
hostNamesToHardDelete,
softDeletedDomains,
hardDeletedDomains);
// Batch the deletion and DB flush + session clearing, so we don't OOM
if (i == 0) {
hardDeleteDomainsAndHosts(
domainRepoIdsToHardDelete.build(), hostNamesToHardDelete.build());
domainRepoIdsToHardDelete = new ImmutableList.Builder<>();
hostNamesToHardDelete = new ImmutableList.Builder<>();
tm().getEntityManager().flush();
tm().getEntityManager().clear();
}
}
// process the remainder
hardDeleteDomainsAndHosts(domainRepoIdsToHardDelete.build(), hostNamesToHardDelete.build());
for (Domain domain : domainList) {
processDomain(
domain,
domainRepoIdsToHardDelete,
hostNamesToHardDelete,
softDeletedDomains,
hardDeletedDomains);
}
hardDeleteDomainsAndHosts(domainRepoIdsToHardDelete.build(), hostNamesToHardDelete.build());
return domainList;
}
private void processDomain(
@@ -225,6 +239,10 @@ public class DeleteProberDataAction implements Runnable {
tm().query("DELETE FROM Host WHERE hostName IN :hostNames")
.setParameter("hostNames", hostNames)
.executeUpdate();
tm().getEntityManager()
.createNativeQuery("DELETE FROM \"GracePeriod\" WHERE domain_repo_id IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().query("DELETE FROM BillingEvent WHERE domainRepoId IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
@@ -234,12 +252,45 @@ public class DeleteProberDataAction implements Runnable {
tm().query("DELETE FROM BillingCancellation WHERE domainRepoId IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().query("DELETE FROM DomainHistory WHERE repoId IN :repoIds")
tm().getEntityManager()
.createNativeQuery("DELETE FROM \"GracePeriodHistory\" WHERE domain_repo_id IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().query("DELETE FROM PollMessage WHERE domainRepoId IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().getEntityManager()
.createNativeQuery("DELETE FROM \"DomainHost\" WHERE domain_repo_id IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().getEntityManager()
.createNativeQuery(
"DELETE FROM \"DomainHistoryHost\" WHERE domain_history_domain_repo_id IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().getEntityManager()
.createNativeQuery("DELETE FROM \"HostHistory\" WHERE host_name IN :hostNames")
.setParameter("hostNames", hostNames)
.executeUpdate();
tm().getEntityManager()
.createNativeQuery("DELETE FROM \"DelegationSignerData\" WHERE domain_repo_id IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().getEntityManager()
.createNativeQuery(
"DELETE FROM \"DomainTransactionRecord\" WHERE domain_repo_id IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().getEntityManager()
.createNativeQuery("DELETE FROM \"DomainDsDataHistory\" WHERE domain_repo_id IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
tm().getEntityManager()
.createNativeQuery("DELETE FROM \"DomainHistory\" WHERE domain_repo_id IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
// Delete from domain table is done last so that a trainsient failure in the middle of an action
// run will not prevent the domain from being deleted by this action in a future run
tm().query("DELETE FROM Domain WHERE repoId IN :repoIds")
.setParameter("repoIds", domainRepoIds)
.executeUpdate();
@@ -17,12 +17,20 @@ package google.registry.bsa;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Throwables.getStackTraceAsString;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.ImmutableMap.toImmutableMap;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static google.registry.bsa.BsaTransactions.bsaQuery;
import static google.registry.bsa.ReservedDomainsUtils.getAllReservedNames;
import static google.registry.bsa.ReservedDomainsUtils.isReservedDomain;
import static google.registry.bsa.persistence.Queries.batchReadBsaLabelText;
import static google.registry.bsa.persistence.Queries.queryMissedRegisteredUnblockables;
import static google.registry.bsa.persistence.Queries.queryUnblockableDomainByLabels;
import static google.registry.model.tld.Tld.isEnrolledWithBsa;
import static google.registry.model.tld.Tlds.getTldEntitiesOfType;
import static google.registry.persistence.transaction.TransactionManagerFactory.replicaTm;
import static google.registry.request.Action.Method.GET;
import static google.registry.request.Action.Method.POST;
import static google.registry.util.BatchedStreams.toBatches;
import static javax.servlet.http.HttpServletResponse.SC_OK;
import com.google.common.base.Joiner;
@@ -38,9 +46,12 @@ import google.registry.bsa.api.UnblockableDomain;
import google.registry.bsa.api.UnblockableDomain.Reason;
import google.registry.bsa.persistence.DownloadScheduler;
import google.registry.bsa.persistence.Queries;
import google.registry.bsa.persistence.Queries.DomainLifeSpan;
import google.registry.config.RegistryConfig.Config;
import google.registry.model.ForeignKeyUtils;
import google.registry.model.domain.Domain;
import google.registry.model.tld.Tld;
import google.registry.model.tld.Tld.TldType;
import google.registry.persistence.VKey;
import google.registry.request.Action;
import google.registry.request.Response;
@@ -124,7 +135,8 @@ public class BsaValidateAction implements Runnable {
ImmutableList.Builder<String> errorsBuilder = new ImmutableList.Builder<>();
errorsBuilder.addAll(checkBsaLabels(downloadJobName.get()));
errorsBuilder.addAll(checkUnblockableDomains());
errorsBuilder.addAll(checkWronglyReportedUnblockableDomains());
errorsBuilder.addAll(checkMissingUnblockableDomains());
ImmutableList<String> errors = errorsBuilder.build();
@@ -173,7 +185,7 @@ public class BsaValidateAction implements Runnable {
return errors.build();
}
ImmutableList<String> checkUnblockableDomains() {
ImmutableList<String> checkWronglyReportedUnblockableDomains() {
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
Optional<UnblockableDomain> lastRead = Optional.empty();
ImmutableList<UnblockableDomain> batch;
@@ -263,6 +275,77 @@ public class BsaValidateAction implements Runnable {
return labelsBuilder.build();
}
ImmutableList<String> checkMissingUnblockableDomains() {
DateTime now = clock.nowUtc();
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
errors.addAll(checkForMissingReservedUnblockables(now));
errors.addAll(checkForMissingRegisteredUnblockables(now));
return errors.build();
}
ImmutableList<String> checkForMissingRegisteredUnblockables(DateTime now) {
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
ImmutableList<Tld> bsaEnabledTlds =
getTldEntitiesOfType(TldType.REAL).stream()
.filter(tld -> isEnrolledWithBsa(tld, now))
.collect(toImmutableList());
DateTime stalenessThreshold = now.minus(maxStaleness);
bsaEnabledTlds.stream()
.map(Tld::getTldStr)
.map(tld -> bsaQuery(() -> queryMissedRegisteredUnblockables(tld, now)))
.flatMap(ImmutableList::stream)
.filter(domainLifeSpan -> domainLifeSpan.creationTime().isBefore(stalenessThreshold))
.map(DomainLifeSpan::domainName)
.forEach(
domainName ->
errors.add(
String.format(
"Registered domain %s missing or not recorded as REGISTERED", domainName)));
return errors.build();
}
ImmutableList<String> checkForMissingReservedUnblockables(DateTime now) {
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
try (Stream<ImmutableList<String>> reservedNames =
toBatches(getAllReservedNames(now), transactionBatchSize)) {
reservedNames
.map(this::checkOneBatchReservedDomainsForMissingUnblockables)
.forEach(errors::addAll);
}
return errors.build();
}
ImmutableList<String> checkOneBatchReservedDomainsForMissingUnblockables(
ImmutableList<String> batch) {
ImmutableSet<String> labels =
batch.stream()
.map(InternetDomainName::from)
.map(d -> d.parts().get(0))
.collect(toImmutableSet());
ImmutableMap<String, UnblockableDomain> persistedUnblockables =
bsaQuery(
() ->
queryUnblockableDomainByLabels(labels)
.collect(toImmutableMap(UnblockableDomain::domainName, x -> x)));
ImmutableList.Builder<String> errors = new ImmutableList.Builder<>();
ImmutableSet<UnblockableDomain.Reason> acceptableReasons =
ImmutableSet.of(Reason.REGISTERED, Reason.RESERVED);
for (var domainName : batch) {
if (!persistedUnblockables.containsKey(domainName)) {
errors.add(String.format("Missing unblockable domain: %s is reserved.", domainName));
continue;
}
var unblockable = persistedUnblockables.get(domainName);
if (!acceptableReasons.contains(unblockable.reason())) {
errors.add(
String.format(
"Wrong unblockable reason: %s should be reserved or registered, found %s.",
domainName, unblockable.reason()));
}
}
return errors.build();
}
static String parseBlockListLine(String line) {
int firstComma = line.indexOf(',');
checkArgument(firstComma > 0, "Invalid block list line: %s", line);
@@ -19,12 +19,14 @@ import static com.google.common.collect.ImmutableList.toImmutableList;
import static google.registry.bsa.BsaStringUtils.DOMAIN_SPLITTER;
import static google.registry.bsa.BsaTransactions.bsaQuery;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static org.joda.time.DateTimeZone.UTC;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import google.registry.bsa.api.UnblockableDomain;
import google.registry.model.CreateAutoTimestamp;
import java.sql.Timestamp;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@@ -66,6 +68,11 @@ public final class Queries {
.collect(toImmutableList());
}
public static Stream<UnblockableDomain> queryUnblockableDomainByLabels(
ImmutableCollection<String> labels) {
return queryBsaUnblockableDomainByLabels(labels).map(BsaUnblockableDomain::toUnblockableDomain);
}
static Stream<BsaUnblockableDomain> queryBsaUnblockableDomainByLabels(
ImmutableCollection<String> labels) {
return ((Stream<?>)
@@ -141,4 +148,55 @@ public final class Queries {
.setParameter("tlds", tlds)
.getResultList());
}
/**
* Finds all currently registered domains that match BSA labels but are not recorded as
* unblockable.
*
* @return The missing unblockables and their creation and deletion time.
*/
public static ImmutableList<DomainLifeSpan> queryMissedRegisteredUnblockables(
String tld, DateTime now) {
String sqlTemplate =
"""
SELECT l.domain_name, creation_time, deletion_time
FROM
(SELECT d.domain_name, d.creation_time, d.deletion_time
FROM
"Domain" d
JOIN
(SELECT concat(label, '.', :tld) AS domain_name from "BsaLabel") b
ON b.domain_name = d.domain_name
WHERE deletion_time > ':now') l
LEFT OUTER JOIN
(SELECT concat(label, '.', tld) as domain_name
FROM "BsaUnblockableDomain"
WHERE tld = :tld and reason = 'REGISTERED') r
ON l.domain_name = r.domain_name
WHERE r.domain_name is null;
""";
// Native query: Hibernate's setParameter wrongly converts DateTime to bytea
String sql = sqlTemplate.replace(":now", now.toString());
return ((Stream<?>)
tm().getEntityManager()
.createNativeQuery(sql)
.setParameter("tld", tld)
.getResultStream())
.map(Object[].class::cast)
.map(
row ->
new DomainLifeSpan(
(String) row[0],
toDateTime((Timestamp) row[1]),
toDateTime((Timestamp) row[2])))
.collect(toImmutableList());
}
// For testing convenience: 'assertEquals' fails between `new DateTime(timestamp)` and below.
static DateTime toDateTime(Timestamp timestamp) {
return new DateTime(timestamp.getTime(), UTC);
}
public record DomainLifeSpan(String domainName, DateTime creationTime, DateTime deletionTime) {}
}
@@ -91,11 +91,13 @@ public class DomainHistory extends HistoryEntry {
@ElementCollection
@JoinTable(
name = "DomainHistoryHost",
indexes =
@Index(
columnList =
"domain_history_history_revision_id,domain_history_domain_repo_id,host_repo_id",
unique = true))
indexes = {
@Index(columnList = "domain_history_domain_repo_id"),
@Index(
columnList =
"domain_history_history_revision_id,domain_history_domain_repo_id,host_repo_id",
unique = true)
})
@Column(name = "host_repo_id")
Set<VKey<Host>> nsHosts;
@@ -36,7 +36,7 @@ import javax.xml.bind.annotation.XmlType;
* @see <a href="http://tools.ietf.org/html/rfc4034">RFC 4034</a>
*/
@XmlType(name = "dsData")
@Entity
@Entity(name = "DelegationSignerData")
@IdClass(DomainDsDataId.class)
@Table(name = "DelegationSignerData", indexes = @Index(columnList = "domainRepoId"))
public class DomainDsData extends DomainDsDataBase {
@@ -86,7 +86,12 @@ import org.joda.time.DateTime;
@ExternalMessagingName("message")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "type")
@Table(indexes = {@Index(columnList = "registrar_id"), @Index(columnList = "eventTime")})
@Table(
indexes = {
@Index(columnList = "domainRepoId"),
@Index(columnList = "registrar_id"),
@Index(columnList = "eventTime")
})
public abstract class PollMessage extends ImmutableObject
implements Buildable, TransferServerApproveEntity, UnsafeSerializable {
@@ -18,8 +18,10 @@ import static com.google.common.net.MediaType.JSON_UTF_8;
import static google.registry.dns.PublishDnsUpdatesAction.CLOUD_TASKS_RETRY_HEADER;
import static google.registry.model.tld.Tlds.assertTldExists;
import static google.registry.model.tld.Tlds.assertTldsExist;
import static google.registry.request.RequestParameters.PARAM_BATCH_SIZE;
import static google.registry.request.RequestParameters.PARAM_DRY_RUN;
import static google.registry.request.RequestParameters.extractBooleanParameter;
import static google.registry.request.RequestParameters.extractOptionalIntParameter;
import static google.registry.request.RequestParameters.extractRequiredHeader;
import static google.registry.request.RequestParameters.extractRequiredParameter;
import static google.registry.request.RequestParameters.extractSetOfParameters;
@@ -99,6 +101,12 @@ public final class RequestModule {
return extractBooleanParameter(req, PARAM_DRY_RUN);
}
@Provides
@Parameter(PARAM_BATCH_SIZE)
static Optional<Integer> provideBatchSize(HttpServletRequest req) {
return extractOptionalIntParameter(req, PARAM_BATCH_SIZE);
}
@Provides
static Response provideResponse(ResponseImpl response) {
return response;
@@ -41,6 +41,11 @@ public final class RequestParameters {
/** The standardized request parameter name used by any action in dry run mode. */
public static final String PARAM_DRY_RUN = "dryRun";
/**
* The standardized request parameter name used by any action taking a configurable batch size.
*/
public static final String PARAM_BATCH_SIZE = "batchSize";
/**
* Returns first GET or POST parameter associated with {@code name}.
*
@@ -21,6 +21,7 @@ import static google.registry.dns.DnsUtils.requestDomainDnsRefresh;
import static google.registry.model.tld.Tlds.assertTldsExist;
import static google.registry.persistence.PersistenceModule.TransactionIsolationLevel.TRANSACTION_REPEATABLE_READ;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.request.RequestParameters.PARAM_BATCH_SIZE;
import static google.registry.request.RequestParameters.PARAM_TLDS;
import static google.registry.util.DateTimeUtils.END_OF_TIME;
@@ -83,7 +84,7 @@ public class RefreshDnsForAllDomainsAction implements Runnable {
RefreshDnsForAllDomainsAction(
Response response,
@Parameter(PARAM_TLDS) ImmutableSet<String> tlds,
@Parameter("batchSize") Optional<Integer> batchSize,
@Parameter(PARAM_BATCH_SIZE) Optional<Integer> batchSize,
@Parameter("refreshQps") Optional<Integer> refreshQps,
Random random) {
this.response = response;
@@ -70,12 +70,6 @@ public class ToolsServerModule {
return extractRequiredParameter(req, "rawKeys");
}
@Provides
@Parameter("batchSize")
static Optional<Integer> provideBatchSize(HttpServletRequest req) {
return extractOptionalIntParameter(req, "batchSize");
}
@Provides
@Parameter("refreshQps")
static Optional<Integer> provideRefreshQps(HttpServletRequest req) {
@@ -19,6 +19,7 @@ import com.beust.jcommander.Parameters;
import java.io.IOException;
import java.nio.file.Path;
import org.flywaydb.core.Flyway;
import org.flywaydb.database.postgresql.PostgreSQLConfigurationExtension;
import org.testcontainers.containers.Container;
/**
@@ -50,6 +51,10 @@ public class DumpGoldenSchemaCommand extends PostgresqlCommand {
postgresContainer.getUsername(),
postgresContainer.getPassword())
.load();
PostgreSQLConfigurationExtension configurationExtension =
flyway.getConfigurationExtension(PostgreSQLConfigurationExtension.class);
configurationExtension.setTransactionalLock(false);
flyway.migrate();
String userName = postgresContainer.getUsername();
@@ -17,6 +17,7 @@ package google.registry.batch;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
import static google.registry.model.EppResourceUtils.loadByForeignKey;
import static google.registry.model.domain.rgp.GracePeriodStatus.ADD;
import static google.registry.testing.DatabaseHelper.assertDomainDnsRequests;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.loadByEntitiesIfPresent;
@@ -37,6 +38,7 @@ import google.registry.model.billing.BillingBase.Reason;
import google.registry.model.billing.BillingEvent;
import google.registry.model.domain.Domain;
import google.registry.model.domain.DomainHistory;
import google.registry.model.domain.GracePeriod;
import google.registry.model.poll.PollMessage;
import google.registry.model.reporting.HistoryEntry;
import google.registry.model.tld.Tld;
@@ -92,11 +94,7 @@ class DeleteProberDataActionTest {
}
private void resetAction() {
action = new DeleteProberDataAction();
action.isDryRun = false;
action.tlds = ImmutableSet.of();
action.registryAdminRegistrarId = "TheRegistrar";
// RegistryEnvironment.SANDBOX.setup(systemPropertyExtension);
action = new DeleteProberDataAction(false, ImmutableSet.of(), Optional.empty(), "TheRegistrar");
}
@AfterEach
@@ -119,6 +117,19 @@ class DeleteProberDataActionTest {
assertAllAbsent(oaEntities);
}
@Test
void test_deletesAllInBatches() throws Exception {
// Persist 40 domains
Set<ImmutableObject> ibEntities = persistLotsOfDomains("ib-any.test");
Set<ImmutableObject> oaEntities = persistLotsOfDomains("oa-canary.test");
// Create action with batch size of 3
DeleteProberDataAction batchedAction =
new DeleteProberDataAction(false, ImmutableSet.of(), Optional.of(3), "TheRegistrar");
batchedAction.run();
assertAllAbsent(ibEntities);
assertAllAbsent(oaEntities);
}
@Test
void testSuccess_deletesAllAndOnlyGivenTlds() throws Exception {
Set<ImmutableObject> tldEntities = persistLotsOfDomains("tld");
@@ -303,12 +314,22 @@ class DeleteProberDataActionTest {
.setRegistrarId("TheRegistrar")
.setMsg("Domain registered")
.build());
GracePeriod gracePeriod =
persistSimpleResource(
GracePeriod.create(
ADD,
domain.getRepoId(),
DELETION_TIME.plusDays(5),
"TheRegistrar",
billingEvent.createVKey()));
domain = persistResource(domain.asBuilder().addGracePeriod(gracePeriod).build());
ImmutableSet.Builder<ImmutableObject> builder =
new ImmutableSet.Builder<ImmutableObject>()
.add(domain)
.add(historyEntry)
.add(billingEvent)
.add(pollMessage);
.add(pollMessage)
.add(gracePeriod);
return builder.build();
}
@@ -15,13 +15,18 @@
package google.registry.bsa;
import static com.google.common.base.Throwables.getStackTraceAsString;
import static com.google.common.collect.ImmutableMap.toImmutableMap;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedListsToTld;
import static google.registry.bsa.ReservedDomainsTestingUtils.createReservedList;
import static google.registry.bsa.persistence.BsaTestingUtils.persistBsaLabel;
import static google.registry.bsa.persistence.BsaTestingUtils.persistDownloadSchedule;
import static google.registry.bsa.persistence.BsaTestingUtils.persistUnblockableDomain;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.persistActiveDomain;
import static google.registry.testing.DatabaseHelper.persistDeletedDomain;
import static google.registry.testing.DatabaseHelper.persistResource;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.startsWith;
@@ -43,13 +48,16 @@ import google.registry.bsa.persistence.BsaTestingUtils;
import google.registry.gcs.GcsUtils;
import google.registry.groups.GmailClient;
import google.registry.model.domain.Domain;
import google.registry.model.tld.label.ReservationType;
import google.registry.persistence.transaction.JpaTestExtensions;
import google.registry.persistence.transaction.JpaTestExtensions.JpaIntegrationWithCoverageExtension;
import google.registry.request.Response;
import google.registry.testing.FakeClock;
import google.registry.tldconfig.idn.IdnTableEnum;
import google.registry.util.EmailMessage;
import java.util.Optional;
import java.util.concurrent.Callable;
import java.util.stream.Stream;
import javax.mail.internet.InternetAddress;
import org.joda.time.DateTime;
import org.joda.time.Duration;
@@ -269,7 +277,7 @@ public class BsaValidateActionTest {
persistUnblockableDomain(UnblockableDomain.of("label", "app", Reason.REGISTERED));
when(idnChecker.getAllValidIdns(anyString())).thenReturn(ImmutableSet.of(IdnTableEnum.JA));
assertThat(action.checkUnblockableDomains()).isEmpty();
assertThat(action.checkWronglyReportedUnblockableDomains()).isEmpty();
}
@Test
@@ -280,10 +288,75 @@ public class BsaValidateActionTest {
persistUnblockableDomain(UnblockableDomain.of("label", "app", Reason.RESERVED));
when(idnChecker.getAllValidIdns(anyString())).thenReturn(ImmutableSet.of(IdnTableEnum.JA));
assertThat(action.checkUnblockableDomains())
assertThat(action.checkWronglyReportedUnblockableDomains())
.containsExactly("label.app: should be REGISTERED, found RESERVED");
}
@Test
void checkForMissingReservedUnblockables_success() {
persistResource(
createTld("app").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistResource(
createTld("dev").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistBsaLabel("registered-reserved");
persistBsaLabel("reserved-only");
persistBsaLabel("reserved-missing");
persistBsaLabel("invalid-in-app");
persistUnblockableDomain(UnblockableDomain.of("registered-reserved", "app", Reason.REGISTERED));
persistUnblockableDomain(UnblockableDomain.of("reserved-only", "app", Reason.RESERVED));
persistUnblockableDomain(UnblockableDomain.of("invalid-in-app", "dev", Reason.RESERVED));
createReservedList(
"rl",
Stream.of("registered-reserved", "reserved-only", "reserved-missing")
.collect(toImmutableMap(x -> x, x -> ReservationType.RESERVED_FOR_SPECIFIC_USE)));
addReservedListsToTld("app", ImmutableList.of("rl"));
ImmutableList<String> errors = action.checkForMissingReservedUnblockables(fakeClock.nowUtc());
assertThat(errors)
.containsExactly("Missing unblockable domain: reserved-missing.app is reserved.");
}
@Test
void checkForMissingReservedUnblockablesInOneTld_success() {
persistResource(
createTld("app").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistResource(
createTld("dev").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistBsaLabel("reserved-missing-in-app");
persistUnblockableDomain(
UnblockableDomain.of("reserved-missing-in-app", "dev", Reason.REGISTERED));
createReservedList(
"rl",
Stream.of("reserved-missing-in-app")
.collect(toImmutableMap(x -> x, x -> ReservationType.RESERVED_FOR_SPECIFIC_USE)));
addReservedListsToTld("app", ImmutableList.of("rl"));
addReservedListsToTld("dev", ImmutableList.of("rl"));
ImmutableList<String> errors = action.checkForMissingReservedUnblockables(fakeClock.nowUtc());
assertThat(errors)
.containsExactly("Missing unblockable domain: reserved-missing-in-app.app is reserved.");
}
@Test
void checkForMissingRegisteredUnblockables_success() {
persistResource(
createTld("app").asBuilder().setBsaEnrollStartTime(Optional.of(START_OF_TIME)).build());
persistBsaLabel("registered");
persistBsaLabel("registered-missing");
persistUnblockableDomain(UnblockableDomain.of("registered", "app", Reason.REGISTERED));
persistUnblockableDomain(UnblockableDomain.of("registered-missing", "app", Reason.RESERVED));
persistActiveDomain("registered.app");
persistActiveDomain("registered-missing.app");
ImmutableList<String> errors = action.checkForMissingRegisteredUnblockables(fakeClock.nowUtc());
assertThat(errors)
.containsExactly(
"Registered domain registered-missing.app missing or not recorded as REGISTERED");
}
@Test
void notificationSent_cannotAcquireLock() {
when(bsaLock.executeWithLock(any())).thenReturn(false);
@@ -21,18 +21,22 @@ import static google.registry.bsa.persistence.Queries.batchReadBsaLabelText;
import static google.registry.bsa.persistence.Queries.deleteBsaLabelByLabels;
import static google.registry.bsa.persistence.Queries.queryBsaLabelByLabels;
import static google.registry.bsa.persistence.Queries.queryBsaUnblockableDomainByLabels;
import static google.registry.bsa.persistence.Queries.queryMissedRegisteredUnblockables;
import static google.registry.bsa.persistence.Queries.queryNewlyCreatedDomains;
import static google.registry.bsa.persistence.Queries.queryUnblockablesByNames;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.testing.DatabaseHelper.createTlds;
import static google.registry.testing.DatabaseHelper.newDomain;
import static google.registry.testing.DatabaseHelper.persistActiveDomain;
import static google.registry.testing.DatabaseHelper.persistDomainAsDeleted;
import static google.registry.testing.DatabaseHelper.persistNewRegistrar;
import static google.registry.testing.DatabaseHelper.persistResource;
import static google.registry.util.DateTimeUtils.END_OF_TIME;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import google.registry.bsa.api.UnblockableDomain;
import google.registry.bsa.persistence.BsaUnblockableDomain.Reason;
import google.registry.bsa.persistence.Queries.DomainLifeSpan;
import google.registry.persistence.transaction.JpaTestExtensions;
import google.registry.persistence.transaction.JpaTestExtensions.JpaIntegrationWithCoverageExtension;
import google.registry.testing.FakeClock;
@@ -200,16 +204,14 @@ class QueriesTest {
createTlds("tld");
persistNewRegistrar("TheRegistrar");
// time 0:
persistResource(
newDomain("d1.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d1.tld", fakeClock.nowUtc());
// time 0, deletion time 1
persistDomainAsDeleted(
newDomain("will-delete.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build(),
fakeClock.nowUtc().plusMillis(1));
fakeClock.advanceOneMilli();
// time 1
persistResource(
newDomain("d2.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d2.tld", fakeClock.nowUtc());
fakeClock.advanceOneMilli();
// Now is time 2
assertThat(
@@ -226,16 +228,14 @@ class QueriesTest {
createTlds("tld");
persistNewRegistrar("TheRegistrar");
// time 0:
persistResource(
newDomain("d1.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d1.tld", fakeClock.nowUtc());
// time 0, deletion time 1
persistDomainAsDeleted(
newDomain("will-delete.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build(),
fakeClock.nowUtc().plusMillis(1));
fakeClock.advanceOneMilli();
// time 1
persistResource(
newDomain("d2.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d2.tld", fakeClock.nowUtc());
fakeClock.advanceOneMilli();
// Now is time 2, ask for domains created since time 1
assertThat(
@@ -251,10 +251,8 @@ class QueriesTest {
DateTime testStartTime = fakeClock.nowUtc();
createTlds("tld", "tld2");
persistNewRegistrar("TheRegistrar");
persistResource(
newDomain("d1.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistResource(
newDomain("d2.tld2").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build());
persistActiveDomain("d1.tld", fakeClock.nowUtc());
persistActiveDomain("d2.tld2", fakeClock.nowUtc());
fakeClock.advanceOneMilli();
assertThat(
bsaQuery(
@@ -263,4 +261,38 @@ class QueriesTest {
ImmutableList.of("tld"), testStartTime, fakeClock.nowUtc())))
.containsExactly("d1.tld");
}
@Test
void queryMissedRegisteredUnblockables_success() {
createTlds("tld", "tld2");
persistNewRegistrar("TheRegistrar");
DateTime time1 = fakeClock.nowUtc();
persistActiveDomain("unblocked1.tld", fakeClock.nowUtc());
persistActiveDomain("unblocked2.tld2", fakeClock.nowUtc());
persistActiveDomain("label1.tld", fakeClock.nowUtc());
persistActiveDomain("label2.tld2", fakeClock.nowUtc());
fakeClock.advanceOneMilli();
DateTime time2 = fakeClock.nowUtc();
persistDomainAsDeleted(
newDomain("label3.tld").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build(),
fakeClock.nowUtc().plusMillis(1));
// Deleted in the future
persistDomainAsDeleted(
newDomain("label3.tld2").asBuilder().setCreationTimeForTest(fakeClock.nowUtc()).build(),
fakeClock.nowUtc().plusHours(1));
fakeClock.advanceOneMilli();
assertThat(bsaQuery(() -> queryMissedRegisteredUnblockables("tld", fakeClock.nowUtc())))
.containsExactly(new DomainLifeSpan("label1.tld", time1, END_OF_TIME));
assertThat(bsaQuery(() -> queryMissedRegisteredUnblockables("tld2", fakeClock.nowUtc())))
.containsExactly(
new DomainLifeSpan("label2.tld2", time1, END_OF_TIME),
new DomainLifeSpan("label3.tld2", time2, time2.plusHours(1)));
BsaTestingUtils.persistUnblockableDomain(
UnblockableDomain.of("label2", "tld2", UnblockableDomain.Reason.REGISTERED));
BsaTestingUtils.persistUnblockableDomain(
UnblockableDomain.of("label3", "tld2", UnblockableDomain.Reason.RESERVED));
assertThat(bsaQuery(() -> queryMissedRegisteredUnblockables("tld2", fakeClock.nowUtc())))
.containsExactly(new DomainLifeSpan("label3.tld2", time2, time2.plusHours(1)));
}
}
+4 -1
View File
@@ -147,6 +147,9 @@ publishing {
flyway {
def accessInfo = project.ext.getJdbcAccessInfo()
pluginConfiguration = [
postgresqlTransactionalLock: 'false'
]
url = accessInfo.url
user = accessInfo.user
@@ -160,7 +163,7 @@ dependencies {
def deps = rootProject.dependencyMap
implementation deps['org.flywaydb:flyway-core']
runtimeOnly deps['org.flywaydb:flyway-database-postgresql']
implementation deps['org.flywaydb:flyway-database-postgresql']
runtimeOnly deps['com.google.cloud.sql:postgres-socket-factory']
runtimeOnly deps['org.postgresql:postgresql']
+2 -2
View File
@@ -91,7 +91,7 @@ org.checkerframework:checker-qual:3.12.0=checkstyle
org.checkerframework:checker-qual:3.33.0=annotationProcessor,errorprone,testAnnotationProcessor
org.checkerframework:checker-qual:3.42.0=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath
org.jacoco:org.jacoco.agent:0.8.11=jacocoAgent,jacocoAnt
org.jacoco:org.jacoco.ant:0.8.11=jacocoAnt
@@ -113,7 +113,7 @@ org.ow2.asm:asm-tree:9.6=jacocoAnt
org.ow2.asm:asm:9.2=deploy_jar,runtimeClasspath
org.ow2.asm:asm:9.6=jacocoAnt,testCompileClasspath,testRuntimeClasspath
org.pcollections:pcollections:3.1.4=annotationProcessor,errorprone,testAnnotationProcessor
org.postgresql:postgresql:42.7.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.reflections:reflections:0.10.2=checkstyle
org.rnorth.duct-tape:duct-tape:1.0.8=testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:1.7.36=testCompileClasspath
@@ -261,11 +261,11 @@ td.section {
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2024-03-11 20:42:54.463293864</td>
<td class="property_value">2024-03-28 21:10:10.784013213</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
<td id="lastFlywayFile" class="property_value">V164__rename_console_user_history_time.sql</td>
<td id="lastFlywayFile" class="property_value">V166__drop_should_publish_column.sql</td>
</tr>
</tbody>
</table>
@@ -280,7 +280,7 @@ td.section {
<text text-anchor="start" x="3730.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text>
<text text-anchor="start" x="3813.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 16.10.1</text>
<text text-anchor="start" x="3729.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text>
<text text-anchor="start" x="3813.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-03-11 20:42:54.463293864</text>
<text text-anchor="start" x="3813.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-03-28 21:10:10.784013213</text>
<polygon fill="none" stroke="#888888" points="3726,-4 3726,-44 4013,-44 4013,-4 3726,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
<title>
@@ -261,11 +261,11 @@ td.section {
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2024-03-11 20:42:51.738018408</td>
<td class="property_value">2024-03-28 21:10:08.34519385</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
<td id="lastFlywayFile" class="property_value">V164__rename_console_user_history_time.sql</td>
<td id="lastFlywayFile" class="property_value">V166__drop_should_publish_column.sql</td>
</tr>
</tbody>
</table>
@@ -277,11 +277,11 @@ td.section {
SchemaCrawler_Diagram
</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-9310 4738,-9310 4738,4 -4,4" />
<text text-anchor="start" x="4443.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text>
<text text-anchor="start" x="4526.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 16.10.1</text>
<text text-anchor="start" x="4442.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text>
<text text-anchor="start" x="4526.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-03-11 20:42:51.738018408</text>
<polygon fill="none" stroke="#888888" points="4439,-4 4439,-44 4726,-44 4726,-4 4439,-4" /> <!-- allocationtoken_a08ccbef -->
<text text-anchor="start" x="4450" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text>
<text text-anchor="start" x="4533" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 16.10.1</text>
<text text-anchor="start" x="4449" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text>
<text text-anchor="start" x="4533" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-03-28 21:10:08.34519385</text>
<polygon fill="none" stroke="#888888" points="4446,-4 4446,-44 4726,-44 4726,-4 4446,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
<title>
allocationtoken_a08ccbef
@@ -3882,10 +3882,7 @@ td.section {
<text text-anchor="start" x="3684.5" y="-8699.3" font-family="Helvetica,sans-Serif" font-size="14.00">name</text>
<text text-anchor="start" x="3808.5" y="-8699.3" font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
<text text-anchor="start" x="3817.5" y="-8699.3" font-family="Helvetica,sans-Serif" font-size="14.00">text not null</text>
<text text-anchor="start" x="3684.5" y="-8680.3" font-family="Helvetica,sans-Serif" font-size="14.00">should_publish</text>
<text text-anchor="start" x="3808.5" y="-8680.3" font-family="Helvetica,sans-Serif" font-size="14.00"> </text>
<text text-anchor="start" x="3817.5" y="-8680.3" font-family="Helvetica,sans-Serif" font-size="14.00">bool</text>
<polygon fill="none" stroke="#888888" points="3681,-8673.5 3681,-8789.5 3942,-8789.5 3942,-8673.5 3681,-8673.5" />
<polygon fill="none" stroke="#888888" points="3681,-8693 3681,-8790 3942,-8790 3942,-8693 3681,-8693" />
</g> <!-- reservedentry_1a7b8520&#45;&gt;reservedlist_b97c3f1c -->
<g id="edge81" class="edge">
<title>
@@ -8671,6 +8668,18 @@ td.section {
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">idx69qun5kxt3eux5igrxrqcycv0</td>
<td class="description right">[non-unique index]</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">domain_history_domain_repo_id</td>
<td class="minwidth">ascending</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">ukt2e7ae3t8gcsxd13wjx2ka7ij</td>
<td class="description right">[unique index]</td>
@@ -10253,6 +10262,18 @@ td.section {
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">idxf2q9dqj899h1q8lah5y719nxd</td>
<td class="description right">[non-unique index]</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">domain_repo_id</td>
<td class="minwidth">ascending</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">idxe7wu46c7wpvfmfnj4565abibp</td>
<td class="description right">[non-unique index]</td>
@@ -12210,11 +12231,6 @@ td.section {
<td class="minwidth">name</td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">should_publish</td>
<td class="minwidth">bool</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
+2
View File
@@ -162,3 +162,5 @@ V161__rename_console_epp_history_time.sql
V162__rename_console_poc_history_time.sql
V163__rename_console_registrar_history_time.sql
V164__rename_console_user_history_time.sql
V165__add_domain_repo_id_indexes_to_more_tables.sql
V166__drop_should_publish_column.sql
@@ -0,0 +1,16 @@
-- Copyright 2024 The Nomulus Authors. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
CREATE INDEX CONCURRENTLY IF NOT EXISTS IDX69qun5kxt3eux5igrxrqcycv0 ON "DomainHistoryHost" (domain_history_domain_repo_id);
CREATE INDEX CONCURRENTLY IF NOT EXISTS IDXf2q9dqj899h1q8lah5y719nxd ON "PollMessage" (domain_repo_id);
@@ -0,0 +1,15 @@
-- Copyright 2024 The Nomulus Authors. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
alter table "ReservedList" drop column should_publish;
@@ -848,6 +848,7 @@ create index IDXrh4xmrot9bd63o382ow9ltfig on "DomainHistory" (creation_time);
create index IDXaro1omfuaxjwmotk3vo00trwm on "DomainHistory" (history_registrar_id);
create index IDXsu1nam10cjes9keobapn5jvxj on "DomainHistory" (history_type);
create index IDX6w3qbtgce93cal2orjg1tw7b7 on "DomainHistory" (history_modification_time);
create index IDX69qun5kxt3eux5igrxrqcycv0 on "DomainHistoryHost" (domain_history_domain_repo_id);
alter table if exists "DomainHistoryHost"
add constraint UKt2e7ae3t8gcsxd13wjx2ka7ij unique (domain_history_history_revision_id, domain_history_domain_repo_id, host_repo_id);
@@ -869,6 +870,7 @@ create index IDXkkwbwcwvrdkkqothkiye4jiff on "HostHistory" (host_name);
create index IDXknk8gmj7s47q56cwpa6rmpt5l on "HostHistory" (history_type);
create index IDX67qwkjtlq5q8dv6egtrtnhqi7 on "HostHistory" (history_modification_time);
create index IDXlg6a5tp70nch9cp0gc11brc5o on "PackagePromotion" (token);
create index IDXf2q9dqj899h1q8lah5y719nxd on "PollMessage" (domain_repo_id);
create index IDXe7wu46c7wpvfmfnj4565abibp on "PollMessage" (registrar_id);
create index IDXaydgox62uno9qx8cjlj5lauye on "PollMessage" (event_time);
create index premiumlist_name_idx on "PremiumList" (name);
@@ -1129,8 +1129,7 @@ CREATE TABLE public."ReservedEntry" (
CREATE TABLE public."ReservedList" (
revision_id bigint NOT NULL,
creation_timestamp timestamp with time zone NOT NULL,
name text NOT NULL,
should_publish boolean
name text NOT NULL
);
@@ -1961,6 +1960,13 @@ CREATE INDEX idx5yqacw829y5bm6f7eajsq1cts ON public."UserUpdateHistory" USING bt
CREATE INDEX idx67qwkjtlq5q8dv6egtrtnhqi7 ON public."HostHistory" USING btree (history_modification_time);
--
-- Name: idx69qun5kxt3eux5igrxrqcycv0; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idx69qun5kxt3eux5igrxrqcycv0 ON public."DomainHistoryHost" USING btree (domain_history_domain_repo_id);
--
-- Name: idx6ebt3nwk5ocvnremnhnlkl6ff; Type: INDEX; Schema: public; Owner: -
--
@@ -2129,6 +2135,13 @@ CREATE INDEX idxe7wu46c7wpvfmfnj4565abibp ON public."PollMessage" USING btree (r
CREATE INDEX idxeokttmxtpq2hohcioe5t2242b ON public."BillingCancellation" USING btree (registrar_id);
--
-- Name: idxf2q9dqj899h1q8lah5y719nxd; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idxf2q9dqj899h1q8lah5y719nxd ON public."PollMessage" USING btree (domain_repo_id);
--
-- Name: idxfdk2xpil2x1gh0omt84k2y3o1; Type: INDEX; Schema: public; Owner: -
--
@@ -26,6 +26,7 @@ import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import org.flywaydb.core.Flyway;
import org.flywaydb.database.postgresql.PostgreSQLConfigurationExtension;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
@@ -92,6 +93,10 @@ class SchemaTest {
sqlContainer.getJdbcUrl(), sqlContainer.getUsername(), sqlContainer.getPassword())
.load();
PostgreSQLConfigurationExtension configurationExtension =
flyway.getConfigurationExtension(PostgreSQLConfigurationExtension.class);
configurationExtension.setTransactionalLock(false);
// flyway.migrate() returns the number of newly pushed scripts. This is a variable
// number as our schema evolves.
assertThat(flyway.migrate().migrations).isNotEmpty();
@@ -123,6 +128,10 @@ class SchemaTest {
.dataSource(
sqlContainer.getJdbcUrl(), sqlContainer.getUsername(), sqlContainer.getPassword())
.load();
PostgreSQLConfigurationExtension configurationExtension =
flyway.getConfigurationExtension(PostgreSQLConfigurationExtension.class);
configurationExtension.setTransactionalLock(false);
flyway.migrate();
logger.atInfo().log("Base schema version: %s", flyway.info().current().getVersion());
@@ -133,6 +142,9 @@ class SchemaTest {
.dataSource(
sqlContainer.getJdbcUrl(), sqlContainer.getUsername(), sqlContainer.getPassword())
.load();
configurationExtension =
flyway.getConfigurationExtension(PostgreSQLConfigurationExtension.class);
configurationExtension.setTransactionalLock(false);
flyway.migrate();
flyway.validate();
logger.atInfo().log("Latest schema version: %s", flyway.info().current().getVersion());
+1 -1
View File
@@ -1,4 +1,4 @@
# This file defines properties used by the gradle build. It must be kept in
# This file defines properties used by the gradle build. It must be kept in
# sync with config/nom_build.py.
#
# To regenerate, run ./nom_build --generate-gradle-properties
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+10 -10
View File
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
+2 -1
View File
@@ -324,6 +324,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=deploy_jar,runtimeClasspath,testR
org.codehaus.mojo:animal-sniffer-annotations:1.23=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.conscrypt:conscrypt-openjdk-uber:2.5.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -366,7 +367,7 @@ org.ow2.asm:asm-tree:9.6=jacocoAnt
org.ow2.asm:asm-util:7.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.6=deploy_jar,jacocoAnt,runtimeClasspath,testRuntimeClasspath
org.pcollections:pcollections:3.1.4=annotationProcessor,errorprone,testAnnotationProcessor
org.postgresql:postgresql:42.7.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.reflections:reflections:0.10.2=checkstyle
org.rnorth.duct-tape:duct-tape:1.0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.1.0-alpha1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -50,7 +50,7 @@ import javax.persistence.Converter;
/** Processor to generate {@link AttributeConverter} for {@code VKey} type. */
@SupportedAnnotationTypes("google.registry.persistence.WithVKey")
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedSourceVersion(SourceVersion.RELEASE_21)
public class VKeyProcessor extends AbstractProcessor {
private static final String CONVERTER_CLASS_NAME_TEMP = "VKeyConverter_%s";
+2 -1
View File
@@ -78,7 +78,8 @@ if ! pgrep cloud_sql_proxy; then
exit 1
fi
/flyway/flyway -community -user=${db_user} -password=${db_password} \
/flyway/flyway -postgresql.transactional.lock=false -community \
-user=${db_user} -password=${db_password} \
-url=jdbc:postgresql://localhost:5432/postgres \
-locations=classpath:sql/flyway \
${flyway_action}
+2 -1
View File
@@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -338,7 +339,7 @@ org.ow2.asm:asm-tree:9.2=compileClasspath,runtimeClasspath,testCompileClasspath,
org.ow2.asm:asm-util:7.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.2=compileClasspath,testCompileClasspath
org.ow2.asm:asm:9.6=runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-jdk14:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+2 -1
View File
@@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -338,7 +339,7 @@ org.ow2.asm:asm-tree:9.2=compileClasspath,runtimeClasspath,testCompileClasspath,
org.ow2.asm:asm-util:7.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.2=compileClasspath,testCompileClasspath
org.ow2.asm:asm:9.6=runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-jdk14:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+2 -1
View File
@@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -338,7 +339,7 @@ org.ow2.asm:asm-tree:9.2=compileClasspath,runtimeClasspath,testCompileClasspath,
org.ow2.asm:asm-util:7.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.2=compileClasspath,testCompileClasspath
org.ow2.asm:asm:9.6=runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-jdk14:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+2 -1
View File
@@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -338,7 +339,7 @@ org.ow2.asm:asm-tree:9.2=compileClasspath,runtimeClasspath,testCompileClasspath,
org.ow2.asm:asm-util:7.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.2=compileClasspath,testCompileClasspath
org.ow2.asm:asm:9.6=runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-jdk14:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+2 -1
View File
@@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -338,7 +339,7 @@ org.ow2.asm:asm-tree:9.2=compileClasspath,runtimeClasspath,testCompileClasspath,
org.ow2.asm:asm-util:7.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.2=compileClasspath,testCompileClasspath
org.ow2.asm:asm:9.6=runtimeClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.postgresql:postgresql:42.7.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-jdk14:2.1.0-alpha1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath