mirror of
https://github.com/google/nomulus
synced 2026-09-29 11:15:45 +00:00
Send a plaintext link to the mapreduce console in fluent style
The link was previously being sent using a JS redirect, which doesn't work because the endpoints that trigger mapreduces can only be hit from the command line (because they require auth). This commit switches the link to be in plaintext and renders the full URL instead of just the path, so that clicking it directly from the terminal works. This also improves how these links are sent from callsites by using a fluent style. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228764606
This commit is contained in:
@@ -16,7 +16,6 @@ package google.registry.rde.imports;
|
||||
|
||||
import static google.registry.mapreduce.MapreduceRunner.PARAM_MAP_SHARDS;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.util.PipelineUtils.createJobPath;
|
||||
|
||||
import com.google.appengine.tools.cloudstorage.GcsService;
|
||||
import com.google.appengine.tools.cloudstorage.GcsServiceFactory;
|
||||
@@ -77,12 +76,13 @@ public class RdeHostImportAction implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
response.sendJavaScriptRedirect(createJobPath(mrRunner
|
||||
mrRunner
|
||||
.setJobName("Import hosts from escrow file")
|
||||
.setModuleName("backend")
|
||||
.runMapOnly(
|
||||
new RdeHostImportMapper(importBucketName),
|
||||
ImmutableList.of(new RdeHostInput(mapShards, importBucketName, importFileName)))));
|
||||
ImmutableList.of(new RdeHostInput(mapShards, importBucketName, importFileName)))
|
||||
.sendLinkToMapreduceConsole(response);
|
||||
}
|
||||
|
||||
/** Mapper to import hosts from an escrow file. */
|
||||
|
||||
Reference in New Issue
Block a user