eclipse / hawkbit

Eclipse hawkBit™
https://projects.eclipse.org/projects/iot.hawkbit
Eclipse Public License 2.0
444 stars 186 forks source link

Feature Request: Prevent distribution set naming conflict across distribution set types #1732

Open lizziemac opened 1 month ago

lizziemac commented 1 month ago

Description

Each hardware revision in my project has unique app and OS software module types, as well as distinct distribution set types. Each distribution set supports the app and OS modules of the same hardware revision. When creating a distribution set/a new release, the name is always the same (e.g., Device Release). With the introduction of a second hardware revision, this naming convention no longer works. Once the distribution set is created for one hardware revision, the same name and version cannot be reused for the next revision, despite having a completely different setup.

Expected Behavior

I should be able to create a distribution set for DS type "hwrevA" with the name "Device Release" and version "1.0.0", and also create a distribution set for DS type "hwrevB" with the name "Device Release" and version "1.0.0".

Actual Behavior

A conflict occurs when attempting to make the request.

Possible Workaround

I understand that I could rename the distribution sets to something like Device Release hwrevA and Device Release hwrevB, but this feels redundant since the distribution type already indicates the hardware revision. Additionally, I plan to add specific labels to the distribution sets for partition A/B, and I want to avoid further cluttering the names.

Proposed Solution

Add the distribution set type to the unique constraint on creating distribution sets

avgustinmm commented 1 month ago

@lizziemac, thanks for your FR. What you are proposing, to add type into the unique constraints, seems reasonable to me. There is no sense to forbid same (tenant, name, version) for different types. Moreover, for the software modules, an analogical case, the type is already included in the unique constraint.