-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrated code lifecycle: Improve build status updates for users (#9818
- Loading branch information
Showing
48 changed files
with
1,564 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...in/java/de/tum/cit/aet/artemis/programming/domain/ProgrammingExerciseBuildStatistics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package de.tum.cit.aet.artemis.programming.domain; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import de.tum.cit.aet.artemis.core.domain.DomainObject; | ||
|
||
@Entity | ||
@Table(name = "programming_exercise_build_statistics") | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public class ProgrammingExerciseBuildStatistics extends DomainObject { | ||
|
||
@Column(name = "build_duration_seconds") | ||
private long buildDurationSeconds = 0; | ||
|
||
@Column(name = "build_count_when_updated") | ||
private long buildCountWhenUpdated = 0; | ||
|
||
@Column(name = "exercise_id") | ||
private Long exerciseId; | ||
|
||
public ProgrammingExerciseBuildStatistics() { | ||
} | ||
|
||
public ProgrammingExerciseBuildStatistics(Long exerciseId, long buildDurationSeconds, long buildCountWhenUpdated) { | ||
this.buildDurationSeconds = buildDurationSeconds; | ||
this.buildCountWhenUpdated = buildCountWhenUpdated; | ||
this.exerciseId = exerciseId; | ||
} | ||
|
||
public long getBuildDurationSeconds() { | ||
return buildDurationSeconds; | ||
} | ||
|
||
public void setBuildDurationSeconds(long buildDurationSeconds) { | ||
this.buildDurationSeconds = buildDurationSeconds; | ||
} | ||
|
||
public long getBuildCountWhenUpdated() { | ||
return buildCountWhenUpdated; | ||
} | ||
|
||
public void setBuildCountWhenUpdated(long buildCountWhenUpdated) { | ||
this.buildCountWhenUpdated = buildCountWhenUpdated; | ||
} | ||
|
||
public Long getExerciseId() { | ||
return exerciseId; | ||
} | ||
|
||
public void setExerciseId(Long exerciseId) { | ||
this.exerciseId = exerciseId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/de/tum/cit/aet/artemis/programming/dto/SubmissionProcessingDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package de.tum.cit.aet.artemis.programming.dto; | ||
|
||
import java.io.Serial; | ||
import java.io.Serializable; | ||
import java.time.ZonedDateTime; | ||
|
||
public record SubmissionProcessingDTO(long exerciseId, long participationId, String commitHash, ZonedDateTime submissionDate, ZonedDateTime buildStartDate, | ||
ZonedDateTime estimatedCompletionDate) implements Serializable { | ||
|
||
@Serial | ||
private static final long serialVersionUID = 1L; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../cit/aet/artemis/programming/repository/ProgrammingExerciseBuildStatisticsRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package de.tum.cit.aet.artemis.programming.repository; | ||
|
||
import static de.tum.cit.aet.artemis.core.config.Constants.PROFILE_CORE; | ||
|
||
import java.util.Optional; | ||
|
||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import de.tum.cit.aet.artemis.core.repository.base.ArtemisJpaRepository; | ||
import de.tum.cit.aet.artemis.programming.domain.ProgrammingExerciseBuildStatistics; | ||
|
||
@Profile(PROFILE_CORE) | ||
@Repository | ||
public interface ProgrammingExerciseBuildStatisticsRepository extends ArtemisJpaRepository<ProgrammingExerciseBuildStatistics, Long> { | ||
|
||
Optional<ProgrammingExerciseBuildStatistics> findByExerciseId(Long exerciseId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.