FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Introduce extrahosts parameter for building an image by bmuschko · Pull Request #1340 · docker-java/docker-java · GitHub

Introduce extrahosts parameter for building an image - #1340

Merged
KostyaSha merged 2 commits into
docker-java:masterfrom
bmuschko:bm/build-image-extrahosts
Mar 7, 2020
Merged

Introduce extrahosts parameter for building an image#1340
KostyaSha merged 2 commits into
docker-java:masterfrom
bmuschko:bm/build-image-extrahosts

Conversation

bmuschko commented Mar 5, 2020
edited by marcuslinke
Loading

Copy link
Copy Markdown
Contributor

For more information, see #1339.


This change is 

if (this.extraHosts == null) {
this.extraHosts = new HashSet<>();
}
this.extraHosts.add(extraHost);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

set instead add?

bmuschko Mar 6, 2020
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The method parameter extraHost is of type String we will want to add to a Set of Strings. Can you elaborate? I don't think I understand your comment.

KostyaSha Mar 7, 2020
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It would be good to keep transparent with as setter withExtraHosts(Set<String>), better add additional method addExtraHost(String) if it really needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I orientated myself on this method for buildArgs: https://github.com/docker-java/docker-java/blob/master/docker-java-api/src/main/java/com/github/dockerjava/api/command/BuildImageCmd.java#L193. Granted, it's a Map but that doesn't really matter too much. Would you be opposed with keeping the method I introduced and then add another one for providing a Set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Never mind, misread your comment. Will make that change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Made the change. Decided to only expose a method for a Set<String>.

Copy link
Copy Markdown

Codecov Report

Merging #1340 into master will increase coverage by 34.4%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1340      +/-   ##
==========================================
+ Coverage   59.34%   93.75%   +34.4%     
==========================================
  Files         441        1     -440     
  Lines        8692       16    -8676     
  Branches      528        0     -528     
==========================================
- Hits         5158       15    -5143     
+ Misses       3246        1    -3245     
+ Partials      288        0     -288
Impacted Files Coverage Δ
.../dockerjava/api/model/ContainerSpecPrivileges.java
...ockerjava/core/command/RemoveSwarmNodeCmdImpl.java
...ithub/dockerjava/netty/NettyInvocationBuilder.java
...va/com/github/dockerjava/core/GoLangFileMatch.java
...a/com/github/dockerjava/api/model/BindOptions.java
.../github/dockerjava/api/model/PullResponseItem.java
...om/github/dockerjava/core/command/PingCmdImpl.java
...ub/dockerjava/core/command/CreateImageCmdImpl.java
.../github/dockerjava/jaxrs/KillContainerCmdExec.java
.../dockerjava/api/command/CreateNetworkResponse.java
... and 432 more

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 906e1a2...e38bbd8. Read the comment docs.

KostyaSha added this to the 3.2.0-rc6 milestone Mar 7, 2020
KostyaSha merged commit fe0ce66 into docker-java:master Mar 7, 2020
bmuschko deleted the bm/build-image-extrahosts branch March 8, 2020 00:58

bmuschko commented Mar 8, 2020

Copy link
Copy Markdown
Contributor Author

Thanks for merging and releasing!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL