-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Do not throw error on empty indices in Elasticsach rollover lookback #3369
Conversation
Signed-off-by: Jeeva Kandasamy <jkandasa@gmail.com>
@@ -54,16 +57,19 @@ func (a *Action) lookback(indexSet app.IndexOption) error { | |||
finalIndices := filter.ByDate(excludedWriteIndex, getTimeReference(timeNow(), a.Unit, a.UnitCount)) | |||
|
|||
if len(finalIndices) == 0 { | |||
return fmt.Errorf("no indices to remove from alias %s", readAliasName) | |||
a.Logger.Info(fmt.Sprintf("no indices to remove from alias %s", readAliasName)) |
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.
Please pass parameters as zap parameters only. e.g. logger.Info("Message", zap.String("param-name", "foo")
Also prefer to start the log message with a capital letter.
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.
Thanks @pavolloffay, updated
Signed-off-by: Jeeva Kandasamy <jkandasa@gmail.com>
Signed-off-by: Jeeva Kandasamy <jkandasa@gmail.com>
@jkandasa the test is failing
|
Signed-off-by: Jeeva Kandasamy <jkandasa@gmail.com>
…fix_index_rollover
Codecov Report
@@ Coverage Diff @@
## master #3369 +/- ##
==========================================
- Coverage 96.48% 96.48% -0.01%
==========================================
Files 260 260
Lines 15196 15199 +3
==========================================
+ Hits 14662 14664 +2
Misses 451 451
- Partials 83 84 +1
Continue to review full report at Codecov.
|
@pavolloffay I have added a fix for nil exception in unit test |
Signed-off-by: Jeeva Kandasamy jkandasa@gmail.com
Which problem is this PR solving?