diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/BuildBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/BuildBean.java index fefc37b0d1..3f74174181 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/BuildBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/BuildBean.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,9 +15,11 @@ */ package com.pinterest.deployservice.bean; -import com.fasterxml.jackson.annotation.JsonProperty; +import javax.validation.constraints.NotEmpty; + import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.hibernate.validator.constraints.NotEmpty; + +import com.fasterxml.jackson.annotation.JsonProperty; /** * Keep the bean and table in sync diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/ChatMessageBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/ChatMessageBean.java index def4a09082..f02bc22933 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/ChatMessageBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/ChatMessageBean.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,7 +15,7 @@ */ package com.pinterest.deployservice.bean; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; public class ChatMessageBean { diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/EnvironBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/EnvironBean.java index fa29bca053..84eda76cd5 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/EnvironBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/EnvironBean.java @@ -19,10 +19,10 @@ import org.apache.commons.lang.builder.ReflectionToStringBuilder; import org.apache.commons.lang.StringEscapeUtils; -import org.hibernate.validator.constraints.NotEmpty; import org.hibernate.validator.constraints.Range; import java.io.Serializable; +import javax.validation.constraints.NotEmpty; /** * Keep the bean and table in sync diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/GroupRolesBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/GroupRolesBean.java index dd132b8fc7..d79da30410 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/GroupRolesBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/GroupRolesBean.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; /** diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/HotfixBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/HotfixBean.java index 78ebc379a3..f46f147a82 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/HotfixBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/HotfixBean.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,9 +15,11 @@ */ package com.pinterest.deployservice.bean; -import com.fasterxml.jackson.annotation.JsonProperty; +import javax.validation.constraints.NotEmpty; + import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.hibernate.validator.constraints.NotEmpty; + +import com.fasterxml.jackson.annotation.JsonProperty; /** * Keep the bean and table in sync diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/PingRequestBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/PingRequestBean.java index c9da46c6cc..4c78350e6b 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/PingRequestBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/PingRequestBean.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,13 +15,13 @@ */ package com.pinterest.deployservice.bean; -import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.hibernate.validator.constraints.NotEmpty; - import java.util.List; -import java.util.Map; import java.util.Set; +import javax.validation.constraints.NotEmpty; + +import org.apache.commons.lang.builder.ReflectionToStringBuilder; + public class PingRequestBean { @NotEmpty private String hostId; @@ -109,7 +109,7 @@ public EnvType getStageType() { public void setStageType(EnvType stageType) { this.stageType = stageType; } - + public Set getGroups() { return groups; } diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/TokenRolesBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/TokenRolesBean.java index db7b362e20..8ddc65a8fc 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/TokenRolesBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/TokenRolesBean.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; /** diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/UserRolesBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/UserRolesBean.java index 01c9a99c32..2a7055584a 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/UserRolesBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/UserRolesBean.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,8 +17,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; /** diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/WebHookBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/WebHookBean.java index d8c9be4889..83bc83c801 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/WebHookBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/WebHookBean.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,8 +15,9 @@ */ package com.pinterest.deployservice.bean; +import javax.validation.constraints.NotEmpty; + import org.apache.commons.lang.builder.ReflectionToStringBuilder; -import org.hibernate.validator.constraints.NotEmpty; public class WebHookBean { @NotEmpty diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/HipchatFactory.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/HipchatFactory.java index 7438cc76bf..48ad02966a 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/HipchatFactory.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/HipchatFactory.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,11 +15,12 @@ */ package com.pinterest.teletraan.config; +import javax.validation.constraints.NotEmpty; + import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.pinterest.deployservice.chat.ChatManager; import com.pinterest.deployservice.chat.HipChatManager; -import org.hibernate.validator.constraints.NotEmpty; @JsonTypeName("hipchat") public class HipchatFactory implements ChatFactory { diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/SlackFactory.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/SlackFactory.java index eb2c296c52..f60515871b 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/SlackFactory.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/SlackFactory.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,13 +15,14 @@ */ package com.pinterest.teletraan.config; +import javax.validation.constraints.NotEmpty; + import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.pinterest.deployservice.chat.ChatManager; import com.pinterest.deployservice.chat.SlackChatManager; -import org.hibernate.validator.constraints.NotEmpty; -import com.pinterest.deployservice.common.KeyReaderFactory; import com.pinterest.deployservice.common.KeyReader; +import com.pinterest.deployservice.common.KeyReaderFactory; @JsonTypeName("slack") public class SlackFactory implements ChatFactory { diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/TokenAuthenticationFactory.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/TokenAuthenticationFactory.java index 149d56b1e8..b2296c1635 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/TokenAuthenticationFactory.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/TokenAuthenticationFactory.java @@ -15,12 +15,14 @@ */ package com.pinterest.teletraan.config; + + import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.pinterest.teletraan.TeletraanServiceContext; import com.pinterest.teletraan.security.TokenAuthFilter; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import javax.ws.rs.container.ContainerRequestFilter; @JsonTypeName("token") diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/WorkerConfig.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/WorkerConfig.java index 6bf8389bef..2858616c8c 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/WorkerConfig.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/WorkerConfig.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,7 +16,7 @@ package com.pinterest.teletraan.config; import com.fasterxml.jackson.annotation.JsonProperty; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import java.util.Map; diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/ZKMysqlDataSourceFactory.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/ZKMysqlDataSourceFactory.java index 5062db438a..d416a1a0f2 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/ZKMysqlDataSourceFactory.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/config/ZKMysqlDataSourceFactory.java @@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import org.apache.commons.dbcp.BasicDataSource; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import org.apache.commons.codec.digest.DigestUtils; import com.google.common.collect.ImmutableMap; import java.util.Map; @@ -133,17 +133,17 @@ public BasicDataSource build() throws Exception { .put("clientCertificateKeyStorePassword", this.clientPasswd ) .build(); host = this.replicaSet; - // we don't need the replica number in the host; + // we don't need the replica number in the host; // if in the configuration we input the number in the replica, we have to remove it. if (host.length() > 3) { replicaSetNumber = replicaSet.substring(replicaSet.length() - 3); if (StringUtils.isNumeric(replicaSetNumber)) { host = replicaSet.substring(0, replicaSet.length() - 3); - } + } } else { throw new Exception(String.format("ReplicaSet is: %s which is not correct. It should be the replicaset name and replicaset number.", host)); } - host += this.domainSuffix; + host += this.domainSuffix; String userName = getUserNameFromSpiffeId(replicaSetNumber); return DatabaseUtil.createMysqlDataSource(host, port, userName, password, pool, proxyConnectionProps); } else { diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvCapacities.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvCapacities.java index a07629fd53..32bb54efae 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvCapacities.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvCapacities.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,7 +30,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvDeploys.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvDeploys.java index a0eb098afd..16bce6bde2 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvDeploys.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvDeploys.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -155,7 +155,7 @@ public Response action( response = Response.class) public void update( @Context SecurityContext sc, - @ApiParam(value = "Environment name", required = true)@PathParam("envName") String envName, + @ApiParam(value = "Environment name", required = true)@PathParam("envName") String envName, @ApiParam(value = "Stage name", required = true)@PathParam("stageName") String stageName, @ApiParam(value = "Agent object to update with", required = true)@NotNull @QueryParam("actionType") HostActions actionType, @NotNull List hostIds) throws Exception { @@ -169,7 +169,7 @@ public void update( agentDAO.updateMultiple(hostIds, envBean.getEnv_id(), agentBean); LOG.info("Succesfully paused hosts in environment {} and stage {}", envName, stageName); break; - case RESET: + case RESET: agentBean.setState(AgentState.RESET); agentBean.setLast_update(System.currentTimeMillis()); agentDAO.updateMultiple(hostIds, envBean.getEnv_id(), agentBean); diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvStages.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvStages.java index 87a568b2e3..44cbe8ff8e 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvStages.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/EnvStages.java @@ -35,7 +35,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/Environs.java b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/Environs.java index 8941ea2faa..6750a83067 100644 --- a/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/Environs.java +++ b/deploy-service/teletraanservice/src/main/java/com/pinterest/teletraan/resource/Environs.java @@ -35,7 +35,7 @@ import io.swagger.annotations.*; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.hibernate.validator.constraints.NotEmpty; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory;