Commit graph

1577 commits

Author SHA1 Message Date
mcilwain
ccbdfd0e41 Switch pubapi/default service to basic scaling in prod/sandbox
Also goes back up to 100 max instances.

Hopefully this'll work better this time.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204783809
2018-07-17 22:01:08 -04:00
mcilwain
8942c4fad1 Fix add/remove calculations when updating multiple domains
Lists used as accumulators were being updated individually for each domain
without starting over from a fresh list each time, so the number of changes
would grow for each additional domain and potentially be wrong if the previous
domains were set up differently.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204526006
2018-07-14 01:37:03 -04:00
mcilwain
278ec2b289 Pretty-print actual XML in tests
This means that, when writing new tests that are failing, you get much more
useful logs that show the actual XML in a more comprehensible format that is
suitable for pasting back into the golden file in the test (if the change was
intended).

This requires outputting the standalone parameter in the XML transformer, and
some minor changes to some tests as a result that were relying on it being
stripped out.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204513690
2018-07-14 01:37:03 -04:00
mcilwain
df5d9957f7 Move the AllocationToken entity to the token subpackage
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204485366
2018-07-14 01:37:03 -04:00
jianglai
35110927d6 Add configs for production GCP proxy
This also introduces a production canary environment, similar to sandbox canary. The docker tags are changed to "live" and "sandbox" respectively, to reflect the fact that different images may be used for prod and sandbox.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204343530
2018-07-14 01:37:03 -04:00
guyben
a00cb2237a Remove transition code for set of parameter refactoring
None of the logged warnings happened in the last week.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204307010
2018-07-14 01:37:03 -04:00
jianglai
badda1d407 Format .bzl files with buildifier
This is a part of a large-scale change: [] . All .bzl files are being formatted with buildifier.

To format a file manually run `buildifier path/to/file.bzl`. Integration with `g4 fix` will be available later, but you can try using `g4 fix --format=bzl`.
Tested:
    tap_presubmit
    Some tests failed; test failures are believed to be unrelated to this CL

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204137752
2018-07-14 01:37:03 -04:00
weiminyu
7f0665783b Fix mismatched parenthesis in domain.soy
The code stopped working after a recent soy-to-js compiler change.
Impacts include:
- The /registrar#domain page only shows part of the contents.
- RegistrarConsoleScreenshotTest times out.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204135349
2018-07-14 01:37:03 -04:00
jianglai
0223cea8cc Format .bzl files with buildifier
This is a part of a large-scale change: [] . All .bzl files are being formatted with buildifier.

To format a file manually run `buildifier path/to/file.bzl`. Integration with `g4 fix` will be available later, but you can try using `g4 fix --format=bzl`.

Tested:
    tap_presubmit
    Some tests failed; test failures are believed to be unrelated to this CL

BEGIN_PUBLIC
Format .bzl files with buildifier
END_PUBLIC

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203461813
2018-07-14 01:37:03 -04:00
mcilwain
390939815a Add ResaveEntityAction to BackendRequestComponent
The action isn't routable (i.e. it doesn't work) unless this is specified.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203020503
2018-07-14 01:37:03 -04:00
mcilwain
32b3563126 Delete all Braintree code
We never launched this, don't planning on launching it now anyway, and it's rotted over the past two years anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202993577
2018-07-14 01:37:03 -04:00
mcilwain
7023b818b7 Enqueue async re-saves with additional future re-saves
Async tasks will now re-enqueue themselves after completion if there are
additional pending future actions. This allows all parts of domain delete flows
to be successfully re-saved as the parts happen, without going past the maximum
allowed 30 day task ETA limit. The first task runs at 30 days out when the
redemption grace period ends, and that task then enqueues another task to run 5
more days in the future, when the deletion is final and the pending delete
status gets removed.

No data migration plan is necessary because future resaves defaults to empty,
and indeed will always be empty on transfers. So previously enqueued tasks will
still be valid.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202949677
2018-07-14 01:37:03 -04:00
mcilwain
a4e99b18e2 Clean up internal imports in BUILD files
This removes the following unnecessary imports:

