Commit graph

3172 commits

Author SHA1 Message Date
cpovirk
c92ac9af04 Migrate from containsAllIn to containsAtLeastElementsIn
The two behave identically, and containsAllIn is being removed.

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

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246565417
2019-05-06 16:44:06 -04:00
cpovirk
afafe517a5 Migrate from is(Not)SameAs to is(Not)SameInstanceAs.
They behave identically, and the old names are being removed.

Open-source note: The new methods are available in Truth as of version 0.44.

END_PUBLIC

More information:
  []

Tested:
    TAP --sample ran all affected tests and none failed
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246550001
2019-05-06 16:42:30 -04:00
weiminyu
b211d8e1ba Update to Truth 0.44 in Bazel build
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246548162
2019-05-06 16:40:54 -04:00
weiminyu
431f42d813 Upgrade truth to v0.44
Also upgraded Guava to 27.1-jre and truth java8 extension to v0.44.

Also removed lockfiles no longer in use in Gradle 5.4.

Follow up change will update bazel dependencies.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246515393
2019-05-06 16:39:17 -04:00
jianglai
b28e444d7d Update to bazel 0.25.0
Also updated the docker rules to be compatible with the new version of bazel,
and updated the proxy base image to the latest Java 8 version.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246509816
2019-05-06 16:36:04 -04:00
guyben
219f59e3b0 Fix Kokoro failure
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246411007
2019-05-06 16:34:27 -04:00
gbrodman
da2d69b9c1 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
336a34b95a 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
abc508712d 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
9f017edc2e 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
8a4407a9a1 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
d2a67d029e 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
ceb6cf5825 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
8c78719cfa 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
41622a4de0 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
7ecb153330 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
8af2afc616 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
04f5901b2b 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
29b9f04aaa 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
94aa5cd6ec 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
4895f455d8 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
6ee34a79b1 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
aadefd9595 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
52bfd74bd8 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
a84e7c9fba 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
94dfa39722 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
784a7581e2 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
5421609cfd 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
2b12ca42f5 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
9f979790e4 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
619c8a984e 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
78edc62ab3 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
926e68e806 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
7a006df6c3 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
8798cfb4a9 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
b46a6b6d55 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
2c049a65b0 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
e3bc794151 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
81959e2588 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
18d1654dbf 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
c9271a2f5e 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
68488f0833 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
ff3aeff0ed 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
f6dbc4156a 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
74971144d2 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
77eb7610e8 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
cfee7e7fd5 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
314daff8a1 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
b95987230e 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
565c4bcf50 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