Commit graph

746 commits

Author SHA1 Message Date
nickfelt
07c2dfb976 Reword descriptions on some StatusValues
Follow-up to comments on [] in particular to clarify that INACTIVE can be combined with other statuses and doesn't have any special relationship to OK.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146683905
2017-02-06 16:45:23 -05:00
nickfelt
2a32f9048e Fix CommandUtilities to fail gracefully if stdin is unavailable
Right now, it just NPEs, which is harder to debug.  Also make it handle end-of-input more cleanly by assuming that means a negative response.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146674937
2017-02-06 16:45:23 -05:00
mountford
6fd3592a54 Change BigQuery call from update to patch
For invoicing, we have been using the BigQuery update() call, but it turns out that that's not what we want to do. That replaces all values, clearing out any that you don't specify. What we want is patch(), which updates only the values you specify.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146673068
2017-02-06 16:45:23 -05:00
cgoldfeder
6f00059a80 Make the allowed-on restrictions in StatusValue easier to read
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146671718
2017-02-06 16:45:23 -05:00
mcilwain
8830224cc5 Add MOE equivalence for sync on 2017-02-02
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146422375
2017-02-06 16:45:23 -05:00
mcilwain
61230b035c Finish YAMLification of last necessary config values
There are still some options in RegistryConfig that can't be configured
in YAML, but it's not clear why anyone would need to change them from
their default values.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146482435
2017-02-03 12:37:38 -05:00
mcilwain
4031988409 Fix connection error in nomulus tool caused by YAML configs
This is a temporary work-around that fixes the tool for all of our
environments. Next up I'm working on a generalizable way to get this
working by adding some kind of configuration between environment name
and App Engine project ID. The current configuration system doesn't
quite work for that because it's all based on a separate config per
environment, whereas the tool needs to be able to access all
environments. Either we bundle all configs that currently go into
WEB-INF/ with nomulus and have it select based on the -e flag, or we
make it a separate configuration.

TESTED=I built and ran locally and was able to successfully run
commands against alpha, production, and sandbox.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146481850
2017-02-03 12:36:17 -05:00
mcilwain
8e9b2d3483 Convert Braintree configuration to YAML
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146477578
2017-02-03 12:34:52 -05:00
cgoldfeder
223e8c2316 Fix a null check bug in HostUpdateFlow
This bug is about a bad use of Optional.
We were checking == null instead of .isPresent(), so the check
always passed, and we always set a lastSubordinateTime when
updating hosts, even if the host was external and should have
had a null value in that field.

