From: Simon Brandhof Date: Wed, 30 Sep 2015 09:39:34 +0000 (+0200) Subject: SONAR-6834 Rename column CE_ACTIVITY.FINISHED_AT to EXECUTED_AT X-Git-Tag: 5.2-RC1~185 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a4d652253d8f3e55c1903c0bf4bb513a100ebbf1;p=sonarqube.git SONAR-6834 Rename column CE_ACTIVITY.FINISHED_AT to EXECUTED_AT --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueImpl.java b/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueImpl.java index f3ce365a2e1..17b9cb214bc 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueImpl.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeQueueImpl.java @@ -194,8 +194,8 @@ public class CeQueueImpl implements CeQueue { if (startedAt == null) { return; } - activityDto.setFinishedAt(system2.now()); - long executionTime = activityDto.getFinishedAt() - startedAt; + activityDto.setExecutedAt(system2.now()); + long executionTime = activityDto.getExecutedAt() - startedAt; activityDto.setExecutionTimeMs(executionTime); if (status == CeActivityDto.Status.SUCCESS) { queueStatus.addSuccess(executionTime); diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeWorkerRunnableImpl.java b/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeWorkerRunnableImpl.java index 5456814ddfe..9b46bb3a696 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeWorkerRunnableImpl.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/queue/CeWorkerRunnableImpl.java @@ -76,7 +76,7 @@ public class CeWorkerRunnableImpl implements CeWorkerRunnable { status = CeActivityDto.Status.SUCCESS; queue.remove(task, status); } catch (Throwable e) { - LOG.error(format("Failed to process task %s", task.getUuid()), e); + LOG.error(format("Failed to execute task %s", task.getUuid()), e); queue.remove(task, status); } finally { // logging twice: once in sonar.log and once in CE appender @@ -87,14 +87,14 @@ public class CeWorkerRunnableImpl implements CeWorkerRunnable { } private static Profiler startProfiler(CeTask task) { - return Profiler.create(LOG).startInfo("Process task | project={} | id={}", task.getComponentKey(), task.getUuid()); + return Profiler.create(LOG).startInfo("Execute task | project={} | id={}", task.getComponentKey(), task.getUuid()); } private static void stopProfiler(Profiler profiler, CeTask task, CeActivityDto.Status status) { if (status == CeActivityDto.Status.FAILED) { - profiler.stopError("Processed task | project={} | id={}", task.getComponentKey(), task.getUuid()); + profiler.stopError("Executed task | project={} | id={}", task.getComponentKey(), task.getUuid()); } else { - profiler.stopInfo("Processed task | project={} | id={}", task.getComponentKey(), task.getUuid()); + profiler.stopInfo("Executed task | project={} | id={}", task.getComponentKey(), task.getUuid()); } } } diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityWsAction.java index fa161d85c6f..4d495f58acb 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityWsAction.java @@ -49,7 +49,7 @@ public class ActivityWsAction implements CeWsAction { private static final String PARAM_STATUS = "status"; private static final String PARAM_ONLY_CURRENTS = "onlyCurrents"; private static final String PARAM_MIN_SUBMITTED_AT = "minSubmittedAt"; - private static final String PARAM_MAX_FINISHED_AT = "maxFinishedAt"; + private static final String PARAM_MAX_EXECUTED_AT = "maxExecutedAt"; private final UserSession userSession; private final DbClient dbClient; @@ -83,7 +83,7 @@ public class ActivityWsAction implements CeWsAction { action.createParam(PARAM_MIN_SUBMITTED_AT) .setDescription("Optional filter on minimum date of task submission") .setExampleValue(DateUtils.formatDateTime(new Date())); - action.createParam(PARAM_MAX_FINISHED_AT) + action.createParam(PARAM_MAX_EXECUTED_AT) .setDescription("Optional filter on the maximum date of end of task processing") .setExampleValue(DateUtils.formatDateTime(new Date())); action.addPagingParams(10); @@ -116,7 +116,7 @@ public class ActivityWsAction implements CeWsAction { query.setType(wsRequest.param(PARAM_TYPE)); query.setOnlyCurrents(wsRequest.mandatoryParamAsBoolean(PARAM_ONLY_CURRENTS)); query.setMinSubmittedAt(toTime(wsRequest.paramAsDateTime(PARAM_MIN_SUBMITTED_AT))); - query.setMaxFinishedAt(toTime(wsRequest.paramAsDateTime(PARAM_MAX_FINISHED_AT))); + query.setMaxExecutedAt(toTime(wsRequest.paramAsDateTime(PARAM_MAX_EXECUTED_AT))); String status = wsRequest.param(PARAM_STATUS); if (status != null) { diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskFormatter.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskFormatter.java index cfaaf639da5..0118389f95b 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskFormatter.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskFormatter.java @@ -114,8 +114,8 @@ public class TaskFormatter { if (dto.getStartedAt() != null) { builder.setStartedAt(DateUtils.formatDateTime(new Date(dto.getStartedAt()))); } - if (dto.getFinishedAt() != null) { - builder.setFinishedAt(DateUtils.formatDateTime(new Date(dto.getFinishedAt()))); + if (dto.getExecutedAt() != null) { + builder.setExecutedAt(DateUtils.formatDateTime(new Date(dto.getExecutedAt()))); } if (dto.getExecutionTimeMs() != null) { builder.setExecutionTimeMs(dto.getExecutionTimeMs()); diff --git a/server/sonar-server/src/main/resources/org/sonar/server/computation/ws/activity-example.json b/server/sonar-server/src/main/resources/org/sonar/server/computation/ws/activity-example.json index f6b40d89ec2..2e59858722e 100644 --- a/server/sonar-server/src/main/resources/org/sonar/server/computation/ws/activity-example.json +++ b/server/sonar-server/src/main/resources/org/sonar/server/computation/ws/activity-example.json @@ -15,7 +15,7 @@ "submittedAt": "2015-08-13T23:34:59+0200", "submitterLogin": "john", "startedAt": "2015-08-13T23:35:00+0200", - "finishedAt": "2015-08-13T23:35:10+0200", + "executedAt": "2015-08-13T23:35:10+0200", "executionTimeMs": 10000, "logs": true }, @@ -28,7 +28,7 @@ "status": "FAILED", "submittedAt": "2015-09-17T23:34:59+0200", "startedAt": "2015-09-17T23:35:00+0200", - "finishedAt": "2015-08-13T23:37:00+0200", + "executedAt": "2015-08-13T23:37:00+0200", "executionTimeMs": 120000, "logs": false } diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskFormatterTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskFormatterTest.java index bfd3377e9b6..1adfbc3e4af 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskFormatterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskFormatterTest.java @@ -76,7 +76,7 @@ public class TaskFormatterTest { assertThat(wsTask.hasComponentId()).isFalse(); assertThat(wsTask.hasComponentKey()).isFalse(); assertThat(wsTask.hasComponentName()).isFalse(); - assertThat(wsTask.hasFinishedAt()).isFalse(); + assertThat(wsTask.hasExecutedAt()).isFalse(); } @Test @@ -105,7 +105,7 @@ public class TaskFormatterTest { assertThat(wsTask.getSubmitterLogin()).isEqualTo("rob"); assertThat(wsTask.hasExecutionTimeMs()).isFalse(); - assertThat(wsTask.hasFinishedAt()).isFalse(); + assertThat(wsTask.hasExecutedAt()).isFalse(); } @Test diff --git a/server/sonar-web/src/main/js/apps/background-tasks/main.js b/server/sonar-web/src/main/js/apps/background-tasks/main.js index cdc56585af1..ddffd8d8831 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/main.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/main.js @@ -57,7 +57,7 @@ export default React.createClass({ filter.minSubmittedAt = moment(this.state.minDate).format(DATE_FORMAT); } if (this.state.maxDate) { - filter.maxFinishedAt = moment(this.state.maxDate).format(DATE_FORMAT); + filter.maxExecutedAt = moment(this.state.maxDate).format(DATE_FORMAT); } break; default: diff --git a/server/sonar-web/src/main/js/apps/background-tasks/tasks.js b/server/sonar-web/src/main/js/apps/background-tasks/tasks.js index 2b347e2b24e..9e0e6b33e9b 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/tasks.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/tasks.js @@ -110,7 +110,7 @@ export default React.createClass({ {this.renderTaskDay(task, previousTask)} {this.renderTaskDate(task, 'submittedAt', 'LTS')} {this.renderTaskDate(task, 'startedAt', 'LTS')} - {this.renderTaskDate(task, 'finishedAt', 'LTS')} + {this.renderTaskDate(task, 'executedAt', 'LTS')} {this.renderTaskExecutionTime(task)} {this.renderLogsLink(task)} diff --git a/server/sonar-web/src/main/js/apps/computation/report.js b/server/sonar-web/src/main/js/apps/computation/report.js index a8bbec66824..3dec4d50324 100644 --- a/server/sonar-web/src/main/js/apps/computation/report.js +++ b/server/sonar-web/src/main/js/apps/computation/report.js @@ -7,7 +7,7 @@ export default Backbone.Model.extend({ var duration = null; if (this.has('startedAt')) { var startedAtMoment = moment(this.get('startedAt')), - finishedAtMoment = moment(this.get('finishedAt') || new Date()), + finishedAtMoment = moment(this.get('executedAt') || new Date()), diff = finishedAtMoment.diff(startedAtMoment); duration = { seconds: Math.floor(diff / 1000) % 60, diff --git a/server/sonar-web/src/main/js/apps/computation/templates/computation-list-item.hbs b/server/sonar-web/src/main/js/apps/computation/templates/computation-list-item.hbs index 85465a1b5cb..dcc4feb1bfc 100644 --- a/server/sonar-web/src/main/js/apps/computation/templates/computation-list-item.hbs +++ b/server/sonar-web/src/main/js/apps/computation/templates/computation-list-item.hbs @@ -11,8 +11,8 @@ {{#if startedAt}}
  • Started: {{dt startedAt}}
  • {{/if}} - {{#if finishedAt}} -
  • Finished: {{dt finishedAt}}
  • + {{#if executedAt}} +
  • Executed: {{dt executedAt}}
  • {{/if}} diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/931_create_ce_activity.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/931_create_ce_activity.rb index 88e5fa87c18..55a6e90fe77 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/931_create_ce_activity.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/931_create_ce_activity.rb @@ -33,7 +33,7 @@ class CreateCeActivity < ActiveRecord::Migration t.column 'submitter_login', :string, :limit => 255, :null => true t.column 'submitted_at', :big_integer, :null => false t.column 'started_at', :big_integer, :null => true - t.column 'finished_at', :big_integer, :null => true + t.column 'executed_at', :big_integer, :null => true t.column 'created_at', :big_integer, :null => false t.column 'updated_at', :big_integer, :null => false t.column 'execution_time_ms', :big_integer, :null => true diff --git a/server/sonar-web/test/json/computation-spec/history-big-1.json b/server/sonar-web/test/json/computation-spec/history-big-1.json index d0cb80fa1a8..2007319f5e8 100644 --- a/server/sonar-web/test/json/computation-spec/history-big-1.json +++ b/server/sonar-web/test/json/computation-spec/history-big-1.json @@ -14,7 +14,7 @@ "status": "SUCCESS", "submittedAt": "2015-09-18T11:20:43+0200", "startedAt": "2015-09-18T11:20:37+0200", - "finishedAt": "2015-09-18T11:20:43+0200", + "executedAt": "2015-09-18T11:20:43+0200", "executionTimeMs": 6030 }, { @@ -26,7 +26,7 @@ "status": "SUCCESS", "submittedAt": "2015-09-18T11:16:56+0200", "startedAt": "2015-09-18T11:16:47+0200", - "finishedAt": "2015-09-18T11:16:56+0200", + "executedAt": "2015-09-18T11:16:56+0200", "executionTimeMs": 8671 } ] diff --git a/server/sonar-web/test/json/computation-spec/history-big-2.json b/server/sonar-web/test/json/computation-spec/history-big-2.json index 08c000455b8..82bb0687ca6 100644 --- a/server/sonar-web/test/json/computation-spec/history-big-2.json +++ b/server/sonar-web/test/json/computation-spec/history-big-2.json @@ -14,7 +14,7 @@ "status": "SUCCESS", "submittedAt": "2015-09-18T11:16:56+0200", "startedAt": "2015-09-18T11:16:47+0200", - "finishedAt": "2015-09-18T11:16:56+0200", + "executedAt": "2015-09-18T11:16:56+0200", "executionTimeMs": 8671 } ] diff --git a/server/sonar-web/test/json/computation-spec/history.json b/server/sonar-web/test/json/computation-spec/history.json index 285e15a7301..2aa4f0265f9 100644 --- a/server/sonar-web/test/json/computation-spec/history.json +++ b/server/sonar-web/test/json/computation-spec/history.json @@ -14,7 +14,7 @@ "status": "SUCCESS", "submittedAt": "2015-09-18T11:20:43+0200", "startedAt": "2015-09-18T11:20:37+0200", - "finishedAt": "2015-09-18T11:20:43+0200", + "executedAt": "2015-09-18T11:20:43+0200", "executionTimeMs": 6030 }, { @@ -26,7 +26,7 @@ "status": "SUCCESS", "submittedAt": "2015-09-18T11:16:56+0200", "startedAt": "2015-09-18T11:16:47+0200", - "finishedAt": "2015-09-18T11:16:56+0200", + "executedAt": "2015-09-18T11:16:56+0200", "executionTimeMs": 8671 } ] diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityDto.java b/sonar-db/src/main/java/org/sonar/db/ce/CeActivityDto.java index db2f1a10c39..35133e20db0 100644 --- a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityDto.java +++ b/sonar-db/src/main/java/org/sonar/db/ce/CeActivityDto.java @@ -42,7 +42,7 @@ public class CeActivityDto { private String submitterLogin; private long submittedAt; private Long startedAt; - private Long finishedAt; + private Long executedAt; private long createdAt; private long updatedAt; private Long executionTimeMs; @@ -131,12 +131,12 @@ public class CeActivityDto { } @CheckForNull - public Long getFinishedAt() { - return finishedAt; + public Long getExecutedAt() { + return executedAt; } - public void setFinishedAt(@Nullable Long l) { - this.finishedAt = l; + public void setExecutedAt(@Nullable Long l) { + this.executedAt = l; } public long getCreatedAt() { @@ -177,7 +177,7 @@ public class CeActivityDto { .add("submitterLogin", submitterLogin) .add("submittedAt", submittedAt) .add("startedAt", startedAt) - .add("finishedAt", finishedAt) + .add("executedAt", executedAt) .add("createdAt", createdAt) .add("updatedAt", updatedAt) .add("executionTimeMs", executionTimeMs) diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityQuery.java b/sonar-db/src/main/java/org/sonar/db/ce/CeActivityQuery.java index 04f6d0ca7f4..355439d9ae2 100644 --- a/sonar-db/src/main/java/org/sonar/db/ce/CeActivityQuery.java +++ b/sonar-db/src/main/java/org/sonar/db/ce/CeActivityQuery.java @@ -29,7 +29,7 @@ public class CeActivityQuery { private CeActivityDto.Status status; private String type; private Long minSubmittedAt; - private Long maxFinishedAt; + private Long maxExecutedAt; @CheckForNull public String getComponentUuid() { @@ -71,12 +71,12 @@ public class CeActivityQuery { } @CheckForNull - public Long getMaxFinishedAt() { - return maxFinishedAt; + public Long getMaxExecutedAt() { + return maxExecutedAt; } - public CeActivityQuery setMaxFinishedAt(@Nullable Long l) { - this.maxFinishedAt = l; + public CeActivityQuery setMaxExecutedAt(@Nullable Long l) { + this.maxExecutedAt = l; return this; } diff --git a/sonar-db/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml b/sonar-db/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml index c466d93cbcc..3c10c891e62 100644 --- a/sonar-db/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/ce/CeActivityMapper.xml @@ -11,7 +11,7 @@ ca.submitter_login as submitterLogin, ca.submitted_at as submittedAt, ca.started_at as startedAt, - ca.finished_at as finishedAt, + ca.executed_at as executedAt, ca.created_at as createdAt, ca.updated_at as updatedAt, ca.is_last as isLast, @@ -61,8 +61,8 @@ and ca.submitted_at >= #{query.minSubmittedAt} - - and ca.finished_at <= #{query.maxFinishedAt} + + and ca.executed_at <= #{query.maxExecutedAt} order by ca.id desc @@ -87,8 +87,8 @@ and ca.submitted_at >= #{query.minSubmittedAt} - - and ca.finished_at <= #{query.maxFinishedAt} + + and ca.executed_at <= #{query.maxExecutedAt} @@ -102,7 +102,7 @@ insert into ce_activity (uuid, component_uuid, status, task_type, is_last, is_last_key, submitter_login, submitted_at, started_at, - finished_at, created_at, updated_at, execution_time_ms) + executed_at, created_at, updated_at, execution_time_ms) values ( #{uuid,jdbcType=VARCHAR}, #{componentUuid,jdbcType=VARCHAR}, @@ -113,7 +113,7 @@ #{submitterLogin,jdbcType=VARCHAR}, #{submittedAt,jdbcType=BIGINT}, #{startedAt,jdbcType=BIGINT}, - #{finishedAt,jdbcType=BIGINT}, + #{executedAt,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{executionTimeMs,jdbcType=BIGINT} diff --git a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl b/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl index 2ef8f08a9ce..f68481ba36e 100644 --- a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl +++ b/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl @@ -508,18 +508,6 @@ CREATE TABLE "ACTIVITIES" ( "DATA_FIELD" CLOB(2147483647) ); -CREATE TABLE "ANALYSIS_REPORTS" ( - "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), - "PROJECT_KEY" VARCHAR(400) NOT NULL, - "PROJECT_NAME" VARCHAR(256) NULL, - "REPORT_STATUS" VARCHAR(20) NOT NULL, - "UUID" VARCHAR(50) NOT NULL, - "CREATED_AT" BIGINT NOT NULL, - "UPDATED_AT" BIGINT NOT NULL, - "STARTED_AT" BIGINT, - "FINISHED_AT" BIGINT -); - CREATE TABLE "FILE_SOURCES" ( "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), "PROJECT_UUID" VARCHAR(50) NOT NULL, @@ -557,7 +545,7 @@ CREATE TABLE "CE_ACTIVITY" ( "SUBMITTER_LOGIN" VARCHAR(255) NULL, "SUBMITTED_AT" BIGINT NOT NULL, "STARTED_AT" BIGINT NULL, - "FINISHED_AT" BIGINT NULL, + "EXECUTED_AT" BIGINT NULL, "CREATED_AT" BIGINT NOT NULL, "UPDATED_AT" BIGINT NOT NULL, "EXECUTION_TIME_MS" BIGINT NULL diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java b/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java index e714e688bf1..6138e4de2ea 100644 --- a/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java @@ -58,7 +58,7 @@ public class CeActivityDaoTest { assertThat(saved.get().getSubmittedAt()).isEqualTo(1_300_000_000_000L); assertThat(saved.get().getCreatedAt()).isEqualTo(1_450_000_000_000L); assertThat(saved.get().getStartedAt()).isEqualTo(1_500_000_000_000L); - assertThat(saved.get().getFinishedAt()).isEqualTo(1_500_000_000_500L); + assertThat(saved.get().getExecutedAt()).isEqualTo(1_500_000_000_500L); assertThat(saved.get().getExecutionTimeMs()).isEqualTo(500L); } @@ -155,28 +155,28 @@ public class CeActivityDaoTest { assertThat(underTest.selectByQuery(db.getSession(), query, new RowBounds(0, 10))).extracting("uuid").containsOnly("UUID2"); assertThat(underTest.countByQuery(db.getSession(), query)).isEqualTo(1); - // search by max finished date - query = new CeActivityQuery().setMaxFinishedAt(1_475_000_000_000L); + // search by max executed date + query = new CeActivityQuery().setMaxExecutedAt(1_475_000_000_000L); assertThat(underTest.selectByQuery(db.getSession(), query, new RowBounds(0, 10))).extracting("uuid").containsOnly("UUID1"); assertThat(underTest.countByQuery(db.getSession(), query)).isEqualTo(1); // search by both dates query = new CeActivityQuery() .setMinSubmittedAt(1_400_000_000_000L) - .setMaxFinishedAt(1_475_000_000_000L); + .setMaxExecutedAt(1_475_000_000_000L); assertThat(underTest.selectByQuery(db.getSession(), query, new RowBounds(0, 10))).extracting("uuid").containsOnly("UUID1"); assertThat(underTest.countByQuery(db.getSession(), query)).isEqualTo(1); } - private void insertWithDates(String uuid, long submittedAt, long finishedAt) { + private void insertWithDates(String uuid, long submittedAt, long executedAt) { CeQueueDto queueDto = new CeQueueDto(); queueDto.setUuid(uuid); queueDto.setTaskType("fake"); CeActivityDto dto = new CeActivityDto(queueDto); dto.setStatus(CeActivityDto.Status.SUCCESS); dto.setSubmittedAt(submittedAt); - dto.setFinishedAt(finishedAt); + dto.setExecutedAt(executedAt); underTest.insert(db.getSession(), dto); } @@ -221,7 +221,7 @@ public class CeActivityDaoTest { CeActivityDto dto = new CeActivityDto(queueDto); dto.setStatus(status); dto.setStartedAt(1_500_000_000_000L); - dto.setFinishedAt(1_500_000_000_500L); + dto.setExecutedAt(1_500_000_000_500L); dto.setExecutionTimeMs(500L); underTest.insert(db.getSession(), dto); } diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/WsCe.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/WsCe.java index 797bd2aa902..630ac930185 100644 --- a/sonar-ws/src/main/gen-java/org/sonarqube/ws/WsCe.java +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/WsCe.java @@ -3821,27 +3821,30 @@ public final class WsCe { getStartedAtBytes(); /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - boolean hasFinishedAt(); + boolean hasExecutedAt(); + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - java.lang.String getFinishedAt(); + java.lang.String getExecutedAt(); + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ com.google.protobuf.ByteString - getFinishedAtBytes(); + getExecutedAtBytes(); /** - * optional bool isLastFinished = 11; + * optional bool isLastExecuted = 11; */ - boolean hasIsLastFinished(); + boolean hasIsLastExecuted(); + /** - * optional bool isLastFinished = 11; + * optional bool isLastExecuted = 11; */ - boolean getIsLastFinished(); + boolean getIsLastExecuted(); /** * optional int64 executionTimeMs = 12; @@ -3856,7 +3859,6 @@ public final class WsCe { * optional bool logs = 13; */ boolean hasLogs(); - /** * optional bool logs = 13; */ @@ -3883,8 +3885,8 @@ public final class WsCe { submittedAt_ = ""; submitterLogin_ = ""; startedAt_ = ""; - finishedAt_ = ""; - isLastFinished_ = false; + executedAt_ = ""; + isLastExecuted_ = false; executionTimeMs_ = 0L; logs_ = false; } @@ -3978,12 +3980,12 @@ public final class WsCe { case 82: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000200; - finishedAt_ = bs; + executedAt_ = bs; break; } case 88: { bitField0_ |= 0x00000400; - isLastFinished_ = input.readBool(); + isLastExecuted_ = input.readBool(); break; } case 96: { @@ -4374,19 +4376,21 @@ public final class WsCe { } } - public static final int FINISHEDAT_FIELD_NUMBER = 10; - private volatile java.lang.Object finishedAt_; + public static final int EXECUTEDAT_FIELD_NUMBER = 10; + private volatile java.lang.Object executedAt_; + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - public boolean hasFinishedAt() { + public boolean hasExecutedAt() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - public java.lang.String getFinishedAt() { - java.lang.Object ref = finishedAt_; + public java.lang.String getExecutedAt() { + java.lang.Object ref = executedAt_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -4394,41 +4398,44 @@ public final class WsCe { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - finishedAt_ = s; + executedAt_ = s; } return s; } } + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ public com.google.protobuf.ByteString - getFinishedAtBytes() { - java.lang.Object ref = finishedAt_; + getExecutedAtBytes() { + java.lang.Object ref = executedAt_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - finishedAt_ = b; + executedAt_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int ISLASTFINISHED_FIELD_NUMBER = 11; - private boolean isLastFinished_; + public static final int ISLASTEXECUTED_FIELD_NUMBER = 11; + private boolean isLastExecuted_; + /** - * optional bool isLastFinished = 11; + * optional bool isLastExecuted = 11; */ - public boolean hasIsLastFinished() { + public boolean hasIsLastExecuted() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** - * optional bool isLastFinished = 11; + * optional bool isLastExecuted = 11; */ - public boolean getIsLastFinished() { - return isLastFinished_; + public boolean getIsLastExecuted() { + return isLastExecuted_; } public static final int EXECUTIONTIMEMS_FIELD_NUMBER = 12; @@ -4448,14 +4455,12 @@ public final class WsCe { public static final int LOGS_FIELD_NUMBER = 13; private boolean logs_; - /** * optional bool logs = 13; */ public boolean hasLogs() { return ((bitField0_ & 0x00001000) == 0x00001000); } - /** * optional bool logs = 13; */ @@ -4503,10 +4508,10 @@ public final class WsCe { output.writeBytes(9, getStartedAtBytes()); } if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeBytes(10, getFinishedAtBytes()); + output.writeBytes(10, getExecutedAtBytes()); } if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeBool(11, isLastFinished_); + output.writeBool(11, isLastExecuted_); } if (((bitField0_ & 0x00000800) == 0x00000800)) { output.writeInt64(12, executionTimeMs_); @@ -4561,11 +4566,11 @@ public final class WsCe { } if (((bitField0_ & 0x00000200) == 0x00000200)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, getFinishedAtBytes()); + .computeBytesSize(10, getExecutedAtBytes()); } if (((bitField0_ & 0x00000400) == 0x00000400)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(11, isLastFinished_); + .computeBoolSize(11, isLastExecuted_); } if (((bitField0_ & 0x00000800) == 0x00000800)) { size += com.google.protobuf.CodedOutputStream @@ -4705,9 +4710,9 @@ public final class WsCe { bitField0_ = (bitField0_ & ~0x00000080); startedAt_ = ""; bitField0_ = (bitField0_ & ~0x00000100); - finishedAt_ = ""; + executedAt_ = ""; bitField0_ = (bitField0_ & ~0x00000200); - isLastFinished_ = false; + isLastExecuted_ = false; bitField0_ = (bitField0_ & ~0x00000400); executionTimeMs_ = 0L; bitField0_ = (bitField0_ & ~0x00000800); @@ -4776,11 +4781,11 @@ public final class WsCe { if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000200; } - result.finishedAt_ = finishedAt_; + result.executedAt_ = executedAt_; if (((from_bitField0_ & 0x00000400) == 0x00000400)) { to_bitField0_ |= 0x00000400; } - result.isLastFinished_ = isLastFinished_; + result.isLastExecuted_ = isLastExecuted_; if (((from_bitField0_ & 0x00000800) == 0x00000800)) { to_bitField0_ |= 0x00000800; } @@ -4848,13 +4853,13 @@ public final class WsCe { startedAt_ = other.startedAt_; onChanged(); } - if (other.hasFinishedAt()) { + if (other.hasExecutedAt()) { bitField0_ |= 0x00000200; - finishedAt_ = other.finishedAt_; + executedAt_ = other.executedAt_; onChanged(); } - if (other.hasIsLastFinished()) { - setIsLastFinished(other.getIsLastFinished()); + if (other.hasIsLastExecuted()) { + setIsLastExecuted(other.getIsLastExecuted()); } if (other.hasExecutionTimeMs()) { setExecutionTimeMs(other.getExecutionTimeMs()); @@ -5534,110 +5539,120 @@ public final class WsCe { return this; } - private java.lang.Object finishedAt_ = ""; + private java.lang.Object executedAt_ = ""; + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - public boolean hasFinishedAt() { + public boolean hasExecutedAt() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - public java.lang.String getFinishedAt() { - java.lang.Object ref = finishedAt_; + public java.lang.String getExecutedAt() { + java.lang.Object ref = executedAt_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - finishedAt_ = s; + executedAt_ = s; } return s; } else { return (java.lang.String) ref; } } + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ public com.google.protobuf.ByteString - getFinishedAtBytes() { - java.lang.Object ref = finishedAt_; + getExecutedAtBytes() { + java.lang.Object ref = executedAt_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - finishedAt_ = b; + executedAt_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - public Builder setFinishedAt( + public Builder setExecutedAt( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; - finishedAt_ = value; + executedAt_ = value; onChanged(); return this; } + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - public Builder clearFinishedAt() { + public Builder clearExecutedAt() { bitField0_ = (bitField0_ & ~0x00000200); - finishedAt_ = getDefaultInstance().getFinishedAt(); + executedAt_ = getDefaultInstance().getExecutedAt(); onChanged(); return this; } + /** - * optional string finishedAt = 10; + * optional string executedAt = 10; */ - public Builder setFinishedAtBytes( + public Builder setExecutedAtBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; - finishedAt_ = value; + executedAt_ = value; onChanged(); return this; } - private boolean isLastFinished_ ; + private boolean isLastExecuted_; + /** - * optional bool isLastFinished = 11; + * optional bool isLastExecuted = 11; */ - public boolean hasIsLastFinished() { + public boolean hasIsLastExecuted() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** - * optional bool isLastFinished = 11; + * optional bool isLastExecuted = 11; */ - public boolean getIsLastFinished() { - return isLastFinished_; + public boolean getIsLastExecuted() { + return isLastExecuted_; } + /** - * optional bool isLastFinished = 11; + * optional bool isLastExecuted = 11; */ - public Builder setIsLastFinished(boolean value) { + public Builder setIsLastExecuted(boolean value) { bitField0_ |= 0x00000400; - isLastFinished_ = value; + isLastExecuted_ = value; onChanged(); return this; } + /** - * optional bool isLastFinished = 11; + * optional bool isLastExecuted = 11; */ - public Builder clearIsLastFinished() { + public Builder clearIsLastExecuted() { bitField0_ = (bitField0_ & ~0x00000400); - isLastFinished_ = false; + isLastExecuted_ = false; onChanged(); return this; } @@ -5675,21 +5690,18 @@ public final class WsCe { } private boolean logs_; - /** * optional bool logs = 13; */ public boolean hasLogs() { return ((bitField0_ & 0x00001000) == 0x00001000); } - /** * optional bool logs = 13; */ public boolean getLogs() { return logs_; } - /** * optional bool logs = 13; */ @@ -5699,7 +5711,6 @@ public final class WsCe { onChanged(); return this; } - /** * optional bool logs = 13; */ @@ -5807,8 +5818,8 @@ public final class WsCe { "ey\030\004 \001(\t\022\025\n\rcomponentName\030\005 \001(\t\022+\n\006statu" + "s\030\006 \001(\0162\033.sonarqube.ws.ce.TaskStatus\022\023\n\013" + "submittedAt\030\007 \001(\t\022\026\n\016submitterLogin\030\010 \001(" + - "\t\022\021\n\tstartedAt\030\t \001(\t\022\022\n\nfinishedAt\030\n \001(\t" + - "\022\026\n\016isLastFinished\030\013 \001(\010\022\027\n\017executionTim" + + "\t\022\021\n\tstartedAt\030\t \001(\t\022\022\n\nexecutedAt\030\n \001(\t" + + "\022\026\n\016isLastExecuted\030\013 \001(\010\022\027\n\017executionTim" + "eMs\030\014 \001(\003\022\014\n\004logs\030\r \001(\010*Q\n\nTaskStatus\022\013\n" + "\007PENDING\020\000\022\017\n\013IN_PROGRESS\020\001\022\013\n\007SUCCESS\020\002" + "\022\n\n\006FAILED\020\003\022\014\n\010CANCELED\020\004B\032\n\020org.sonarq", @@ -5862,7 +5873,7 @@ public final class WsCe { internal_static_sonarqube_ws_ce_Task_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_sonarqube_ws_ce_Task_descriptor, - new java.lang.String[] {"Id", "Type", "ComponentId", "ComponentKey", "ComponentName", "Status", "SubmittedAt", "SubmitterLogin", "StartedAt", "FinishedAt", "IsLastFinished", + new java.lang.String[] {"Id", "Type", "ComponentId", "ComponentKey", "ComponentName", "Status", "SubmittedAt", "SubmitterLogin", "StartedAt", "ExecutedAt", "IsLastExecuted", "ExecutionTimeMs", "Logs",}); org.sonarqube.ws.Common.getDescriptor(); } diff --git a/sonar-ws/src/main/protobuf/ws-ce.proto b/sonar-ws/src/main/protobuf/ws-ce.proto index 4698ecc1fc7..4406113df2f 100644 --- a/sonar-ws/src/main/protobuf/ws-ce.proto +++ b/sonar-ws/src/main/protobuf/ws-ce.proto @@ -64,8 +64,8 @@ message Task { optional string submittedAt = 7; optional string submitterLogin = 8; optional string startedAt = 9; - optional string finishedAt = 10; - optional bool isLastFinished = 11; + optional string executedAt = 10; + optional bool isLastExecuted = 11; optional int64 executionTimeMs = 12; optional bool logs = 13; }