-
Notifications
You must be signed in to change notification settings - Fork 316
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
[ghaction] martix CI for etcd version #1180
Conversation
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.UUID; | ||
import java.util.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't use star import
@@ -89,6 +85,10 @@ public Builder withNetwork(Network network) { | |||
} | |||
|
|||
public EtcdCluster build() { | |||
String imagePro = System.getenv("ETCD_IMAGE"); | |||
if (!Strings.isNullOrEmpty(imagePro)) { | |||
image = imagePro; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be done in the constructor, otherwise it would override any call to withImage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lburgazzoli PTAL,Thanks.
a15ba44
to
e64b4db
Compare
public Builder(){ | ||
String image = System.getenv("ETCD_IMAGE"); | ||
if (!Strings.isNullOrEmpty(image)) { | ||
withImage(image); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invoking a non final method from the constructor is usually a bad practice as could lead to unexpected results, better to set the instance variable directly.
As alternative you can create a static utility method that returns the container image, like:
private String image = Etcd.resolveContainerImage();
e64b4db
to
7153cf1
Compare
Signed-off-by: Lan Liang <gcslyp@gmail.com>
7153cf1
to
2614584
Compare
Thanks for review :) |
Martix CI for etcd version,Improve client stability.
We can add CI for etcd 3.6.x after it's released.