Skip to content
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: trigger name limit #1080

Merged
merged 17 commits into from
Oct 15, 2024
Merged

feat: trigger name limit #1080

merged 17 commits into from
Oct 15, 2024

Conversation

AleksandrMatsko
Copy link
Member

PR Summary

Before this PR there was no limit to trigger name. This can lead to problems with alert delivering.

This PR adds configurable limit for trigger name. It is highly recommended not to increase it.

@AleksandrMatsko AleksandrMatsko requested a review from a team as a code owner September 4, 2024 04:54
limits/limits.go Outdated Show resolved Hide resolved
api/dto/triggers.go Outdated Show resolved Hide resolved
api/dto/triggers.go Outdated Show resolved Hide resolved
limits/limits.go Outdated Show resolved Hide resolved
api/config.go Outdated Show resolved Hide resolved
almostinf
almostinf previously approved these changes Sep 10, 2024
@AleksandrMatsko
Copy link
Member Author

/build

almostinf
almostinf previously approved these changes Sep 27, 2024
// LimitsConfig contains limits for some entities.
type LimitsConfig struct {
// Trigger contains limits for triggers.
Trigger TriggerLimits
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а зачем такая вложенность? будут еще какие-то лимиты на триггер?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мы с Олегом эту штуку обсудили, решили оставить так. Вот аргументы за:

  1. вполне можно ожидать появления других лимитов как для триггера (например, на число тегов у триггера, на длину описания и т.п.), так и для других сущностей.
  2. ожидается, что эта структура будет создана и заполнена один раз, положена в контекст запросов, а потом она будет нужна для получения их неё значений

@AleksandrMatsko
Copy link
Member Author

/build

@AleksandrMatsko AleksandrMatsko merged commit 6541929 into master Oct 15, 2024
7 checks passed
@AleksandrMatsko AleksandrMatsko deleted the feat/trigger-name-limit branch October 15, 2024 07:58
Copy link

Build and push Docker images with tag: 2024-10-15.6541929

1 similar comment
Copy link

Build and push Docker images with tag: 2024-10-15.6541929

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants