Skip to content

feat(deviceauth): add feature flag to restore legacy provision behavior - #2134

Open
alfrunes wants to merge 3 commits into
mendersoftware:mainfrom
alfrunes:MEN-10027
Open

feat(deviceauth): add feature flag to restore legacy provision behavior#2134
alfrunes wants to merge 3 commits into
mendersoftware:mainfrom
alfrunes:MEN-10027

Conversation

@alfrunes

@alfrunes alfrunes commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

70796e3 had a side effect of changing the iot-manager webhook events to no longer trigger provision_device event more than once. This commit introduces a feature flag to restore this legacy behavior.

Ticket: MEN-10027

70796e3 had a side effect of changing
the iot-manager webhook events to no longer trigger provision_device
event more than once. This commit introduces a feature flag to restore
this legacy behavior.

Ticket: MEN-10027
Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
@alfrunes
alfrunes requested a review from a team August 4, 2026 09:03
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.51724% with 20 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/services/deviceauth/devauth/devauth.go 62.26% 17 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@mzedel mzedel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the prompt adjustment! AFAICT the change looks good!


if dev.Provisioned {
workflowName := "provision_device"
if d.config.LegacyProvisionEvent {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since some tenants may rely on this but I guess very very not many and some may rely on the opposite, I would consider creating per-tenant flag (I know). I would also check perhaps somehow how many of the events we process on hosted -- perhaps it is not such a big deal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Something like this? d21879e

Added feature flags []string to request context. The attribute is
meaningless in open source, but is taken from the feature flags
associated with the tenant.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
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.

3 participants