This applies lessons learned from the async batch DNS refresh action, in
particular making testing more robust.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134833523
This CL fixes a bug introduced in [] which caused an exception to be thrown when an attempt was made to update a domain without a fee extension, even if the update was free, as it usually is. The fee extension should only be required if the update is not free.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134830250
This change consolidates gtech_tool into registry_tool. Since App Engine has
no actual ACLs on the remote API (any access is essentially root access), we're
removing this to avoid giving the impression to users that gtech_tool is truly
locked down from a security perspective compared to registry_tool.
In addition to merging GtechTool.COMMAND_MAP into RegistryTool.COMMAND_MAP, this
change also removes the {create,update}_sandbox_tld commands (which only made
sense for gtech_tool) and removes references to gtech_tool in the documentation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134828710
Use ordered sets to make sure that we don't pick up the same domain more than once if we find more than one of its nameservers, while preserving the order in which the domains are found. Add tests to make sure it works.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134821458
The version of fastutil (required by appengine-[]) that we included as an external maven dependency wasn't in the supported version range for appengine-[].
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134813255
This will replace the existing DnsRefreshForHostRenameAction.
This is stage one of a three stage migration process. It adds the new queue and
[] but doesn't call them yet. Stage two will cut over to using the new
functionality, and stage three will remove the old functionality.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134793963
This improves the tests by:
1) Adding tests for alphabetical ordering of the command maps, to keep them
organized, and fixing existing mis-orderings. Note that this is a no-op
test for RegistryTool since it uses ImmutableSortedMap (to resort the
commands after inserting GtechTool.COMMAND_MAP), but it'll be relevant
in the upcoming CL when they get merged. I changed GtechTool.COMMAND_MAP
to use regular ImmutableMap.
2) Checking that RegistryTool.COMMAND_MAP (the full map, after the existing
GtechTool.COMMAND_MAP has been merged in) contains the exact same set of
commands as all the concrete classes implementing Command that we can find.
This is a stronger test than what we had before, which just checked that
every Command class appeared in RegistryTool (i.e. that RegistryTool's
commands are a superset of all Commands found). You'd think that it'd be
impossible for RegistryTool to contain commands that aren't in the set of
Commands we found, but it is if we're not searching for commands properly,
which we weren't (we were only checking within the .tools package and not
within any subpackages (e.g. tools.javascrap). This has now been fixed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134451859
Now it lives alongside the delete prober data action, as well as any future
batch/maintenance tasks that should run periodically.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134435668
The Stackdriver API requires that the end time always be greater than the start
time for cumulative metric points.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134396192
Also creates a new package named 'batch' to house it.
TESTED=I deployed it to alpha, sent a POST request to the task URL, and it
successfully ran the [].
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134332999
This attempts to improve the organization of the helper methods in
DomainTransferRequestFlow created by the flattening in []
The primary changes are:
- new createTransferServerApproveEntities() method that now makes
all the server approve entities in one centralized place
- new createPendingTransferData() method that takes the server
approve entities and hides the slightly hacky code that parses out
the right ones to stuff into the TransferData
This seems like an overall simpler structure to me. With this change,
run() is 20 lines shorter and the flow overall is 40 lines shorter (not
counting a big blob of javadoc I added).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134315295
The default is to support GET, which doesn't work with cron fanout which only
uses POST.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134284855
Zone files generated on GCS with this command will be used by a MR (to be implemented in a separate CL) for comparing zone data between zoneman and datastore.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134134401
This refactors the GetEppResourceCommand hierarchy a bit so that instead of
using the type param on the class to do implicit loading (which doesn't
work that well any more for domain applications anyway), we just do the
loading in each child class and rely on the parent class only for printing
and setting common flags.
I did this to make it possible for loadByForeignKey() to have strong typing
(in a future CL), but I think this changes stands on its own merits for
making the logic here more straightforward and actually somewhat shorter.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134115072
This refactors LoadAndResaveCommand a bit so that it's more straightfoward
and just switches on an enum to determine the resource type. This has the
pro of actually making the command line flag friendlier anyway.
Also changed how it handles a non-existent (or non-active) resource so that
it throws an IAE rather than silently doing stageEntityChange(null, null).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134113671
This reworks the logic in RefreshDnsAction by factoring out a few
helper methods so the core logic is simpler and more straightforward.
Also added a couple tests to DnsInjectionTest that seemed worth having
for symmetry.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134110706
Eclipse (with Guide) is bothering me very much that it cannot infer the intended
type for ImmutableList.of() from the argument type that the calling function
defines. Adding explicit type parameters to get rid of the annoying exclamations
marks in Eclipse.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134105086
These have already been totally replaced by flattened flows.
There are a few left that will get deleted when the remaining
flat flows go in.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134077510
The reason field is 1:1 mapped to skus in billing reports. Need to add a new reason for EAP for this type of billing event for reporting to work correctly. Also map that reason to the correct SKU.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134005364
When custom effective date is passed in the check command, the response should
contain that date as an acknowledgemant that the check is performed at a time
different from now.
Also when the fee(s) returned contains a validDateRange (i. e. EAP fees that
are only valid during a certain period), the response will contain a notAfter
field which is the date after which the quoted fee(s) are no longer valid. (i.
e. the earliest of the end dates of all fees that would expire.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133989775
These were historically separate due to the old flow
structure, but now they should be one exception.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133984858
It is replaced by loadByForeignKey(), which does the same thing that
loadByUniqueId() did for contacts, hosts, and domains, and also
loadDomainApplication(), which loads domain application by ROID. This eliminates
the ugly mode-switching of attemping to load by other foreign key or ROID.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133980156
Also pull out a small bit of common functionality across contact and host checks.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133977324
It appears to be standard RDAP practice when returning result sets for domain, nameserver and entity searches to give only summary data for each result item. Any information that can be gleaned from the object itself is included, but related resources are not included. For a domain, for instance, the domain information is included, but nameservers, entities and events (which come from history entries) are suppressed. In their place, there is a standard boilerplate remark in the object indicating that only summary data is included, and that the user should query the item directly to get the full data. Note that summary data is used only for searches; direct queries for an item will still return full data.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133973835
It's best to be consistent and use the same thing everywhere. "clientId" was
already used in more places and is shorter and no more ambiguous, so it's the
logical one to win out.
Note that this CL is almost solely a big Eclipse-assisted refactoring. There are
two places that I did not change clientIdentifier -- the actual entity field on
Registrar (though I did change all getters and setters), and the name of a
column on the exported registrar spreadsheet. Both would require data
migrations.
Also fixes a few minor nits discovered in touched files, including an incorrect
test in OfyFilterTest.java and some superfluous uses of String.format() when
calling checkArgument().
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133956465
Also make minor javadoc tweaks to domain transfer flows
to match what we are changing in contact/host flows.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133955677
Rename existingResource flows variable to be specific to EPP resource type and replace some explicit checks with helper methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133774229
Also consolidates the DNS refresh functionality in AsyncFlowUtils that was
being used by HostUpdateFlow into AsyncFlowEnqueuer.
TESTED=I threw together some batch scripts to create dozens of contacts on
alpha and then request their deletion, and the [] ran fine and
successfully deleted them in batches.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133714691