go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/internal/bugs/monorail/migration/proto/migration_service.proto (about) 1 // Copyright 2024 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.monorail.migration; 18 19 option go_package = "go.chromium.org/luci/analysis/internal/bugs/monorail/migration/proto;migrationpb"; 20 21 // A service that facilitates migrating projects from monorail to buganizer. 22 service MonorailMigration { 23 // MigrateProject migrates a project's failure association rules from 24 // using monorail bugs to using buganizer bugs. The buganizer bug 25 // corresponding to a monorail bug is as returned by monorail. 26 rpc MigrateProject(MigrateProjectRequest) returns (MigrateProjectResponse) {}; 27 } 28 29 // Request used to migrate a project's rules from monorail to buganizer. 30 message MigrateProjectRequest { 31 // The LUCI Project to migrate. 32 string project = 1; 33 34 // The maximum number of rules to process in one request. This allows 35 // migration to be validated on a small number of rules before migrating all. 36 // If unset, no rules are migrated. 37 int64 max_rules = 2; 38 } 39 40 // Response of creating a sample issue. 41 message MigrateProjectResponse { 42 // The number of rules which migration was attempted due to nearing request timeout. 43 int64 rules_not_started = 1; 44 45 message RuleResult { 46 // The identifier of the rule to be migrated. 47 string rule_id = 1; 48 49 // The identifier of the monorail bug. 50 string monorail_bug_id = 2; 51 52 // The identifier of the buganizer bug it was to be migrated to. 53 string buganizer_bug_id = 3; 54 55 // The error (if any) migrating the rule. 56 string error = 4; 57 } 58 59 // The results of rules for which a migration was attempted. 60 repeated RuleResult rule_results = 2; 61 }