Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Gradle task to run the test server #192

Merged
merged 3 commits into from Jul 29, 2019

Conversation

@gbrodman
Copy link
Collaborator

commented Jul 23, 2019

As an artifact of the old build system, the test server relies on having
the built registrar_(bin|dbg)*(.css)?.js in place (see ConsoleUiAction
among others). As a result, we create a Gradle task that puts those
files into the correct, readable, location before running the test
server.

We could theoretically change the UI actions to depend on either the compiled JS/CSS files or the raw files, but that ends up making the production code significantly more complicated when that complication would only be used for tests.


This change is Reviewable

@googlebot googlebot added the cla: yes label Jul 23, 2019

@gbrodman gbrodman requested review from weiminyu and jianglai Jul 23, 2019

gbrodman added some commits Jul 23, 2019

Create a Gradle task to run the test server
As an artifact of the old build system, the test server relies on having
the built registrar_(bin|dbg)*(\.css)?.js in place (see ConsoleUiAction
among others). As a result, we create a Gradle task that puts those
files into the correct, readable, location before running the test
server.
@jianglai
Copy link
Member

left a comment

Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gbrodman and @weiminyu)


core/src/main/resources/google/registry/ui/.gitignore, line 2 at r1 (raw file):

# Compiled registrar console JS

registrar_bin.js

Can we put all these in the root .gitignore file?


core/src/main/resources/google/registry/ui/css/.gitignore, line 3 at r1 (raw file):

Quoted 6 lines of code…
# Compiled registrar console CSS/JS

registrar_bin.css
registrar_bin.css.js
registrar_dbg.css
registrar_dbg.css.js

And these.


core/src/test/java/google/registry/server/RegistryTestServerMain.java, line 44 at r1 (raw file):

PRODUCTION

I don't understand what the change here does.

@gbrodman
Copy link
Collaborator Author

left a comment

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @jianglai and @weiminyu)


core/src/main/resources/google/registry/ui/.gitignore, line 2 at r1 (raw file):

Previously, jianglai (Lai Jiang) wrote…
# Compiled registrar console JS

registrar_bin.js

Can we put all these in the root .gitignore file?

Yeah, I was doing this so that it'd be more tightly couple with the files themselves but since we don't want to track these anywhere we should be ok doing that


core/src/main/resources/google/registry/ui/css/.gitignore, line 3 at r1 (raw file):

Previously, jianglai (Lai Jiang) wrote…
# Compiled registrar console CSS/JS

registrar_bin.css
registrar_bin.css.js
registrar_dbg.css
registrar_dbg.css.js

And these.

Done.


core/src/test/java/google/registry/server/RegistryTestServerMain.java, line 44 at r1 (raw file):

Previously, jianglai (Lai Jiang) wrote…
PRODUCTION

I don't understand what the change here does.

It'll be easier to talk about it in person but basically in Bazel-land, the source JS/CSS code and the compiled code lived "next to each other" more or less, so they could each be referenced easily. Here that's not the case -- we don't actually push all the source files to the server like we can in Bazel-land, so we have to use the compiled code explicitly

@gbrodman gbrodman force-pushed the gbrodman:runTestServer branch from 1d4831a to d8a5d9d Jul 29, 2019

@jianglai
Copy link
Member

left a comment

Reviewed 3 of 3 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @weiminyu)

@gbrodman gbrodman merged commit 56b10ea into google:master Jul 29, 2019

6 of 7 checks passed

LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Java No new or fixed alerts
Details
LGTM analysis: Python No new or fixed alerts
Details
cla/google All necessary CLAs are signed
code-review/reviewable 4 files reviewed (weiminyu)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
kokoro Kokoro build finished
Details

@gbrodman gbrodman deleted the gbrodman:runTestServer branch Jul 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.