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

Remove commons-daemon from dependencies #348

Merged
merged 3 commits into from Mar 4, 2019

Conversation

hyangtack
Copy link
Contributor

@hyangtack hyangtack commented Feb 28, 2019

Motivation:
The current version of jsvc does not support Java 9+.
If we can remove commons-daemon from dependencies, we would have less blocker for supporting latest Java version.

Modifications:

  • Removed commons-daemon from dependencies.
  • Removed jsvc binaries from dist/src/bin.
  • The server now creates a pidfile when it starts up and deletes it when it is terminated.
    • startup/shutdown waits until the pidfile is created/deleted.
  • Updated Dockerfile:
    • Using openjdk:lastest instead of openjdk:8.
    • Set the entry point in order to correctly handle a signal from a user.
      docker stop command, which sends TERM signal to the container, will work.

Result:

Motivation:
The current version of `jsvc` does not support Java 9+.
If we can remove `commons-daemon` from dependencies, we would have less blocker for supporting latest Java version.

Modifications:
- Removed `commons-daemon` from dependencies.
- Removed `jsvc` binaries from `dist/src/bin`.
- The server now creates a pidfile when it starts up and deletes it when it is terminated.
  - `startup`/`shutdown` waits until the pidfile is created/deleted.
- Updated `Dockerfile`:
  - Using `openjdk:lastest` instead of `openjdk:8`.
  - Set the entry point in order to correctly handle a signal from a user.
    `docker stop` command, which sends `TERM` signal to the container, will work.

Result:
- Less dependencies.
- Support Java 9+.
- Closes line#277
Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using jnr-posix?

pid = POSIXFactory.getPOSIX().getpid();

dist/Dockerfile Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 28, 2019

Codecov Report

Merging #348 into master will decrease coverage by 0.15%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #348      +/-   ##
============================================
- Coverage        66%   65.85%   -0.16%     
+ Complexity     2644     2642       -2     
============================================
  Files           306      306              
  Lines         11047    11063      +16     
  Branches       1211     1214       +3     
============================================
- Hits           7292     7285       -7     
- Misses         3055     3077      +22     
- Partials        700      701       +1
Impacted Files Coverage Δ Complexity Δ
...in/java/com/linecorp/centraldogma/server/Main.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ogma/server/internal/storage/StorageException.java 22.22% <0%> (-22.23%) 1% <0%> (-1%)
.../centraldogma/internal/client/AbstractWatcher.java 62.96% <0%> (-4.45%) 26% <0%> (-2%)
...internal/storage/repository/git/GitRepository.java 80.8% <0%> (-0.29%) 141% <0%> (ø)
...ldogma/server/internal/metadata/MigrationUtil.java 78.62% <0%> (+2.29%) 28% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 066d02e...97d1eb4. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 28, 2019

Codecov Report

Merging #348 into master will decrease coverage by 0.1%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #348      +/-   ##
===========================================
- Coverage        66%   65.9%   -0.11%     
- Complexity     2644    2646       +2     
===========================================
  Files           306     306              
  Lines         11047   11062      +15     
  Branches       1211    1214       +3     
===========================================
- Hits           7292    7290       -2     
- Misses         3055    3074      +19     
+ Partials        700     698       -2
Impacted Files Coverage Δ Complexity Δ
...in/java/com/linecorp/centraldogma/server/Main.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ogma/server/internal/storage/StorageException.java 22.22% <0%> (-22.23%) 1% <0%> (-1%)
.../centraldogma/internal/client/AbstractWatcher.java 65.18% <0%> (-2.23%) 29% <0%> (+1%)
...internal/storage/repository/git/GitRepository.java 80.8% <0%> (-0.29%) 141% <0%> (ø)
...ldogma/server/internal/metadata/MigrationUtil.java 78.62% <0%> (+2.29%) 28% <0%> (+1%) ⬆️
...centraldogma/server/internal/api/WatchService.java 84.84% <0%> (+6.06%) 10% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 066d02e...ae26aee. Read the comment docs.

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two nits. Thanks!

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Copy link
Member

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@trustin trustin merged commit b5c500d into line:master Mar 4, 2019
hyangtack added a commit to hyangtack/centraldogma that referenced this pull request Mar 5, 2019
Motivation:
A user could configure the title of web-based administrative console by line#348. But it is only available to add some text to the end of pre-defined title which is `Central Dogma at ..hostname..`. We think it would be more useful if a user can customize the entire title of the web console.

Modifications:
- Made the entire title of the web console customizable.
  - A user can use ``{{hostname}}`` as a variable of the actual hostname that the server is running on.
- Updated site document.
- Misc
  - Try to move pidfile again silently when it caught `AtomicMoveNotSupportedException`.

Result:
- Closes line#43
- Usability.
trustin pushed a commit that referenced this pull request Mar 6, 2019
Motivation:
A user could configure the title of web-based administrative console by #348. But it is only available to add some text to the end of pre-defined title which is `Central Dogma at ..hostname..`. We think it would be more useful if a user can customize the entire title of the web console.

Modifications:
- Made the entire title of the web console customizable.
  - A user can use ``{{hostname}}`` as a variable of the actual hostname that the server is running on.
- Updated site document.
- Misc
  - Try to move pidfile again silently when it caught `AtomicMoveNotSupportedException`.

Result:
- Closes #43
- Usability.
@hyangtack hyangtack deleted the feature/remove_commons_daemon branch March 27, 2019 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants