From 8af47608143b0282b4cf7fa4cc77d4e6ce7d3dde Mon Sep 17 00:00:00 2001 From: Jacek Date: Wed, 23 Dec 2020 13:31:52 +0100 Subject: [PATCH] SONAR-13999 Reserve organization fields for protobuf instead removing --- sonar-ws/src/main/protobuf/ws-ce.proto | 26 ++++++++++--------- .../src/main/protobuf/ws-components.proto | 17 ++++++------ sonar-ws/src/main/protobuf/ws-favorites.proto | 1 + sonar-ws/src/main/protobuf/ws-hotspots.proto | 15 ++++++----- sonar-ws/src/main/protobuf/ws-issues.proto | 20 ++++++++------ .../src/main/protobuf/ws-notifications.proto | 1 + 6 files changed, 45 insertions(+), 35 deletions(-) diff --git a/sonar-ws/src/main/protobuf/ws-ce.proto b/sonar-ws/src/main/protobuf/ws-ce.proto index cd16545ae8b..053c1182ac6 100644 --- a/sonar-ws/src/main/protobuf/ws-ce.proto +++ b/sonar-ws/src/main/protobuf/ws-ce.proto @@ -64,11 +64,12 @@ message AnalysisStatusWsResponse { optional Component component = 1; message Component { - optional string key = 1; - optional string name = 2; - repeated Warning warnings = 3; - optional string branch = 4; - optional string pullRequest = 5; + reserved 1; //drop organization + optional string key = 2; + optional string name = 3; + repeated Warning warnings = 4; + optional string branch = 5; + optional string pullRequest = 6; } message Warning { @@ -107,6 +108,7 @@ message WorkerCountResponse { } message Task { + reserved 20; //drop organization optional string id = 1; optional string type = 2; optional string componentId = 3; @@ -126,13 +128,13 @@ message Task { optional string errorStacktrace = 17; optional string scannerContext = 18; optional bool hasScannerContext = 19; - optional string branch = 20; - optional sonarqube.ws.commons.BranchType branchType = 21; - optional string errorType = 22; - optional string pullRequest = 23; - optional string pullRequestTitle = 24; - optional int32 warningCount = 25; - repeated string warnings = 26; + optional string branch = 21; + optional sonarqube.ws.commons.BranchType branchType = 22; + optional string errorType = 23; + optional string pullRequest = 24; + optional string pullRequestTitle = 25; + optional int32 warningCount = 26; + repeated string warnings = 27; } enum TaskStatus { diff --git a/sonar-ws/src/main/protobuf/ws-components.proto b/sonar-ws/src/main/protobuf/ws-components.proto index 17f44c7bcb0..f4b1cac6b6a 100644 --- a/sonar-ws/src/main/protobuf/ws-components.proto +++ b/sonar-ws/src/main/protobuf/ws-components.proto @@ -48,17 +48,19 @@ message ShowWsResponse { // WS api/components/suggestions message SuggestionsWsResponse { + reserved 3; //drop organization repeated Category results = 1; optional string warning = 2; - repeated Project projects = 3; + repeated Project projects = 4; message Category { - optional string q = 1; - repeated Suggestion items = 2; + optional string q = 1; + repeated Suggestion items = 2; optional int64 more = 3; } message Suggestion { + reserved 4; //drop organization optional string key = 1; optional string name = 2; optional string match = 3; @@ -75,9 +77,10 @@ message SuggestionsWsResponse { // WS api/components/search_projects message SearchProjectsWsResponse { + reserved 2; //drop organization optional sonarqube.ws.commons.Paging paging = 1; - repeated Component components = 2; - optional sonarqube.ws.commons.Facets facets = 3; + repeated Component components = 3; + optional sonarqube.ws.commons.Facets facets = 4; } // WS api/components/provisioned @@ -95,6 +98,7 @@ message ProvisionedWsResponse { } message Component { + reserved 12; //drop organization optional string key = 2; optional string refId = 3; optional string refKey = 4; @@ -121,6 +125,3 @@ message Component { } } - - - diff --git a/sonar-ws/src/main/protobuf/ws-favorites.proto b/sonar-ws/src/main/protobuf/ws-favorites.proto index 64a75848238..d4f46d5b0aa 100644 --- a/sonar-ws/src/main/protobuf/ws-favorites.proto +++ b/sonar-ws/src/main/protobuf/ws-favorites.proto @@ -33,6 +33,7 @@ message SearchResponse { } message Favorite { + reserved 4; //drop organization optional string key = 1; optional string name = 2; optional string qualifier = 3; diff --git a/sonar-ws/src/main/protobuf/ws-hotspots.proto b/sonar-ws/src/main/protobuf/ws-hotspots.proto index 0fc8ad9ad46..3efef10cf42 100644 --- a/sonar-ws/src/main/protobuf/ws-hotspots.proto +++ b/sonar-ws/src/main/protobuf/ws-hotspots.proto @@ -72,13 +72,14 @@ message ShowWsResponse { } message Component { - optional string key = 1; - optional string qualifier = 2; - optional string name = 3; - optional string longName = 4; - optional string path = 5; - optional string branch = 6; - optional string pullRequest = 7; + reserved 1; //drop organization + optional string key = 2; + optional string qualifier = 3; + optional string name = 4; + optional string longName = 5; + optional string path = 6; + optional string branch = 7; + optional string pullRequest = 8; } message Rule { diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto index 6fc075deb72..4ef3ae4d54c 100644 --- a/sonar-ws/src/main/protobuf/ws-issues.proto +++ b/sonar-ws/src/main/protobuf/ws-issues.proto @@ -102,6 +102,8 @@ message TagsResponse { } message Issue { + reserved 29; //drop organization + optional string key = 1; optional string rule = 2; optional sonarqube.ws.commons.Severity severity = 3; @@ -110,7 +112,7 @@ message Issue { optional string project = 6; optional string subProject = 7; optional int32 line = 8; - optional string hash = 30; + optional string hash = 31; optional sonarqube.ws.commons.TextRange textRange = 9; repeated sonarqube.ws.commons.Flow flows = 10; optional string resolution = 11; @@ -148,12 +150,13 @@ message Issue { optional sonarqube.ws.commons.RuleType type = 27; - optional string branch = 29; - optional string pullRequest = 31; - optional string externalRuleEngine = 32; - optional bool fromHotspot = 33; - optional string scope = 34; + optional string branch = 30; + optional string pullRequest = 32; + + optional string externalRuleEngine = 33; + optional bool fromHotspot = 34; + optional string scope = 35; } message Transitions { @@ -195,6 +198,7 @@ message Languages { } message Component { + reserved 11; //drop organization optional int64 deprecatedId = 1; optional string key = 2; optional string uuid = 3; @@ -205,8 +209,8 @@ message Component { optional string path = 8; optional int64 unusedProjectId = 9; optional int64 unusedSubProjectId = 10; - optional string branch = 11; - optional string pullRequest = 12; + optional string branch = 12; + optional string pullRequest = 13; } // Response of GET api/issues/changelog diff --git a/sonar-ws/src/main/protobuf/ws-notifications.proto b/sonar-ws/src/main/protobuf/ws-notifications.proto index 1cf7782806c..12af22ff501 100644 --- a/sonar-ws/src/main/protobuf/ws-notifications.proto +++ b/sonar-ws/src/main/protobuf/ws-notifications.proto @@ -33,6 +33,7 @@ message ListResponse { } message Notification { + reserved 5; //drop organization optional string channel = 1; optional string type = 2; optional string project = 3; -- 2.39.5