//third_party/java_src/gtld/java/google/registry/bigquery
//third_party/java_src/gtld/java/google/registry/config
//third_party/java_src/gtld/java/google/registry/cron
//third_party/java_src/gtld/java/google/registry/dns
//third_party/java_src/gtld/java/google/registry/gcs
//third_party/java_src/gtld/java/google/registry/mapreduce
//third_party/java_src/gtld/java/google/registry/model
//third_party/java_src/gtld/java/google/registry/module/backend
//third_party/java_src/gtld/java/google/registry/module/frontend
//third_party/java_src/gtld/java/google/registry/module/pubapi
//third_party/java_src/gtld/java/google/registry/module/tools
//third_party/java_src/gtld/java/google/registry/request
//third_party/java_src/gtld/java/google/registry/security
//third_party/java_src/gtld/java/google/registry/ui/soy/registrar:soy_java_wrappers
//third_party/java_src/gtld/java/google/registry/util
//third_party/java_src/gtld/java/google/registry/xjc
//third_party/java_src/gtld/javatests/google/registry/model
//third_party/java_src/gtld/javatests/google/registry/testing
//third_party/java_src/gtld/javatests/google/registry/testing/mapreduce

The exact command run to generate this CL was:

build_cleaner '//third_party/java_src/gtld/...' -c '' --dep_restrictions='//third_party/java_src/gtld/java/google/registry/bigquery,//third_party/java_src/gtld/java/google/registry/config,//third_party/java_src/gtld/java/google/registry/cron,//third_party/java_src/gtld/java/google/registry/dns,//third_party/java_src/gtld/java/google/registry/gcs,//third_party/java_src/gtld/java/google/registry/mapreduce,//third_party/java_src/gtld/java/google/registry/model,//third_party/java_src/gtld/java/google/registry/module/backend,//third_party/java_src/gtld/java/google/registry/module/frontend,//third_party/java_src/gtld/java/google/registry/module/pubapi,//third_party/java_src/gtld/java/google/registry/module/tools,//third_party/java_src/gtld/java/google/registry/request,//third_party/java_src/gtld/java/google/registry/security,//third_party/java_src/gtld/java/google/registry/ui/soy/registrar:soy_java_wrappers,//third_party/java_src/gtld/java/google/registry/util,//third_party/java_src/gtld/java/google/registry/xjc,//third_party/java_src/gtld/javatests/google/registry/model,//third_party/java_src/gtld/javatests/google/registry/testing,//third_party/java_src/gtld/javatests/google/registry/testing/mapreduce'

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202652421
2018-07-14 01:37:03 -04:00
mcilwain
513f2ad72e Export Weimin as author of commits to GitHub
Also adds Guy to list of CONTRIBUTORS and removes Xooglers (who definitely won't be contributing more code).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202476218
2018-07-14 01:37:03 -04:00
mcilwain
bb1b4bc0d4 Clean up third_party imports in BUILD files
This removes the following unnecessary imports:

//third_party/java/activation
//third_party/java/bouncycastle
//third_party/java/bouncycastle_bcpg
//third_party/java/dagger
//third_party/java/dnsjava
//third_party/java/jaxws_api
//third_party/java/jcommander
//third_party/java/joda_money
//third_party/java/joda_time
//third_party/java/json_simple
//third_party/java/junit
//third_party/java/mockito
//third_party/java/re2j
//third_party/java/servlet/servlet_api
//third_party/java/truth:truth8

The exact command run to generate this CL was:

build_cleaner '//third_party/java_src/gtld/...' -c '' --dep_restrictions='//third_party/java/activation,//third_party/java/bouncycastle,//third_party/java/bouncycastle_bcpg,//third_party/java/dagger,//third_party/java/dnsjava,//third_party/java/jaxws_api,//third_party/java/jcommander,//third_party/java/joda_money,//third_party/java/joda_time,//third_party/java/json_simple,//third_party/java/junit,//third_party/java/mockito,//third_party/java/re2j,//third_party/java/servlet/servlet_api,//third_party/java/truth:truth8'

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202344774
2018-07-14 01:11:51 -04:00
mcilwain
b5412adba9 Clean up Guava imports in BUILD files
This removes the following unnecessary imports:

[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]

The exact command run to generate this CL was:

build_cleaner '//third_party/java_src/gtld/...' -c '' --dep_restrictions='[],[],[],[],[],[],[],[],[],[],[],[],[],[]'

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202325520
2018-06-27 15:28:53 -04:00
mcilwain
43ed2cd7b3 Clean up annotation imports in BUILD files
This affects JSR305, JSR330, and Guava annotations.

The exact command run to generate this CL was:

build_cleaner '//third_party/java_src/gtld/...' -c '' --dep_restrictions='//third_party/java/jsr330_inject,//third_party/java/jsr305_annotations,[]'

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202322747
2018-06-27 15:28:53 -04:00
guyben
6ff48b7dae Simplify the Ghostryde API
First step of RDE encoding refactoring.

Creates a single InputStream (OutputStream) to decode (encode) Ghostryde files.
This replaces the 3 InputStreams (OutputStreams) that were needed before.

Also removes a lot of classes, and removes the "injection" of the Ghostryde
class. It's an encoding, there's no point in injecting it.

Finally, removed the buffer-size configuration and replaced with a static final
const value. It's just a buffer size - it doesn't actually affect much. There
are much more "important" fields that weren't configured (such as the
compression algorithm and whether or not to do integrity checks)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202319102
2018-06-27 15:28:53 -04:00
mcilwain
bee3d6a5a4 Fix BUILD glob rules to not include non-wildcarded paths
This is a Buildozer warning

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202311866
2018-06-27 15:28:53 -04:00
mcilwain
fb9d876bff Remove most HTML/CSS/JS assets from the backend service WAR
It only needs the error page HTML files; everything else isn't used by endpoints
served by the backend service and only serves to increase build times
(especially compiling all that JS).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202229514
2018-06-27 15:28:53 -04:00
mcilwain
892c1fc707 Update signed marks files and add an expiration test
We'll continue to use injected clocks for the rest of our tests that use signed marks files, so that they don't all fail after the current validity period. The new test TmchTestDataExpirationTest will let us know when the files are expired, so we can update them.

