Commit graph

2766 commits

Author SHA1 Message Date
gbrodman
625e613b07 Upgrade the version of google-closure-library that we use in NPM
This is the version that's available in internal Artifactory.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246392223
2019-05-06 16:31:14 -04:00
guyben
e1926dbc57 Add Jsonable and AbstractJsonableObject for easier RDAP object building
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246345611
2019-05-06 16:27:59 -04:00
jianglai
c45d3b843c Restore RemoteApiOptions method accessibility after use
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246161567
2019-05-06 16:24:44 -04:00
guyben
90c53152bf Simplify some of the RDAP Action classes
Overriding getter methods to change values is a bit overkill when these values
are static (don't change based on internal state).

Just setting them in the base class' constructor is simpler.

Also, we can read the PATH of an Action based on the Annotation instead
returning it manually for each Action.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246135754
2019-05-06 16:23:05 -04:00
weiminyu
99aeedc598 Replace deprecated Mockito Matchers class
Part of the attempt to remove or suppress warnings for deprecated
API use, which will make the Gradle project usable with Intellij.

Currently in the Intellij/Gradle setup, deprecation warnings cause
Intellij build process to fail. Passing -Werror:none flags to javac\
does not have any effect.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246135737
2019-05-06 16:21:27 -04:00
mmuller
bbdf3db63e Change default TTLs on all records to 1 hour.
We need this as a precursor to running refreshDnsForAllDomains to change our
TTLs from 3 minutes to an hour (see the associated bug for details).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246011747
2019-05-06 16:19:48 -04:00
mcilwain
d1edd1f58b Just use default Joda DateTime toString()
It defaults to ISO 8601, so no need to be fancy.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245809048
2019-05-06 16:18:09 -04:00
cpovirk
124d7375c3 Migrate from assertThat(foo).named("foo") to assertWithMessage("foo").that(foo).
(The exact change is slightly different in some cases, like when using custom subjects or check(), but it's always a migration from named(...) to [assert]WithMessage(...).)

named(...) is being removed.

This CL may slightly modify the failure messages produced, but all the old information will still be present.

More information:
  []

Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245762634
2019-05-06 16:16:31 -04:00
cpovirk
de5f3e6177 For assertions made _inside the implementation of another assertion_, migrate from assertThat to check.
For example:
  assertThat(actual().foo()).isEqualTo(expected);
becomes:
  check("foo()").that(actual().foo()).isEqualTo(expected);

More information:
  []

Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245750144
2019-05-06 16:13:13 -04:00
weiminyu
8daca56024 Fix incorrect public tutorial on configuration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245665006
2019-05-06 16:09:23 -04:00
gbrodman
70c7e6c224 Use a potential discount in the AllocationToken when determining domain create price
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245458027
2019-04-27 00:08:57 -04:00
jianglai
1a1ff94bc5 Upload gradle binary to GCS when preparing the release
This makes it possible to pull the gradle binary from a trusted source when building the release artifacts.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245450562
2019-04-27 00:07:23 -04:00
gbrodman
274b331522 Fix up a comment based on investigation into billing events
Please see the linked bug for more context--I believe this is correct based on what I've observed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245423464
2019-04-27 00:05:49 -04:00
jianglai
ef1124de95 Update Nomulus release pipeline
Refactor out the build and package logic to a reusable script. Also removed the gradle task flag to skip lint check, as failing lint check is no longer a fatal error.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245296563
2019-04-27 00:01:06 -04:00
gbrodman
312c1a46ab Add additional tests for the AllocationToken status transitions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245292932
2019-04-26 23:59:32 -04:00
gbrodman
a0f9e3b3dd Store a reference to an allocation token in the OneTime billing event
We will need to be able to find all redemptions associated with a particular token and this will allow us to do that.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245292865
2019-04-26 23:57:56 -04:00
jianglai
d02a01ba66 Use the GCS repository when pulling dependencies in CI
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245292305
2019-04-26 23:56:20 -04:00
jianglai
ebe4e522df Use GCS HTTPS endpoints when pulling dependencies
This alleviates the needs to have Google credentials even when downloading from
a public bucket.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245290867
2019-04-26 23:54:43 -04:00
mmuller
83e93b87a5 Pin to a tagged selenium docker image
The latest version of the selenium/standalone-chrome docker image appears to
be out of sync with the API that we're using and there is no more recent
version of the API available in maven central.

This change pins us to the earlier version and fixes our CI build.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245286532
2019-04-26 23:53:06 -04:00
jianglai
fbb60df019 LSC: Mark Python binaries with explicit python_version.
Having PY2 global version default is deprecated and change in 2019Q3.  This LSC ([] is a prerequisite to that Blaze change to prevent unintended breakages when we flip the default.

This CL is no-op to “freeze” the world. If it conflicts with your plans to move to PY3, feel free to change forward to PY3 as you see fit (eg. remove python_version when you move to py2and3_test).

BEGIN_PUBLIC
n/a
END_PUBLIC

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=245028632
2019-04-26 23:51:31 -04:00
jianglai
37c5139629 Update .gitignore file
When a release repo is first created by combining the public and the internal repos, we need to make sure to include files that are currently excluded in the public repo's .gitignore but have been tracked before the exclusion rules are added (because the rules do not apply retroactively: if a file is already tracked by git, even if it later matches a rule in .gitignore, it will not be excluded).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244916005
2019-04-26 23:48:22 -04:00
jianglai
1e58ef4efa Exclude files under repos/ from being uploaded to Cloud Build
When submitting a Cloud Build job from the command line, we do not want to include files under repos/, which can amount to almost a Gig.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244906528
2019-04-26 23:46:44 -04:00
gbrodman
53c1557d2a Use the registrar client ID and abuse email address in Spec11
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244899045
2019-04-26 23:45:07 -04:00
gbrodman
0644fab76e Use stream-collect rather than transformValues in Spec11 collection
As it turns out, using Maps::transformValues does not allow us to change the
resulting map--calling Map::put throws an UnsupportedOperationException. As a
result, we have to do this roundabout stream-collect to do a group-by.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244852373
2019-04-26 23:41:55 -04:00
jianglai
143ae1f93e Update proxy release pipeline following Spinnaker 1.13 release
The image name in the manifest needs to be the same as the name that Spinnaker trigger catches. With the new release, Spinnaker now correctly recognizes gcr.io/${PROJECT_ID}/proxy as the image name.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244845037
2019-04-23 10:44:44 -04:00
jianglai
46c1a290be Upgrade to Gradle 5.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244686718
2019-04-23 10:43:09 -04:00
jianglai
648fb0e46d Update proxy deployment pipeline
The pipeline is broken into two. The first one is to be triggered when the public repo is tagged. It then tags the private repo, builds and upload the builder and base images, and push a new commit to the release (merged repo). This pipeline also does text manipulation on several files in the release repo to ensure that the images uploaded in this pipeline is always used to reproducibly build the release repo at the same commit.

The second pipeline is then triggered by commit into the release repo, which builds, signs and uploads the proxy image.

Also updated the dependency lock files to use the latest plugins dependencies, which are uploaded to the GCS repo.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244666211
2019-04-22 13:02:39 -04:00
jianglai
89298ea4cb Do not track the repos folder in git
It is only used when uploading dependencies to GCS.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244654178
2019-04-22 12:59:27 -04:00
cpovirk
a46227b201 Use new Truth failWithActual() method
Migrate Truth subjects from the old fail(String, Object) to the new failWithActual(String, Object), tweaking verbs for the new grammar.

Before:
  fail("has foo", expected);

After:
  failWithActual("expected to have foo", expected);

Open-source note: The fail*() methods used by this CL were added in Truth 0.41.

More information:
  []
Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244418884
2019-04-22 12:57:49 -04:00
mcilwain
24bb78bd16 Fix some statically detected code issues
This includes: unnecessary semicolons, suppress warnings, switch statements, final/private qualifiers, Optional wrapping, conditionals, both inline and non-inline variables, ternaries, Collection putAll() calls, StringBuilders, and throws declarations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244182539
2019-04-22 12:54:34 -04:00
jianglai
9f360587ff Make repo override messages more consistent
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244042884
2019-04-22 12:52:55 -04:00
mcilwain
8b71a3cafb Add missing type parameters
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243877573
2019-04-16 17:30:58 -04:00
jianglai
3c34d23e87 Automated g4 rollback of changelist 243838016.
*** Reason for rollback ***

Looks like Travis has the same problem. We may need to look into how to get a credential on Travis, or use Cloud Build as CI for our internal build.

Rolling back this CL for now.

*** Original change description ***

Use GCS Maven and plugins repo in travis

This make it easier to detect problems earlier when we forget to update the GCS
repo.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243862581
2019-04-16 17:27:49 -04:00
jakubvrana
212bd54b55 Remove references to |blessStringAsTrustedResourceUrlForLegacy in <link href>.
This directive will be deleted in the future, this change prepares for it.

More information: []

Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243847668
2019-04-16 17:24:35 -04:00
jianglai
6ee462247c Use GCS Maven and plugins repo in travis
This make it easier to detect problems earlier when we forget to update the GCS
repo.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243838016
2019-04-16 14:12:42 -04:00
mcilwain
3f974902df Only send registrar update notification emails to primary contacts
The test changes are perhaps a little bit more involved than expected, because I
had to add a second RegistrarContact which had knock-on effects on other tests.
This does make the other tests better though, in that we're now testing registrars
with multiple contacts (we weren't much before).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243827803
2019-04-16 14:11:06 -04:00
mcilwain
55f8e0efad Remove per-domain nameserver restrictions in reserved lists
This also removes the related setting on the Registry entity. We never used
either of these, and keeping them around in our codebase just adds complexity
for no purpose. We already achieve the goals of this feature by restricting
nameservers on entire TLDs and by registry-locking important domain names.

This is also two fewer things we'll have to worry about carrying over to the new
schema in Registry 3.0.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243816241
2019-04-16 14:09:27 -04:00
jianglai
3b1d38e1e6 update dependency lock file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243320475
2019-04-15 14:58:38 -04:00
gbrodman
d1e3194fce Don't delete or "redeem" unlimited use AllocationTokens
We haven't started dealing with timing or discounts yet, but unlimited use tokens should actually be unlimited use

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243318266
2019-04-15 14:57:02 -04:00
jianglai
416a39b003 Remove @OnLoad on setDefaultNumDnsPublishLocks
All entities are updated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243274828
2019-04-15 14:55:23 -04:00
gbrodman
63807aa9be Add necessary fields to the AllocationToken schema
See https://docs.google.com/document/d/1SSWrILRpx0Mtr4sdvlYwz9I8wJp5Gu_o4qlml3iJDKI

This is just the base for now--we don't actually do anything with it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=243265164
2019-04-15 14:53:45 -04:00
jianglai
3b87d4de64 Build the builder image in a script
This makes it so that only one extra layer is added in the builder image, improving
performance (may no longer relevant for newer versions of docker).

See: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242936360
2019-04-11 15:01:22 -04:00
mmuller
0c64d1bffc Sign an attestation for the proxy build
This signs an attestation that the proxy image was built by cloud build,
allowing the image to be used on a bin-auth restricted kubernetes cluster.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242917524
2019-04-11 14:59:46 -04:00
gbrodman
6b6e2ed930 Use a multimap to index the Spec11 threat matches
Collecting by key leads to exceptions if there are multiple client IDs with the
same email address (if we group by client ID in the pipeline). Using
Multimaps::index means that if we're grouping by email, all matches with the
same email get concatenated together

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242858112
2019-04-11 14:58:08 -04:00
jianglai
641c3f6bc3 Set encoding for java tests
The java compiler in the builder with new base image defaults to ASCII encoding.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242726695
2019-04-11 14:56:13 -04:00
guyben
d1f833b9bc Add abuse entity to registrar entities
From to the RDAP response profile:

2.4.5. Abuse Contact (email, phone) - an RDAP server MUST include an *entity*
with the *abuse* role within the registrar *entity* which MUST include *tel*
and *email*, and MAY include other members

Even though this is a MUST - this field will only be shown if the registrar has a *visible* abuse contact.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242684303
2019-04-11 14:54:28 -04:00
gbrodman
bf0d83585a Change the email address for the second test registrar
NewRegistrar will still have the email address "new.registrar@example.com" and TheRegistrar will now have the email address "the.registrar@example.com".

I noticed this when looking at the Spec11 testing code and this will make it easier to test that code later when we retrieve email addresses from the registrar datastore objects themselves.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242676543
2019-04-11 14:52:43 -04:00
jianglai
ababada79a Update builder base image
This image seems to be more publicly advertised compared to the one currently used, even though the latter is also from Google.

See: https://cloud.google.com/container-registry/docs/managed-base-images#available_images

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242666510
2019-04-11 14:50:55 -04:00
mcilwain
1c33f38555 Delete unused description field from premium/reserved list entities
It isn't used now, and as far as I can tell it was never used for anything, so
get rid of it.  We won't be using it in our new Cloud SQL schema anyway.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242501877
2019-04-11 14:49:14 -04:00
shicong
1897b9d442 Fix Bazel build
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=242472456
2019-04-11 14:47:31 -04:00