diff options
author | Ola Aunrønning <olaa@oath.com> | 2018-11-15 11:34:19 +0100 |
---|---|---|
committer | Ola Aunrønning <olaa@oath.com> | 2018-11-15 11:42:17 +0100 |
commit | e5bde00ae0099cd07e116ff25e98e4150e035436 (patch) | |
tree | bf275ebcb99495241528638bf267048a3db3d591 /controller-server | |
parent | d98de4ad52d9f1c045a19cdfd98ac82fe3a4fee4 (diff) |
Don't add asignee for AthenzTenants
Diffstat (limited to 'controller-server')
2 files changed, 6 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ApplicationOwnershipConfirmer.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ApplicationOwnershipConfirmer.java index e260848d93a..2e6b3d1360d 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ApplicationOwnershipConfirmer.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ApplicationOwnershipConfirmer.java @@ -11,6 +11,7 @@ import com.yahoo.vespa.hosted.controller.api.integration.organization.User; import com.yahoo.vespa.hosted.controller.application.ApplicationList; import com.yahoo.vespa.hosted.controller.tenant.AthenzTenant; import com.yahoo.vespa.hosted.controller.tenant.Tenant; +import com.yahoo.vespa.hosted.controller.tenant.UserTenant; import com.yahoo.yolean.Exceptions; import java.time.Duration; @@ -51,7 +52,9 @@ public class ApplicationOwnershipConfirmer extends Maintainer { try { Tenant tenant = ownerOf(application.id()); Optional<IssueId> ourIssueId = application.ownershipIssueId(); - ourIssueId = ownershipIssues.confirmOwnership(ourIssueId, application.id(), userFor(tenant), tenant.contact().orElseThrow(RuntimeException::new)); + Contact contact = tenant.contact().orElseThrow(RuntimeException::new); + User asignee = tenant instanceof UserTenant ? userFor(tenant) : null; + ourIssueId = ownershipIssues.confirmOwnership(ourIssueId, application.id(), asignee, contact); ourIssueId.ifPresent(issueId -> store(issueId, application.id())); } catch (RuntimeException e) { // Catch errors due to wrong data in the controller, or issues client timeout. diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporter.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporter.java index 13733b32d86..3f5c2d1f317 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporter.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporter.java @@ -14,6 +14,7 @@ import com.yahoo.vespa.hosted.controller.api.integration.organization.User; import com.yahoo.vespa.hosted.controller.application.ApplicationList; import com.yahoo.vespa.hosted.controller.tenant.AthenzTenant; import com.yahoo.vespa.hosted.controller.tenant.Tenant; +import com.yahoo.vespa.hosted.controller.tenant.UserTenant; import com.yahoo.yolean.Exceptions; import java.time.Duration; @@ -117,7 +118,7 @@ public class DeploymentIssueReporter extends Maintainer { private void fileDeploymentIssueFor(ApplicationId applicationId) { try { Tenant tenant = ownerOf(applicationId); - User asignee = userFor(tenant); + User asignee = tenant instanceof UserTenant ? userFor(tenant) : null; Optional<IssueId> ourIssueId = controller().applications().require(applicationId).deploymentJobs().issueId(); IssueId issueId = deploymentIssues.fileUnlessOpen(ourIssueId, applicationId, asignee, tenant.contact().get()); store(applicationId, issueId); |