Skip to content

ALIS-1164: Delete article score definition #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions api-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ Parameters:
Type: 'AWS::SSM::Parameter::Value<String>'
ArticlePvUserTableName:
Type: 'AWS::SSM::Parameter::Value<String>'
ArticleScoreTableName:
Type: 'AWS::SSM::Parameter::Value<String>'
UsersTableName:
Type: 'AWS::SSM::Parameter::Value<String>'
BetaUsersTableName:
Expand Down Expand Up @@ -76,7 +74,6 @@ Globals:
ARTICLE_LIKED_USER_TABLE_NAME: !Ref ArticleLikedUserTableName
ARTICLE_FRAUD_USER_TABLE_NAME: !Ref ArticleFraudUserTableName
ARTICLE_PV_USER_TABLE_NAME: !Ref ArticlePvUserTableName
ARTICLE_SCORE_TABLE_NAME: !Ref ArticleScoreTableName
USERS_TABLE_NAME: !Ref UsersTableName
BETA_USERS_TABLE_NAME: !Ref BetaUsersTableName
NOTIFICATION_TABLE_NAME: !Ref NotificationTableName
Expand Down
79 changes: 0 additions & 79 deletions database-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,35 +254,6 @@ Resources:
ProvisionedThroughput:
ReadCapacityUnits: !Ref MinDynamoReadCapacitty
WriteCapacityUnits: !Ref MinDynamoWriteCapacitty
ArticleScore:
Type: AWS::DynamoDB::Table
DependsOn:
- ArticleInfo
Properties:
AttributeDefinitions:
- AttributeName: article_id
AttributeType: S
- AttributeName: evaluated_at
AttributeType: N
- AttributeName: score
AttributeType: N
KeySchema:
- AttributeName: evaluated_at
KeyType: HASH
- AttributeName: article_id
KeyType: RANGE
LocalSecondaryIndexes:
- IndexName: evaluated_at-score-index
KeySchema:
- AttributeName: evaluated_at
KeyType: HASH
- AttributeName: score
KeyType: RANGE
Projection:
ProjectionType: ALL
ProvisionedThroughput:
ReadCapacityUnits: !Ref MinDynamoReadCapacitty
WriteCapacityUnits: !Ref MinDynamoWriteCapacitty
ArticleTokenAggregation:
Type: AWS::DynamoDB::Table
DependsOn:
Expand Down Expand Up @@ -1165,56 +1136,6 @@ Resources:
ScaleOutCooldown: 60
PredefinedMetricSpecification:
PredefinedMetricType: DynamoDBWriteCapacityUtilization
ArticleScoreTableReadCapacityScalableTarget:
Type: AWS::ApplicationAutoScaling::ScalableTarget
DependsOn: ScalingRole
Properties:
MaxCapacity: !Ref MaxDynamoReadCapacitty
MinCapacity: !Ref MinDynamoReadCapacitty
ResourceId: !Join
- /
- - table
- !Ref ArticleScore
RoleARN: !GetAtt ScalingRole.Arn
ScalableDimension: dynamodb:table:ReadCapacityUnits
ServiceNamespace: dynamodb
ArticleScoreTableWriteCapacityScalableTarget:
Type: 'AWS::ApplicationAutoScaling::ScalableTarget'
DependsOn: ScalingRole
Properties:
MaxCapacity: !Ref MaxDynamoWriteCapacitty
MinCapacity: !Ref MinDynamoWriteCapacitty
ResourceId: !Join
- /
- - table
- !Ref ArticleScore
RoleARN: !GetAtt ScalingRole.Arn
ScalableDimension: dynamodb:table:WriteCapacityUnits
ServiceNamespace: dynamodb
ArticleScoreTableReadScalingPolicy:
Type: 'AWS::ApplicationAutoScaling::ScalingPolicy'
Properties:
PolicyName: ReadAutoScalingPolicy
PolicyType: TargetTrackingScaling
ScalingTargetId: !Ref ArticleScoreTableReadCapacityScalableTarget
TargetTrackingScalingPolicyConfiguration:
TargetValue: 50.0
ScaleInCooldown: 60
ScaleOutCooldown: 60
PredefinedMetricSpecification:
PredefinedMetricType: DynamoDBReadCapacityUtilization
ArticleScoreTableWriteScalingPolicy:
Type: 'AWS::ApplicationAutoScaling::ScalingPolicy'
Properties:
PolicyName: WriteAutoScalingPolicy
PolicyType: TargetTrackingScaling
ScalingTargetId: !Ref ArticleScoreTableWriteCapacityScalableTarget
TargetTrackingScalingPolicyConfiguration:
TargetValue: 50.0
ScaleInCooldown: 60
ScaleOutCooldown: 60
PredefinedMetricSpecification:
PredefinedMetricType: DynamoDBWriteCapacityUtilization
ArticleTokenAggregationTableReadCapacityScalableTarget:
Type: AWS::ApplicationAutoScaling::ScalableTarget
DependsOn: ScalingRole
Expand Down
29 changes: 0 additions & 29 deletions database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,35 +226,6 @@ Resources:
ProvisionedThroughput:
ReadCapacityUnits: 2
WriteCapacityUnits: 2
ArticleScore:
Type: AWS::DynamoDB::Table
DependsOn:
- ArticleInfo
Properties:
AttributeDefinitions:
- AttributeName: article_id
AttributeType: S
- AttributeName: evaluated_at
AttributeType: N
- AttributeName: score
AttributeType: N
KeySchema:
- AttributeName: evaluated_at
KeyType: HASH
- AttributeName: article_id
KeyType: RANGE
LocalSecondaryIndexes:
- IndexName: evaluated_at-score-index
KeySchema:
- AttributeName: evaluated_at
KeyType: HASH
- AttributeName: score
KeyType: RANGE
Projection:
ProjectionType: ALL
ProvisionedThroughput:
ReadCapacityUnits: 2
WriteCapacityUnits: 2
ArticleTokenAggregation:
Type: AWS::DynamoDB::Table
DependsOn:
Expand Down
1 change: 0 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ aws cloudformation deploy \
ArticleLikedUserTableName=${SSM_PARAMS_PREFIX}ArticleLikedUserTableName \
ArticleFraudUserTableName=${SSM_PARAMS_PREFIX}ArticleFraudUserTableName \
ArticlePvUserTableName=${SSM_PARAMS_PREFIX}ArticlePvUserTableName \
ArticleScoreTableName=${SSM_PARAMS_PREFIX}ArticleScoreTableName \
UsersTableName=${SSM_PARAMS_PREFIX}UsersTableName \
BetaUsersTableName=${SSM_PARAMS_PREFIX}BetaUsersTableName \
NotificationTableName=${SSM_PARAMS_PREFIX}NotificationTableName \
Expand Down
1 change: 0 additions & 1 deletion tests/tests_common/tests_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def get_all_tables(cls):
{'env_name': 'ARTICLE_EVALUATED_MANAGE_TABLE_NAME', 'table_name': 'ArticleEvaluatedManage'},
{'env_name': 'ARTICLE_INFO_TABLE_NAME', 'table_name': 'ArticleInfo'},
{'env_name': 'ARTICLE_LIKED_USER_TABLE_NAME', 'table_name': 'ArticleLikedUser'},
{'env_name': 'ARTICLE_SCORE_TABLE_NAME', 'table_name': 'ArticleScore'},
{'env_name': 'ARTICLE_HISTORY_TABLE_NAME', 'table_name': 'ArticleHistory'},
{'env_name': 'ARTICLE_CONTENT_EDIT_TABLE_NAME', 'table_name': 'ArticleContentEdit'},
{'env_name': 'ARTICLE_FRAUD_USER_TABLE_NAME', 'table_name': 'ArticleFraudUser'},
Expand Down