There is almost certainly bad data in prod in the sense
that any external host that was ever updated will have a value
for this field instead of null. However, this is not
consequential as the field is entirely meaningless for
external hosts, and will be properly reset if the host is
ever moved to be internal.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146363178
2017-02-02 17:16:32 -05:00
mcilwain
636da9f7f0 Convert yet more configuration options to YAML
With a particular focus on custom logic and caching.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146258446
2017-02-02 17:05:28 -05:00
cgoldfeder
1577ab2c26 Remove an unused exception
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146258125
2017-02-02 17:04:06 -05:00
cgoldfeder
e2e37dc9f3 Replace Throwables.propagate and variants with Guava 20 versions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146250470
2017-02-02 17:01:23 -05:00
mcilwain
a061f74ee7 Move more environment-specific settings into YAML configuration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146164592
2017-02-02 16:57:13 -05:00
cgoldfeder
e04bea39f1 Javadoc fix
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146163449
2017-02-02 16:55:51 -05:00
cgoldfeder
468f1fb0f8 Fix two Gauava 20 deprecations across the tools package
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146162927
2017-02-02 16:54:28 -05:00
cgoldfeder
0a2622c6ab Replace deprecated "assignableFrom" with Guava 20 "subtypeOf"
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146161987
2017-02-02 16:51:43 -05:00
cgoldfeder
c50a76294f Fix a deprecated method now that we are on Guava 20
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146160858
2017-02-02 16:50:20 -05:00
cgoldfeder
b71e47a4fb Javadoc fixes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146160470
2017-02-02 16:48:54 -05:00
cgoldfeder
7ea3db8980 Fix an annoying Javadoc nit
Even though the outer class is imported, a Javadoc reference to
a nested class needs to be fully qualified (or imported on its
own, which our style guide prohibits).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146160210
2017-02-02 16:47:28 -05:00
cgoldfeder
50c5f856a2 Document StatusValue better and add per-resource restrictions
This generalizes the "LINKED can't be anywhere" idea into more
targeted restrictions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146158204
2017-02-02 16:46:02 -05:00
cgoldfeder
ddffbb0b61 Remove unnecessary filter on LINKED
We already have an @OnLoad in EppResource that removes LINKED
from any status values, so there's no reason to filter in info.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146146501
2017-02-02 16:41:39 -05:00
cgoldfeder
e15f75854f Remove empty method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146146386
2017-02-02 16:40:10 -05:00
mmuller
ecbe2662ac Convert request factory components into a module
Move all of the code to create the request factories into
RequestFactoryModule.  Also add the --force_http_connection flag to allow us
to force the use of HTTP connections instead of HTTPOverRPC for our internal
connections.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146116640
2017-02-02 16:35:36 -05:00
mmuller
b70f57b7c7 Update copyright year on all license headers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146111211
2017-02-02 16:27:22 -05:00
cgoldfeder
565497a6d4 Change DomainInfoFlowCustomLogic to use the new resData objects
Warning: This is a breaking change to custom logic for domain info.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146033749
2017-02-02 16:23:41 -05:00
Ben McIlwain
517e374925 Remove duplicate RegistryConfig code section from mangled merge 2017-01-30 16:55:33 -05:00
mcilwain
813f837956 Re-add Stackdriver metrics code
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146000275
2017-01-30 15:03:53 -05:00
shikhman
37a4f389ef Fix incorrect description in javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145836628
2017-01-30 15:03:53 -05:00
shikhman
3f9c53b850 Refactor Stackdriver-over-REST specific code to a different package
Downstream users who use gRPC rather than REST don't want to pull down
rest-related dependencies.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145834701
2017-01-30 15:03:53 -05:00
jianglai
4fed3a9ae6 Daggerize ExportSnapshotServlet and CheckSnapshotServlet
Eradicate the last remnants of un-injectable servlets!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145598002
2017-01-30 15:03:53 -05:00
mcilwain
a8aeff96f6 Ignore empty custom configuration YAML files
We're shipping default custom configuration files that only contain a
comment, so the system should work in that case the same as if the file
didn't exist at all.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145594737
2017-01-30 15:03:53 -05:00
cgoldfeder
0b1781b110 Make LINKED into a virtual status value
* Remove LINKED when loading an EppResource
* Enforce that you can't add it to a resource
* Ignore LINKED on xjc import of contacts and hosts

After running ResaveAllEppResourcesAction we will no
longer have persisted LINKED statuses in datastore.

In the process of writing this I discovered that RDAP
treats LINKED like any other status value and returns
the persisted value rather than the derived one. Since
this is an existing bug and is orthogonal to the changes
in this CL, I am addressing it in a separate CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145585227
2017-01-30 15:03:53 -05:00
cgoldfeder
4a730e0c9e Handle LINKED correctly in RDAP
LINKED is a virtual status that needs to be computed on the fly
when creating an RDAP response.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145583415
2017-01-30 15:03:53 -05:00
cgoldfeder
8071a1bdb5 Remove buildWithoutImplicitStatusValues
This was used in DomainInfoFlow to return a DomainResource with no
nameservers without making INACTIVE show up. It was nominally used
in DomainApplicationInfoFlow for the same reason, but that's just
an artifact of the old flow hierarchy since applications never have
INACTIVE set anyways. In either case, now that we have the DomainInfo
return object instead of returning DomainResource directly from the
flow, it's better handled within the flow.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145582317
2017-01-30 15:03:53 -05:00
mcilwain
f647ea1190 Move registry policy settings and some others into YAML config
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145571850
2017-01-30 15:03:53 -05:00
mcilwain
efedc03d45 Move more configuration options into YAML config files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145452311
2017-01-30 15:03:53 -05:00
mcilwain
16f51f0a5c Add initial implementation of YAML config file
This implements the basic framework that allows global YAML
configuration, per-environment custom configuration, and unit-
test-specific configuration.

