-
Notifications
You must be signed in to change notification settings - Fork 20
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
chore: add mau partition deleter #584
Conversation
masaaania
commented
Nov 1, 2023
•
edited
Loading
edited
- This PR adds a job to delete the mau table's partition and fix the mau summarizer's behavior.
ef8aa28
to
60696ad
Compare
/review |
PR AnalysisMain themetype: Refactoring PR summarytype: Refactoring Type of PRRefactoring PR Feedback:General suggestionsNo general suggestions. Code feedbackrelevant file: manifests/bucketeer/charts/batch/templates/cronjob.yamlsuggestion:The relevant line:-RES=`curl -X POST --cacert /usr/local/certs/service/tls.crt -d '{"job": "MauSummarizer"}' -H "authorization: bearer ${TOKEN}" -H "Content-Type: application/json" -s -o /dev/null -w '%{http_code}\\n' ${ENDPOINT}`
+RES=`curl -X POST -m 3600 --cacert /usr/local/certs/service/tls.crt -d '{"job": "MauSummarizer"}' -H "authorization: bearer ${TOKEN}" -H "Content-Type: application/json" -s -o /dev/null -w '%{http_code}\\n' ${ENDPOINT}` suggestion:The relevant line:-restartPolicy: Never
+```
#### suggestion:
The new cron job "mau-partition-deleter" could be written in a separate template file for better modularity and reusability. This way, each cron job template can be managed independently. [medium]
#### relevant file: manifests/bucketeer/charts/batch/values.yaml
#### suggestion:
Since the `mauPartitionDeleterSchedule` value is added in the `values.yaml` file, it would be helpful to provide a brief description for this new schedule to clarify its purpose. [medium]
#### relevant line:
```diff
+ mauPartitionDeleterSchedule: "0 2 1 * *" Security concerns:No |
PR AnalysisMain themeBug fix PR summaryThis PR fixes an issue related to the Type of PRBug fix PR Feedback:General suggestionsThe changes made in this PR appear to address the reported bug successfully. Code feedbackmanifests/bucketeer/charts/web-gateway/values.yaml
The changes in the Security concerns:No, this PR does not introduce any security concerns. |
PR AnalysisMain themeThe main theme of this PR is to add a new job called PR summaryThis PR adds a new job called Type of PREnhancement PR Feedback:General suggestionsIt's great to see the addition of a new job to handle the deletion of old records from the MAU table. The code looks good overall, and the changes seem to be well-contained. One improvement that could be made is to add some comments or documentation to describe the purpose and functionality of the Code feedbackpkg/batch/api/api.go
pkg/batch/api/api_test.go
pkg/batch/cmd/server/server.go
pkg/batch/jobs/mau/mau_partition_deleter.go
Security concerns:No |
PR AnalysisMain themeThe main theme of this PR is to add test coverage for the PR summaryThis PR adds test coverage for the Type of PRRefactoring PR Feedback:General suggestionsThe code changes look good and have been well-structured. The new code for the test file provides good coverage for the Code feedbackmau_partition_deleter_test.go
mau_summarizer.go
mau_summary.go
mau.go
|
PR AnalysisMain themeBug fix PR summaryThis PR introduces new test cases for the Type of PRBug fix PR Feedback:General suggestionsThe test cases added in this PR seem to cover the necessary scenarios for the Code feedbackpkg/mau/storage/mau_test.go
pkg/mau/storage/mock/mau.go
Security concerns:No |
PR AnalysisMain themetype: Refactoring PR summarytype: Refactoring Type of PRRefactoring PR Feedback:General suggestionsMove the addition of the new constant to a separate commit to keep the changes focused. This will make it easier to review and understand the purpose of each commit. Code feedbackrelevant file: proto/batch/service.pb.gosuggestion: Separate the addition of the new constant into a separate commit.relevant line: +BatchJob_MauPartitionDeleter BatchJob = 11Security concerns:no |
PR AnalysisMain themetype: Refactoring PR summarytype: Refactoring Type of PRRefactoring PR Feedback:General suggestionsNo general suggestions. Code feedbackFile: a/proto/batch/service.protoSuggestion 1 (important)The new enum value "MauPartitionDeleter" is missing a numeric value associated with it. It would be helpful to assign a unique numeric value to ensure compatibility with other systems that may rely on the enum values. For example, you could assign the value 11 to "MauPartitionDeleter". + MauPartitionDeleter = 11; File: a/proto/proto.lockSuggestion 1 (medium)The "optional" field is missing in the "ProgressiveRolloutManualScheduleClause", "ProgressiveRolloutTemplateScheduleClause", "ProgressiveRollout.Status", and "ProgressiveRollout.Type" fields. Adding the optional field with a value of true would allow these fields to be nullable in the generated code. - "type": "ProgressiveRolloutManualScheduleClause"
+ "type": "ProgressiveRolloutManualScheduleClause",
+ "optional": true - "type": "ProgressiveRolloutTemplateScheduleClause"
+ "type": "ProgressiveRolloutTemplateScheduleClause",
+ "optional": true - "type": "ProgressiveRollout.Status"
+ "type": "ProgressiveRollout.Status",
+ "optional": true - "type": "ProgressiveRollout.Type"
+ "type": "ProgressiveRollout.Type",
+ "optional": true File: a/ui/web-v2/apps/admin/src/proto/batch/service_pb.d.tsSuggestion 1 (medium)The BatchJobMap interface is missing a property for the new enum value "MAUPARTITIONDELETER". Adding the following property to the interface would allow the enum value to be used in the generated code. + MAUPARTITIONDELETER: 11; File: a/ui/web-v2/apps/admin/src/proto/batch/service_pb.jsSuggestion 1 (medium)The BatchJob object is missing a property for the new enum value "MAUPARTITIONDELETER". Adding the following property to the object would allow the enum value to be used in the generated code. + MAUPARTITIONDELETER: 11 Security concerns:no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Thank you!