-
-
Notifications
You must be signed in to change notification settings - Fork 5.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 allow duplicate tags per monitor? #704
Comments
It is by design, more details: #278 Same Tags with different values = OK |
Ok. 😟 However, I didn't find any rationale for this behavior in #278. There's a sample scenario? I really can't find any reason for this. It only keeps the code more complex, IMHO. PR #705 would also be wrong in this case. Given that we cannot uniquely identify a tag just by name, an update of |
in previous suggestions to implement this feature, tags are mostly used for filtering and grouping. So something like having both If you think your use case won't be dealing with duplicate tags, I guess we can just update the first tag we find with that name? |
Understood. Thanks for the clarification @chakflying . Yes. Updating the first tag is an option. I will update the PR for this scenario. |
@fdcastel is this issue still relevant? |
Sure! 🧟 😄 |
Is it a duplicate question?
No.
Is your feature request related to a problem? Please describe.
Maybe.
Describe the solution you'd like
I was a bit surprised when I saw this:
What is the value of
t1
onmonitor1
?I believe
monitor_tag
table should have a composite primary key (or an UNIQUE key/index) of(monitor_id, tag_id)
blocking this occurrence in the db model.Describe alternatives you've considered
None.
Additional context
If this is indeed the intended design, please disregard. However, I found the semantics of having one tag with multiple values somewhat strange (or that one tag could be "present" multiple times).
I discovered this while working on a PR for #686.
The text was updated successfully, but these errors were encountered: