private Key getErrorKey(UUID jobId, String errorId) {
    // Use the main job as the ancestor to all the errors, see:
    // https://cloud.google.com/datastore/docs/concepts/entities#ancestor_paths
    return datastore
        .newKeyFactory()
        .setKind(ERROR_KIND)
        .addAncestor(PathElement.of(JOB_KIND, jobId.toString()))
        .newKey(errorId);
  }
Finds the ID of the first {@link PortabilityJob} in state {@code jobState} in Datastore, or
null if none found.

<p>TODO(rtannenbaum): Order by creation time so we can process jobs in a FIFO manner. Trying to
OrderBy.asc("created") currently fails because we don't yet have an index set up.
extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleJobStore.java