Add release history cleaning function#4813
Merged
nobodyiam merged 91 commits intoapolloconfig:masterfrom Mar 27, 2023
Merged
Conversation
# Conflicts: # README.md
Codecov Report
@@ Coverage Diff @@
## master #4813 +/- ##
============================================
+ Coverage 47.89% 48.26% +0.37%
- Complexity 1701 1722 +21
============================================
Files 346 346
Lines 10697 10778 +81
Branches 1066 1075 +9
============================================
+ Hits 5123 5202 +79
+ Misses 5258 5254 -4
- Partials 316 322 +6
... and 4 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
mghio
suggested changes
Mar 24, 2023
nobodyiam
reviewed
Mar 26, 2023
| @Query("update ReleaseHistory set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000), DataChange_LastModifiedBy = ?4 where AppId=?1 and ClusterName=?2 and NamespaceName = ?3 and IsDeleted = false") | ||
| int batchDelete(String appId, String clusterName, String namespaceName, String operator); | ||
|
|
||
| @Query(value = "select Id from ReleaseHistory where AppId=?1 and ClusterName=?2 and NamespaceName = ?3 and BranchName = ?4 and IsDeleted = false order by Id desc Limit 1 offset ?5", nativeQuery = true) |
Member
There was a problem hiding this comment.
I think we don't need to use native query here as it may not work well with other databases. I can see the limit offset setup but I suppose it could be replaced with Pageable?
nobodyiam
reviewed
Mar 26, 2023
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's the purpose of this PR
apollo.release-history.retention.sizeconfiguration to set the global retention time for release history, or use theapollo.release-history.retention.size.overrideconfiguration to finely control the number of release history for each appId+clusterName+namespaceName+branchName.Which issue(s) this PR fixes:
Fixes #3208