TESTED=I deployed to alpha, ran some EPP commands through the
nomulus tool, and verified no errors.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145422680
2017-01-30 15:03:53 -05:00
shikhman
9adfd7a353 Switch PO number for Google Domains for 2017
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144764336
2017-01-30 15:01:35 -05:00
mcilwain
579e4cb74e Remove TLD parameters from WHOIS command factory methods
The small efficiency increase in not having to look up the TLDs again
did not justify making the externally extensible API more complicated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145465971
2017-01-25 12:25:54 -05:00
mcilwain
6c11ac5392 Move more configuration options into YAML config files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145452311
2017-01-25 12:25:54 -05:00
mcilwain
124011a8ce Add Optional types to fix Java 7 WHOIS build breakage
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145452302
2017-01-25 12:25:54 -05:00
Justin Graham
bb3a0c78c5 Add framework for customizable WHOIS commands
With some additional changes by Ben McIlwain.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145447136
2017-01-25 12:25:49 -05:00
shikhman
d3fe6be385 Remove ECatcher from GAE code
It's superceded by Stackdriver Trace.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145440930
2017-01-25 12:25:41 -05:00
cgoldfeder
78c07c0ebd Remove an unused parameter in DomainApplicationInfoFlow
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145435546
2017-01-25 12:25:41 -05:00
Justin Graham
f3388326d6 Add FlowMetadata (containing isSuperuser) to custom flow logic
This also bypasses signed mark validation during domain creation if
the flow is being executed as superuser.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145435268
2017-01-25 12:25:34 -05:00
cgoldfeder
d5160213e5 Get rid of cloneWithLinkedStatus
Now that we return an Info object rather than the resource itself,
there's no reason for the cloning pattern.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145426484
2017-01-25 12:25:05 -05:00
cgoldfeder
2bb61b82f4 Simplify the logic for checking for finding linked contacts/hosts.
This is preparatory refactoring for the next CL, which gets rid
of cloneWithLinkedStatus

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145424322
2017-01-25 12:25:05 -05:00
mcilwain
b5cf58bf2c Add initial implementation of YAML config file
This implements the basic framework that allows global YAML
configuration, per-environment custom configuration, and unit-
test-specific configuration.

TESTED=I deployed to alpha, ran some EPP commands through the
nomulus tool, and verified no errors.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145422680
2017-01-25 12:25:05 -05:00
cgoldfeder
15ba52988b Remove LINKED from the disallowed statuses for contact/host delete
LINKED is supposed to be a virtual status that gets added/removed
when needed. It's mistakenly been persisted to datastore on many
resources, but the persisted value is meaningless and may not
represent reality at all. There is no reason to check for LINKED
status before kicking off a delete, since the smoke test and
[] will catch all actual linked objects, and the LINKED
status can be causing false positives for objects that are no
longer LINKED.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145422457
2017-01-25 12:25:05 -05:00
Ben McIlwain
d16971c34f Migrate away from deprecated Executor method
Among the Futures methods that run user callbacks, those that don't take
an Executor will be deleted.  This CL migrates them to the counterparts
that take MoreExecutors.directExecutor() as such Executor in the
parameter list, exactly the way that the old method works.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145358533
2017-01-25 12:21:13 -05:00