All updated test data files come from https://newgtlds.icann.org/en/about/trademark-clearinghouse/registries-registrars

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202208196
2018-06-27 15:28:53 -04:00
guyben
11c5d11a29 Re-enable the RdeUpload cronjob
RdeUpload works on alpha and sandbox by sending the data to a google internal
server. It is still running (and succeeding) after each RdeStaging, but the
lack of the cron job means it is currently lagging behind.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202181148
2018-06-27 15:28:53 -04:00
guyben
b4cb3e0a6f Inject clock for Tmch validity using InjectRule instead of manually
Basically a less patchy version of []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202138086
2018-06-27 15:28:53 -04:00
guyben
3550045636 Clean up Improved(Input|Output)Stream
Two main changes:

- Replaced getClass().getSimpleName() in the logs with a constructor-given name. Right now what we have is a lot of identical classes with slightly different names so that the logs would be different. With this change - we can later get rid of a lot of these classes and replace them with simple wrappers.

- Removed the "expected" feature. Only Tar uses it - and it can override onClose to do that (that's what it's there for!)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202129563
2018-06-27 15:28:53 -04:00
mcilwain
07aead3ca4 Increase RDAP unit test speed
There's no reason to have to create 2,500 simulated database entities for a single test (which makes it take a really long time). Better to just set the relevant limit to be lower for testing purposes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202120722
2018-06-27 15:28:53 -04:00
guyben
44c517f111 Set clock used to validate Tmch signature in tests
The signature has expired on Mon Jun 25 23:59:59 UTC 2018.

