aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce-task-projectanalysis
diff options
context:
space:
mode:
authorAlain Kermis <alain.kermis@sonarsource.com>2023-07-20 16:03:24 +0200
committersonartech <sonartech@sonarsource.com>2023-07-21 20:03:17 +0000
commit13f4b6670e24e6395138219f1a8e05873858997a (patch)
tree4345642b8d38405811e96a57f3e7e512426b4450 /server/sonar-ce-task-projectanalysis
parent5af64e5d3a4e5188f0e5c6c7ebf8adab4d3b0cbe (diff)
downloadsonarqube-13f4b6670e24e6395138219f1a8e05873858997a.tar.gz
sonarqube-13f4b6670e24e6395138219f1a8e05873858997a.zip
SONAR-7698 Rename snapshots column build_date to analysis_date
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
-rw-r--r--server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java4
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisStep.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStep.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/protobuf/project_dump.proto2
6 files changed, 7 insertions, 7 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java
index d6f66880716..f61e009d008 100644
--- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java
+++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ReportPersistAnalysisStepIT.java
@@ -126,7 +126,7 @@ public class ReportPersistAnalysisStepIT extends BaseStepTest {
assertThat(projectSnapshot.getLast()).isFalse();
assertThat(projectSnapshot.getStatus()).isEqualTo("U");
assertThat(projectSnapshot.getCreatedAt()).isEqualTo(analysisDate);
- assertThat(projectSnapshot.getBuildDate()).isEqualTo(now);
+ assertThat(projectSnapshot.getAnalysisDate()).isEqualTo(now);
assertThat(projectSnapshot.getRevision()).isEqualTo(REVISION_ID);
}
diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java
index 2b07a07158c..1849d0d3241 100644
--- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java
+++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ViewsPersistAnalysisStepIT.java
@@ -111,7 +111,7 @@ public class ViewsPersistAnalysisStepIT extends BaseStepTest {
assertThat(viewSnapshot.getLast()).isFalse();
assertThat(viewSnapshot.getStatus()).isEqualTo("U");
assertThat(viewSnapshot.getCreatedAt()).isEqualTo(analysisDate);
- assertThat(viewSnapshot.getBuildDate()).isEqualTo(now);
+ assertThat(viewSnapshot.getAnalysisDate()).isEqualTo(now);
}
@Test
diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java
index 7cd38451189..4489e9dfbd7 100644
--- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java
+++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStepIT.java
@@ -192,7 +192,7 @@ public class ExportAnalysesStepIT {
.hasMessage("Analysis Export failed after processing 1 analyses successfully");
}
- private static SnapshotDto newAnalysis(String uuid, long date, String componentUuid, @Nullable String version, boolean isLast, @Nullable String buildString, long buildDate) {
+ private static SnapshotDto newAnalysis(String uuid, long date, String componentUuid, @Nullable String version, boolean isLast, @Nullable String buildString, long analysisDate) {
return new SnapshotDto()
.setUuid(uuid)
.setCreatedAt(date)
@@ -201,7 +201,7 @@ public class ExportAnalysesStepIT {
.setBuildString(buildString)
.setLast(isLast)
.setStatus(SnapshotDto.STATUS_PROCESSED)
- .setBuildDate(buildDate);
+ .setAnalysisDate(analysisDate);
}
private static void assertAnalysis(ProjectDump.Analysis analysis, ComponentDto component, SnapshotDto dto) {
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisStep.java
index 2b8e262b9ba..5ad72e71fd1 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistAnalysisStep.java
@@ -111,7 +111,7 @@ public class PersistAnalysisStep implements ComputationStep {
.setLast(false)
.setStatus(SnapshotDto.STATUS_UNPROCESSED)
.setCreatedAt(analysisDate)
- .setBuildDate(system2.now());
+ .setAnalysisDate(system2.now());
if (component.getType() == PROJECT) {
component.getProjectAttributes().getScmRevisionId().ifPresent(dto::setRevision);
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStep.java
index 2db9737900c..4295787a3d2 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectexport/analysis/ExportAnalysesStep.java
@@ -52,7 +52,7 @@ public class ExportAnalysesStep implements ComputationStep {
" inner join components p on s.root_component_uuid=p.uuid" +
" inner join project_branches pb on pb.uuid=p.uuid" +
" where pb.project_uuid=? and pb.branch_type = 'BRANCH' and pb.exclude_from_purge=? and s.status=? and p.enabled=?" +
- " order by s.build_date asc";
+ " order by s.analysis_date asc";
private final DbClient dbClient;
private final ProjectHolder projectHolder;
diff --git a/server/sonar-ce-task-projectanalysis/src/main/protobuf/project_dump.proto b/server/sonar-ce-task-projectanalysis/src/main/protobuf/project_dump.proto
index f495c6df4d0..1b73531a93e 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/protobuf/project_dump.proto
+++ b/server/sonar-ce-task-projectanalysis/src/main/protobuf/project_dump.proto
@@ -49,7 +49,7 @@ message Branch {
// Stream of analyses stored in file analyses.pb, including project.
// Only analyses with status 'P' (processed) are exported. They are ordered
-// by build_date, so that parents are always located before children.
+// by analysis_date, so that parents are always located before children.
message Analysis {
int64 component_ref = 2;
int64 date = 3;