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

Attribute id contains dataset #664

Merged

Conversation

wagmarcel
Copy link
Member

No description provided.

@wagmarcel wagmarcel force-pushed the attribute-id-contains-datasetId branch 2 times, most recently from 7ca2657 to f223d29 Compare January 26, 2025 12:00
Id of an attribute was so far created cannonically, i.e.

id\\name

This turns out to be misleading and wasting bandwidth. Therefore,
the SHA256 hashing algorithm which was applied previously is
now also applied to the highest level attributes.
This has to be done aligned between MQTT Bridge and Debezium Bridge

Signed-off-by: marcel <[email protected]>
Alerta normally consumes all records from Kafka. In case of error it will
sleep some time and try it again. However, there are unrecoverable errors, e.g.
when the severity code is wrong then Alerta is stuck for some time
(as long as Kafka is storing the record). Therefore a function is added
which detects and drops errors which are not recoverable.

Signed-off-by: marcel <[email protected]>
DiffAttriutes was using attributeName + datasetId to uniquely identify an attribute
This is breaking when subattributes are introduced since attributename + datasetId can be
the same in subattributes such as in:

{
  "id": "id",
  "type": "type,
  "attributes": {
    "type": "Property",
    "value": "value"
    "attribute": {
      "type": "Property",
      "value": "value2"
    }
  }
}
Both attributes have name "attribute" and default datasetId '@none'.

Since a recent patch assigned every attribute a "local" unique id in the local database
a better way is to use this loaclly unique id to reference the attributes from now.

Signed-off-by: marcel <[email protected]>
@wagmarcel wagmarcel force-pushed the attribute-id-contains-datasetId branch from 7fe8623 to 5854036 Compare January 26, 2025 16:23
@wagmarcel wagmarcel marked this pull request as ready for review January 26, 2025 18:05
@wagmarcel wagmarcel requested a review from abhijith-hr January 26, 2025 18:05
@abhijith-hr abhijith-hr merged commit 2e74264 into IndustryFusion:main Jan 27, 2025
4 checks passed
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.

2 participants