Instead of fixing all the test files with a new signed mark, we inject the
clock used to validate the signature.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202116721
2018-06-27 15:28:52 -04:00
mcilwain
4c7bc3b18c Improve internal build system speed
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202016862
2018-06-27 15:28:52 -04:00
mcilwain
ed910455b0 Add more absent clTrid unit tests
In RFC 5730, clTrid is specified as optional. We ran into an error earlier this
year in which a registrar was not passing a client transaction id and we didn't
handle it correctly. So, this CL adds some tests of common EPP operations verify
that they work correctly when the clTrid is not specified.

This also slightly improves some flow logic to make it more obvious at first
glance that clTrid is indeed optional.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202000845
2018-06-27 15:28:52 -04:00
mcilwain
6706b99828 Delete remnants of registrar-level credits
We never fully used this stuff but definitely no longer use it following our
recent billing refactor. It's confusing to retain all of these entities and
commands given that none of them are actually used by anything.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201978094
2018-06-27 15:28:52 -04:00
mcilwain
4cddbdacff Delete deprecated legacy SQL 'latest_snapshot' dataset
We've migrated everything over to using the standard SQL view now. The legacy
version is just causing confusion and costing us resources.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201966352
2018-06-27 15:28:52 -04:00
mcilwain
aa11d5681f Delete ancient registrar activity report command
We haven't used this in years and I doubt it's still even functional. It's using
the legacy BigQuery tables and the pre-Registry 2.0 schema, for starters.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201960046
2018-06-27 15:28:52 -04:00
mcilwain
d3364b0387 Migrate away from VoidWorks
This is one last hanging piece of work left over from last year's Java 8
migration. There's no functionality changes in this CL, just refactoring.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201947600
2018-06-27 15:28:52 -04:00
mcilwain
7d3cb3d426 Make our Clock util Serializable
It doesn't entirely make semantic sense, since the actual state of the
SystemClock isn't being preserved, but it makes injection into serializable
classes (e.g. mapreduces) much simpler, so it's worth doing.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201755949
2018-06-27 15:28:52 -04:00
mcilwain
481790bc91 Always display the registrar abuse contact fields in WHOIS
ICANN's Consistent Labeling & Display policy requires that these fields be
present for all domains. We're currently tracking down the last of the data on
our registrars so that we can display these, but if we don't have the data we
should still at least be displaying the field names to make it more clear that
we do support the field, we just don't have the data for this domain yet.

The two fields in question are:

Registrar Abuse Contact Email:
Registrar Abuse Contact Phone:

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201730290
2018-06-27 15:28:52 -04:00
mcilwain
8245d2f1c4 Make LockHandlerImpl.clock transient
SystemClock isn't Serializable (for obvious reasons), whereas LockHandlerImpl is
used as a field on some Serializable mapreduce classes. So mark it transient and
then re-generate it on first use following de-serialization when it happens to
be null.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201707209
2018-06-27 15:28:52 -04:00
Ben McIlwain
0422205d84 Start using non-EPP-flow-wrapping implementation in CheckAPI
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201620090
2018-06-27 15:28:52 -04:00
mcilwain
c8925555d4 Don't retry RDE upload tasks that have failed dependencies
New upload tasks are created every 4 hours, so if we're waiting on a 2 hour SFTP cooldown or some other long-running dependency like generating the RDE report, just delete this task and let it re-run at the next 4 hour period.  No need to let these tasks continue gumming up the queue.

Note that this method of throwing NoContentException to abort the task without enqueuing it for retry is already being used by RdeReportAction for the same purpose.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201372808
2018-06-27 15:28:52 -04:00
mcilwain
a5cc359813 Make nomulus list_cursors command faster by batching loads
They're all in the same entity group anyway (the cross-TLD one), so they can be
loaded in a single call instead of individually.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201364854
2018-06-27 15:28:52 -04:00
mcilwain
6f2e663b72 Add asynchronous scheduled actions to re-save entities
This is used in the domain transfer and delete flows, both of which are
asynchronous flows that have implicit default actions that will be taken at some
point in the future. This CL adds scheduled re-saves to take place soon after
those default actions would become effective, so that they can be re-saved
quickly if so.

