aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Vigneau <antoine.vigneau@sonarsource.com>2023-08-07 10:48:08 +0200
committersonartech <sonartech@sonarsource.com>2023-08-07 20:02:49 +0000
commitc0c4127781ce9b233db01b742a7db0cadf742bd0 (patch)
tree5756592ed01d6c4d0fd8d9ed117cc1c2fdf809da
parent97f8a1b245f9a3b1d58ad30be47d7c69dc1f28d0 (diff)
downloadsonarqube-c0c4127781ce9b233db01b742a7db0cadf742bd0.tar.gz
sonarqube-c0c4127781ce9b233db01b742a7db0cadf742bd0.zip
Revert "SONAR-19789 Return initial_perm_sync in /api/components/show"
This reverts commit 171c0704b98d9046bda7680585512d48ef73ecc2.
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/project/ProjectDto.java10
-rw-r--r--server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml9
-rw-r--r--server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java3
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/component/ws/ComponentDtoToWsComponent.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/resources/org/sonar/server/component/ws/show-example.json3
-rw-r--r--sonar-ws/src/main/protobuf/ws-components.proto1
6 files changed, 5 insertions, 22 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/project/ProjectDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/project/ProjectDto.java
index b26f5fbb94f..dac8567ad3d 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/project/ProjectDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/project/ProjectDto.java
@@ -33,7 +33,6 @@ public class ProjectDto extends EntityDto {
private String tags;
private long createdAt;
private long updatedAt;
- private String initialPermSync;
public long getCreatedAt() {
return createdAt;
@@ -114,13 +113,4 @@ public class ProjectDto extends EntityDto {
this.qualifier = qualifier;
return this;
}
-
- public String getInitialPermSync() {
- return initialPermSync;
- }
-
- public ProjectDto setInitialPermSync(@Nullable String initialPermSync) {
- this.initialPermSync = initialPermSync;
- return this;
- }
}
diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml
index 17bfd0b7209..dd94c2f4f37 100644
--- a/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml
+++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/project/ProjectMapper.xml
@@ -11,8 +11,7 @@
p.tags as tagsString,
p.private as isPrivate,
p.created_at as createdAt,
- p.updated_at as updatedAt,
- p.initial_perm_sync as initialPermSync
+ p.updated_at as updatedAt
</sql>
<select id="selectAllProjectUuids" resultType="String">
@@ -164,8 +163,7 @@
private,
tags,
created_at,
- updated_at,
- initial_perm_sync
+ updated_at
)
VALUES (
#{kee,jdbcType=VARCHAR},
@@ -176,8 +174,7 @@
#{isPrivate,jdbcType=BOOLEAN},
#{tagsString, jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT},
- #{updatedAt,jdbcType=BIGINT},
- #{initialPermSync,jdbcType=VARCHAR}
+ #{updatedAt,jdbcType=BIGINT}
)
</insert>
diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java
index 6cdec2ca0ea..a99b7cdba70 100644
--- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java
+++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/component/ws/ShowActionIT.java
@@ -478,8 +478,7 @@ public class ShowActionIT {
.setName("Java Markdown")
.setDescription("Java Markdown Project")
.setQualifier(Qualifiers.PROJECT),
- p -> p.setTagsString("language, plugin")
- .setInitialPermSync("FINISHED"));
+ p -> p.setTagsString("language, plugin"));
ComponentDto mainBranch = projectData.getMainBranchComponent();
userSession.addProjectPermission(USER, projectData.getProjectDto())
.registerBranches(projectData.getMainBranchDto());
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/component/ws/ComponentDtoToWsComponent.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/component/ws/ComponentDtoToWsComponent.java
index 07e148edf8f..8054a7745d0 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/component/ws/ComponentDtoToWsComponent.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/component/ws/ComponentDtoToWsComponent.java
@@ -51,7 +51,6 @@ class ComponentDtoToWsComponent {
.setQualifier(project.getQualifier());
ofNullable(emptyToNull(project.getDescription())).ifPresent(wsComponent::setDescription);
- ofNullable(emptyToNull(project.getInitialPermSync())).ifPresent(wsComponent::setInitialPermSync);
ofNullable(lastAnalysis).ifPresent(
analysis -> {
wsComponent.setAnalysisDate(formatDateTime(analysis.getCreatedAt()));
diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/component/ws/show-example.json b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/component/ws/show-example.json
index 9ff5afb9569..26799f51714 100644
--- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/component/ws/show-example.json
+++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/component/ws/show-example.json
@@ -29,8 +29,7 @@
"language",
"plugin"
],
- "visibility": "private",
- "initialPermSync": "FINISHED"
+ "visibility": "private"
}
]
}
diff --git a/sonar-ws/src/main/protobuf/ws-components.proto b/sonar-ws/src/main/protobuf/ws-components.proto
index f25736afaee..d51a8a2805b 100644
--- a/sonar-ws/src/main/protobuf/ws-components.proto
+++ b/sonar-ws/src/main/protobuf/ws-components.proto
@@ -114,7 +114,6 @@ message Component {
optional string version = 19;
optional string pullRequest = 20;
optional bool needIssueSync = 21;
- optional string initialPermSync = 22;
message Tags {
repeated string tags = 1;