go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/internal/bugs/proto/bug_management_state.proto (about) 1 // Copyright 2023 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package luci.analysis.internal.bugs; 18 19 import "google/protobuf/timestamp.proto"; 20 21 option go_package = "go.chromium.org/luci/analysis/internal/bugs/proto;bugspb"; 22 23 // Automatic bug-management state for a single failure association rule. 24 message BugManagementState { 25 // Whether the association of the rule to the bug has been notified. 26 // This is set to true whenever LUCI Analysis comments on a bug for any reason. 27 // This is set to false whenever the bug associated with a rule changes. 28 bool rule_association_notified = 1; 29 30 // A mapping from bug management policy identifier to policy state. 31 map<string, PolicyState> policy_state = 2; 32 33 message PolicyState { 34 // Whether the given policy is active for the rule. 35 // Updated on every bug-filing run as follows: 36 // - Set to true if the policy activation criteria was met. 37 // - Set to false if the policy deactivation criteria was met. 38 bool is_active = 1; 39 40 // The last time the policy was made active. 41 // Allows detecting if policy is made active for the first time (as a 42 // zero last_activation_time indicates the policy was never active). 43 // Allows UI to filter to showing policies that were at least once active. 44 // Allows UI to sort which policy was most recently active. 45 // Allows UI to show when a policy last activated. 46 google.protobuf.Timestamp last_activation_time = 2; 47 48 // The last time the policy was made inactive. 49 // Allows UI to show when a policy last deactivated. 50 google.protobuf.Timestamp last_deactivation_time = 3; 51 52 // Whether the policy's activation was ever notified to the bug. 53 // This is set to true whenever the policy state becomes active and the 54 // the activation was notified to the bug. 55 // This is set to false whenever the bug associated with a rule changes. 56 bool activation_notified = 4; 57 } 58 }