Unfortunately the redemption grace period on our TLDs is 35 days, which exceeds
the 30 day maximum task ETA in App Engine, so these won't actually fire.  That's
fine though; the deletion is actually effective as of 5 days, and this is just
removing the grace period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201345274
2018-06-27 15:28:52 -04:00
mcilwain
87d1a1c2a3 Further increase the rde-upload queue processing rate
We're still limiting to a maximum of 5 concurrent uploads, but when we get backed up (i.e. because we broke RDE like we did recently), it makes sense to burn through the backlog faster once tasks are succeeding again.  As I'm going through the backlog now, 5/m isn't fast enough; 10/m seems right.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201284990
2018-06-27 15:28:52 -04:00
mcilwain
5689234fd2 Allow more RDE upload tasks to run simultaneously
We're currently facing a large backlog of RDE upload tasks, most of which won't
have anything to do when they execute (because the RDE deposit in question has
been successfully uploaded). And we're also facing the occasional >30 minute
timeout even though most uploads are succeeding in around a minute.

So this CL just lets more run simultaneously so that the backlog can be cleared
out faster.

Note that we still enforce locking on a per-TLD basis, so it won't be possible
for uploads to stomp over each other.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201257679
2018-06-27 15:28:52 -04:00
mcilwain
ad73f3d167 Remove more unnecessary "throws" declarations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201243722
2018-06-27 15:28:52 -04:00
mcilwain
47322b7fcd Periodically log transfer progress for RDE SFTP uploads
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201172975
2018-06-27 15:28:52 -04:00
mcilwain
8b263baefa Delete MultiplyingCloudDnsWriter
Now that the large zone re-signing test is complete, we no longer need it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199507075
2018-06-27 15:28:06 -04:00
mcilwain
5d80f124ca Remove unnecessary "throws" declarations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201058582
2018-06-18 18:17:56 -04:00
mcilwain
a7256f5edd Update KMS method signatures to standardize on KeyringException
It came up during the review of [] that it doesn't make a lot of sense
for encrypt() and decrypt() to not throw the same kinds of Exceptions,
especially not for the same kind of problem, just because one happens to use a
Retrier in its internal implementation and the other doesn't.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201054057
2018-06-18 18:16:35 -04:00
mcilwain
f971583dc0 Handle timeouts better in lock handler
Rather than just logging a generic TimeoutException, this will say what action
timed out and how long it had been executing for.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201049025
2018-06-18 18:15:11 -04:00
mcilwain
7a4a4ba3d5 Remove unused ShellCommand.JCommanderCompletor.getParamDoc()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201038811
2018-06-18 18:13:44 -04:00
mcilwain
03f8090886 Automated g4 rollback of changelist 199643208.
*** Reason for rollback ***

We suspect that this is breaking RDE more, so we're going to rollout a cherrypick of this reversion.

*** Original change description ***

Upload to GCS before uploading to FTP

Currently we encode and upload the deposite to GCS and the FTP server at the
same time. This makes debugging harder as there are many possible points of
failure, some of which are external and some internal.

In this CL we start by encoding + uploading the deposit to GCS, and once
that's done we copy the data from GCS to the FTP server. This will (hopefully)
allow us to distinguish between errors on the FTP server and errors with the
GCS connection.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201005260
2018-06-18 18:12:18 -04:00
mcilwain
9097a32cc8 Remove web & protocol WHOIS, check API, and RDAP from frontend
These are now handled by the pubapi service and all publicly facing sites that
were using these APIs have already been migrated over.

For documentation on the newly added dispatch.xml file, see:
https://cloud.google.com/appengine/docs/standard/java/config/dispatchref

Note that the --auto_update_dispatch parameter needs to be passed to the
`appcfg update` command in order to apply this new XML file.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200441580
2018-06-18 18:07:53 -04:00