Although the delta implies that this is actually adding code, it's
better than it looks, because some of the stuff in ContactFlowUtils
is duplicating more generic methods in ResourceFlowUtils, which
can be deleted when the domain and host flows are cut over.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133149104
This allows us to inject an optional once, in FlowRunner, and
inject a non-null value in the flows (not done yet, after this
goes in).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133130485
There was very little meat in the contact hierarchy and it
flattened quiet easily.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133080191
Command allows for both one-off creation and bulk import of assignees via file (the latter will be used for the initial import from Play Store).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133048360
The exceptions created for generic problems with the flags extension (invalid flag, etc.) should be in a common location, so they can be used by all interested TLDs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133040831
This factors out a huge chunk of boilerplate that
would otherwise be in every single flow.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133014837
By duplicating rather than moving them, I can keep both versions
around while I port the flows over to the new flat form.
I could have made these g4 moves from the original sources, but
there's barely anything in these files and it didn't really seem
like it was adding anything useful.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132999387
Specifically:
- remove @RequestScope from EppMetric since it's only for components
- fix to call the better overload of toBigqueryTimestamp
- use the same UUID provider for BigQueryMetricsEnqueuer that already exists for
the VerifyEntityIntegrityStreamer
- minor cleanup in VerifyEntityIntegrityStreamer (inject projectId vs whole env)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132721794
Getting rid of builder boilerplate makes my heart sing. Since we can no
longer @Inject the Builder() constructor, this change adds a provider
in WhiteboxModule that calls a special builderForRequest() factory method,
which gets passed a request ID and Clock and preserves the existing
EppMetric magic that sets the start and end time for you.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132714432
This disentangles GaeUserCredentials and UserService, which lets us remove a
bunch of hacky and brittle code from LoginFlowViaConsoleTest.
Previously, GaeUserCredentials was constructed for a user, but then was still
directly calling UserService to check if the user was an admin. UserService
can be adjusted in tests (via AppEngineRule / LocalServiceTestHelper) but it's
a pain, especially to do dynamically within a single test file. The hacky
code in LoginFlowViaConsoleTest was working around that restriction.
With this CL, you can pass into GaeUserCredentials whether the user is an
admin or not (for testing) or construct one directly from a UserService object
(for production, and for convenience in tests using an AppEngineRule user).
Note that I also changed EppConsoleAction to @Inject UserService.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132696391
This fixes the proximate cause of b/31380927 and makes alpha frontend usable
again.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132675121
While working on an implementation of TLD-specific logic, it was realized that the extra logic methods would need access to the flow's HistoryEntry, so that things like poll messages could be parented properly.
Also, the update flow had not been fixed to perform the fee check.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132561527
This CL enhances various domain flows (check, create, delete, renew, restore, transfer, update) so that they invoke the appropriate methods on the object implementing the TLD's RegistryExtraFlowLogic (if any). TldSpecificLogicProxy is also updated to invoke RegistryExtraFlowLogic proxy (if any) to fetch the appropriate price. The tests use a made-up extra flow logic object which can be attached to a test TLD to make sure that the proper routines are being invoked.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132486734
We were trying to set the scopes too early in the creation of a
GoogleCredential. They aren't yet known at this point in the code and should be
an empty collection (and also not null, which yields an NPE).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132477868
The latter is the canonical way to call it; the former is not available in
public Guava (and is just a pass-through to fromNullable anyway).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132441956
The default production value of 10,000 was unnecessarily large for testing
purposes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132441792
This DistributionFitter is suitable for tracking the latency of network calls.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132400538
This change refactors EppMetrics from the mutable self-exporting thing that it
was into a real value type EppMetric, and delegates exporting functionality to the
BigQueryMetricsEnqueuer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132387660
VoidKeyring always threw exceptions whenever any of its methods were called,
which caused several parts of the system to fail early (and thus required a
proper Keyring to be implemented almost immediately, early on in the "just
playing around with the system" phase).
I'm swapping this out with an InMemoryKeyring which is supplied by
DummyKeyringModule, which, instead of throwing exceptions, returns dummy
values, delaying the onset of errors to when connecting to external services
is attempted. This pushes off the required implementation of a real Keyring-
providing module, allowing the system to be played around with more first.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132361157
It turns out that we don't actually need it for the system to function normally.
When the next version of the OAuth2 API is released and this is included, I'll
add the call back in.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132359891
Per mcilwain's suggestion in the LRP design doc, LRP tokens should use a Base58 alphabet. I'll move PasswordGenerator out of the tools package and into a utils class in a future CL, as we'll want to use this generator in the LrpToken class itself rather than relegate the token definition to a tool.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132358363
When EAP is involed we current have one billing event for domain create that
has the create fee and EAP fee lumped together. Change it to record two
separate billing events for each.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132335349
This is one of a series of CLs adding a new metric type, EventMetric, which
is used for tracking numerical distributions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132103552
This work is identical to the work done for BackendServlet in
[]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132100448
It's better that it always takes a non-null ImmutableSet, which may either be
empty or contain elements. That way the ugliness of nullness is contained
just to the entity class itself, and all other code that interacts with it
can always be assured of having a real set to deal with.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132066238
This is the first step in consolidating our task queues down into a smaller
number. We have lots of tasks that run quite infrequently, and they can all run
in the same queue to get retry semantics without needing a new queue for each
cron entry.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131990472
The backfill for these is no longer necessary as all of the Registry entities in all environments have been backfilled.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131984138
This change replaces all Ref objects in the code with Key objects. These are
stored in datastore as the same object (raw datastore keys), so this is not
a model change.
Our best practices doc says to use Keys not Refs because:
* The .get() method obscures what's actually going on
- Much harder to visually audit the code for datastore loads
- Hard to distinguish Ref<T> get()'s from Optional get()'s and Supplier get()'s
* Implicit ofy().load() offers much less control
- Antipattern for ultimate goal of making Ofy injectable
- Can't control cache use or batch loading without making ofy() explicit anyway
* Serialization behavior is surprising and could be quite dangerous/incorrect
- Can lead to serialization errors. If it actually worked "as intended",
it would lead to a Ref<> on a serialized object being replaced upon
deserialization with a stale copy of the old value, which could potentially
break all kinds of transactional expectations
* Having both Ref<T> and Key<T> introduces extra boilerplate everywhere
- E.g. helper methods all need to have Ref and Key overloads, or you need to
call .key() to get the Key<T> for every Ref<T> you want to pass in
- Creating a Ref<T> is more cumbersome, since it doesn't have all the create()
overloads that Key<T> has, only create(Key<T>) and create(Entity) - no way to
create directly from kind+ID/name, raw Key, websafe key string, etc.
(Note that Refs are treated specially by Objectify's @Load method and Keys are not;
we don't use that feature, but it is the one advantage Refs have over Keys.)
The direct impetus for this change is that I am trying to audit our use of memcache,
and the implicit .get() calls to datastore were making that very hard.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131965491