-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jose Soto
committed
Oct 30, 2024
1 parent
ddf4f41
commit 27227b8
Showing
5 changed files
with
80 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,8 +91,8 @@ jobs: | |
needs: [ bump-check, build, tests-and-sonarqube ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Notify WSM Slack" | ||
# post to WSM Slack when a regular push (i.e. non-bumper push) is made to main branch | ||
- name: "Notify Teaspoons Slack" | ||
# post to Teaspoons Slack when a regular push (i.e. non-bumper push) is made to main branch | ||
if: always() && github.event_name == 'push' && needs.bump-check.outputs.is-bump == 'no' | ||
uses: broadinstitute/[email protected] | ||
# see https://github.com/broadinstitute/action-slack | ||
|
30 changes: 30 additions & 0 deletions
30
service/src/main/java/bio/terra/pipelines/db/entities/PipelineQuota.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,30 @@ | ||
package bio.terra.pipelines.db.entities; | ||
|
||
import bio.terra.pipelines.common.utils.PipelinesEnum; | ||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@Table(name = "pipeline_quotas") | ||
public class PipelineQuota { | ||
@Id | ||
@Column(name = "id", nullable = false) | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(name = "pipeline_name", nullable = false) | ||
private PipelinesEnum pipelineName; | ||
|
||
@Column(name = "default_quota") | ||
private Long defaultQuota; | ||
|
||
public PipelineQuota(PipelinesEnum pipelineName, Long defaultQuota) { | ||
this.pipelineName = pipelineName; | ||
this.defaultQuota = defaultQuota; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
service/src/main/java/bio/terra/pipelines/db/repositories/PipelineQuotasRepository.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,9 @@ | ||
package bio.terra.pipelines.db.repositories; | ||
|
||
import bio.terra.pipelines.common.utils.PipelinesEnum; | ||
import bio.terra.pipelines.db.entities.PipelineQuota; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface PipelineQuotasRepository extends CrudRepository<PipelineQuota, Long> { | ||
PipelineQuota findByPipelineName(PipelinesEnum pipelineName); | ||
} |
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
38 changes: 38 additions & 0 deletions
38
service/src/main/resources/db/changesets/20241030_add_pipeline_quotas.yaml
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,38 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: add pipeline quotas table | ||
author: ks | ||
changes: | ||
# add pipeline_quotas table | ||
- createTable: | ||
tableName: pipeline_quotas | ||
remarks: | | ||
this table describes the quota allowed per pipeline | ||
columns: | ||
- column: | ||
name: id | ||
type: serial | ||
constraints: | ||
primaryKey: true | ||
nullable: false | ||
- column: | ||
name: pipeline_name | ||
type: text | ||
constraints: | ||
nullable: false | ||
unique: true | ||
- column: | ||
name: default_quota | ||
type: int | ||
constraints: | ||
nullable: false | ||
# add default quota for imputation_beagle to pipeline_quotas table | ||
- insert: | ||
tableName: pipeline_quotas | ||
columns: | ||
- column: | ||
name: pipeline_name | ||
value: imputation_beagle | ||
- column: | ||
name: default_quota | ||
value: 10000 |