-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat(filter): Add error handling for regex compilation #933
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #933 +/- ##
==========================================
- Coverage 68.94% 68.86% -0.09%
==========================================
Files 196 196
Lines 11013 11023 +10
==========================================
- Hits 7593 7591 -2
- Misses 2977 2985 +8
- Partials 443 447 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -129,15 +129,19 @@ func ParseSeriesByTag(input string) ([]TagSpec, error) { | |||
type MatchingHandler func(string, map[string]string) bool | |||
|
|||
// CreateMatchingHandlerForPattern creates function for matching by tag list | |||
func CreateMatchingHandlerForPattern(tagSpecs []TagSpec, compatibility *Compatibility) (string, MatchingHandler) { | |||
func CreateMatchingHandlerForPattern(tagSpecs []TagSpec, compatibility *Compatibility) (string, MatchingHandler, error) { |
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.
Может стоит добавить тесты на эту функцию? Я просто посмотрел, там на часть функций из файла series_by_tag.go
есть тесты, а на другую часть нет, не обязательно прям в этом пр добавлять, но в целом они бы не помешали, я думаю
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.
Надо подумать, нужны ли тесты на эти функции или хватит тестов на самую выскокоуровневую. Тестируем-то логический модуль, а не каждую функцию по-отдельности. Но в этом ПР прям не хочется ещё тестов писать
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.
Да, в этом пр давайте оставим пока так, это пока просто мысли на будущее :)
} | ||
|
||
func createMatchingHandlerForOneTag(spec TagSpec, compatibility *Compatibility) MatchingHandler { | ||
func createMatchingHandlerForOneTag(spec TagSpec, compatibility *Compatibility) (MatchingHandler, error) { |
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.
На этой функции также тестов нет
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.
Аналогично комменту выше
/buil |
/build |
Build and push Docker images with tag: 2023-10-11.d9b2ab4 |
No description provided.