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

fix pre-defined extraFields were causing missing extra from Thing created events #2137

Conversation

thjaeckle
Copy link
Member

With the in Ditto 3.7.0 added "pre-defined" extraFields configuration ThingCreated events did not contain the configured "extra" fields if pre-defined extra-fields were configured.

The reason was that the Policy is not yet available during creation of the Thing and thus, no fields were added to extra as authorization was missing.

This PR provides a fix which solves this by doing a roundtrip and extra-fields retrieval in such (rare) cases of thing creation.
It also improves how it is calculated if all asked for "extra" fields were available as pre-configured fields.

@thjaeckle thjaeckle added the bug label Mar 4, 2025
@thjaeckle thjaeckle added this to the 3.7.1 milestone Mar 4, 2025
@thjaeckle thjaeckle self-assigned this Mar 4, 2025
@thjaeckle
Copy link
Member Author

@alstanchev could you have a look, please?
Should only affect users of the new functionality, configuring pre-defined extraFields

@thjaeckle thjaeckle force-pushed the bugfix/fix-pre-defined-extra-fields-for-created-events branch from 8633e24 to 56b32f3 Compare March 4, 2025 13:13
@thjaeckle thjaeckle requested a review from alstanchev March 4, 2025 15:41
Copy link
Contributor

@alstanchev alstanchev left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@thjaeckle thjaeckle merged commit bc44a86 into eclipse-ditto:master Mar 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants