* Remove IoT Hub Dashboard item type
The IoT Hub no longer has Dashboard items, so drop the DASHBOARD item type
from the platform: install/update/checksum/delete handling and the
DashboardInstalledItemDescriptor on the backend, and the item type, the
/iot-hub/dashboards page and route, deep links, translations and styles in
the UI. Dashboards created by device packages and solution templates are
not affected.
* Keep DashboardInstalledItemDescriptor for existing installed items
Installed-item rows with a DASHBOARD descriptor may still exist on
instances that were connected to the QA Hub. Without the subtype Jackson
fails on such a row and the whole Installed items page breaks, so keep the
descriptor and the delete branch to let those rows be read and removed.
* Revert "Keep DashboardInstalledItemDescriptor for existing installed items"
This reverts commit 61246776fa. A DASHBOARD installed-item row can only
exist on instances connected to the QA Hub; production and official
releases never had Dashboard items, so the legacy descriptor is not kept.
- Restamp ten files whose header does not match their CE provenance:
EntityDatabaseSchemaService.java, js-resource.component.ts and
DataValidationException.java are identical to CE and take the Apache
header; the 4.3.1.6 cluster migration, TbClusterStore and their tests exist
in CE lts-4.3 and common/transport/snmp/pom.xml lost a CE dependency, so they
take the ce-modified header.
- Remove the DataValidationException.java curation: CE has had an identical
file at the same path since December 2025.
- Remove 29 curations that repeat the header the check decides by itself.
- Delete trendz-settings.component.html and comparison-keys-table.component.html
at their old locations: their components moved and no longer reference them,
and the relicensing commit left only a license header in them.
The enrollment now collects its license key from the portal when the grant is
done, and keeps it in tb_cluster.license_secret. A claim that has nothing to
hand over yet leaves the flow for the next poll; a refused claim ends the flow
registered without a key; a transport failure is left to the existing backoff.
onEdgeDisconnect persisted active=false based only on this node's in-memory
session map. When an edge drops and reconnects to a different TB-Core node, the
new node sets active=true while the old node writes active=false whenever it
finally notices its dead stream. If the stale write lands last, the edge stays
marked inactive while its gRPC session is alive.
That flag is not only a status indicator: saveEdgeEvent() consults it before
queueing any server-to-edge event, and actions that are not on the offline
allowlist - device and entity-group assignments among them - are dropped
outright rather than queued. A stale active=false therefore makes assignments
silently never reach the edge, with a full "Sync Edge" as the only recovery.
- Guard the write with the cluster-wide service-id cache, skipping it only when
another node is the recorded owner and that node is still a live TB_CORE
service. An absent entry means ownership is unknown, not claimed elsewhere, so
that case still persists the inactive state; and a node that died without
evicting its claim cannot leave the edge marked active forever.
- Publish the ownership claim before writing active=true in onEdgeConnect, so a
disconnect callback on the node the edge just left cannot read a stale owner.
- Only evict the service-id cache entry when it still points at this node.
A stale callback would otherwise wipe the live owner's claim and defeat the
guard above for any later disconnect.
- Remove the session atomically in onEdgeDisconnect. get() and remove() were not
atomic, so a session replaced between the two was dropped from the map, torn
down and marked inactive by the stale callback even though it was the live one.
LAST_DISCONNECT_TIME and the rule-engine DISCONNECT_EVENT are intentionally left
unguarded - they are accurate statements about this session, and the timestamps
are the main diagnostic signal for flapping edges.
Backport of thingsboard/thingsboard#16155 to lts-4.2, which has no disconnect
notification debounce and therefore none of the ownership helpers the 4.3 change
builds on; they are introduced here.
license:format prepends the header it expects without recognising the
block comment the files were created with, so both new files carried the
license twice. They now have only the two SPDX lines, the same as every
other file that this repository shares with CE.
license:format prepends the header it expects without recognising the
block comment the files were created with, so both new files carried the
license twice. They now have only the two SPDX lines, the same as every
other file that this repository shares with CE.
The base switched every header to the SPDX form yesterday, so the files
this branch adds were the only ones left with the old block comment and
license:check failed on them once the base was merged in.
The base switched every header to the SPDX form yesterday, so the files
this branch adds were the only ones left with the old block comment and
license:check failed on them once the base was merged in.
The base branch switched every header to the SPDX form while this branch
was open, so the one file this branch adds was the only one left with the
old block comment.
The base branch switched every header to the SPDX form while this branch
was open, so the one file this branch adds was the only one left with the
old block comment.
validateSolution borrowed SolutionInstallResponse and used null to say
that nothing conflicts, so the call site had to test two different ways
of saying "go ahead". It returns a SolutionValidationResult now, built
through passed() or conflictsFound(report) - the private constructor
keeps the two states honest - and the install response is assembled
where the install actually answers.
validateSolution borrowed SolutionInstallResponse and used null to say
that nothing conflicts, so the call site had to test two different ways
of saying "go ahead". It returns a SolutionValidationResult now, built
through passed() or conflictsFound(report) - the private constructor
keeps the two states honest - and the install response is assembled
where the install actually answers.
The map then holds what the report prints, which leaves appendConflicts a
plain pass-through and matches PE, where the entity group descriptions
arrive already formatted.
The map then holds what the report prints, which leaves appendConflicts a
plain pass-through and matches PE, where the entity group descriptions
arrive already formatted.
The TODO predates the report and most of it is done now - customers,
assets, devices, edges, dashboards, rule chains and both profile types
are all checked before anything is created. What is left is the entities
that still only fail at provision time.
The TODO predates the report and most of it is done now - customers,
assets, devices, edges, dashboards, rule chains and both profile types
are all checked before anything is created. What is left is the entities
that still only fail at provision time.
- rename the cap to MAX_LISTED_NAMES_PER_TYPE: it shortens the printed
list, it does not limit what is validated
- say how many conflicts a type has in total, and add a note when names
were left out, so the "rename or delete them" instruction stays true
- keep only the names in the conflict map, the entities were never read
for anything else
- one way of saying "there are no details" in the dialog, and one comment
instead of two that open the same way
- cover the whole branch of the cap (10, 11 and 12 names) and the profile
name that comes from both the json file and the directory
- rename the cap to MAX_LISTED_NAMES_PER_TYPE: it shortens the printed
list, it does not limit what is validated
- say how many conflicts a type has in total, and add a note when names
were left out, so the "rename or delete them" instruction stays true
- keep only the names in the conflict map, the entities were never read
for anything else
- one way of saying "there are no details" in the dialog, and one comment
instead of two that open the same way
- cover the whole branch of the cap (10, 11 and 12 names) and the profile
name that comes from both the json file and the directory
- drop the java.util.Collection import that stayed behind when firstOrNull
was inlined
- cap each report section at ten names plus "and N more": a template can
hold hundreds of devices, and the dialog renders these details without
the height cap the plain-text branch has
- leave the details empty when the server reported no message of its own,
since the description above them already names the item that failed
- cover the asset conflict, the capped report and the remaining mocks in
the validation test
- drop the java.util.Collection import that stayed behind when firstOrNull
was inlined
- cap each report section at ten names plus "and N more": a template can
hold hundreds of devices, and the dialog renders these details without
the height cap the plain-text branch has
- leave the details empty when the server reported no message of its own,
since the description above them already names the item that failed
- cover the asset conflict, the capped report and the remaining mocks in
the validation test
- the dialog no longer mistakes a MISSING plan entry for the failing one:
such entries carry an error message of their own with no name, so the
lookup now also requires the WILL_INSTALL status
- the whole dependency sentence lives in the locale bundle as one key
with a name and an error parameter, instead of a fragment glued to the
server message, and the partial rollback warning is appended as its own
paragraph by the dialog rather than relying on the details ending with
a blank line
- a rule chain is validated under the type from the rule chain file too,
so an EDGE chain is no longer looked up among the CORE ones
- names are deduplicated before the lookup rather than when formatting,
so a template repeating a name queries once
- the entity type and the name come from the definition itself for the
five lists that carry both, which removes the pairing hazard
- ExceptionUtil.getMessage replaces the hand-rolled fallback, and the
single-use firstOrNull helper is inlined
- the dashboard check moved after the device one to match the provision
order the comment claims, and the unreachable empty-list guard is gone
- tests cover both profile types, edges, the rule chain type and its two
unresolvable-name branches, the deduplicated lookup and a json file
holding null
- the dialog no longer mistakes a MISSING plan entry for the failing one:
such entries carry an error message of their own with no name, so the
lookup now also requires the WILL_INSTALL status
- the whole dependency sentence lives in the locale bundle as one key
with a name and an error parameter, instead of a fragment glued to the
server message, and the partial rollback warning is appended as its own
paragraph by the dialog rather than relying on the details ending with
a blank line
- a rule chain is validated under the type from the rule chain file too,
so an EDGE chain is no longer looked up among the CORE ones
- names are deduplicated before the lookup rather than when formatting,
so a template repeating a name queries once
- the entity type and the name come from the definition itself for the
five lists that carry both, which removes the pairing hazard
- ExceptionUtil.getMessage replaces the hand-rolled fallback, and the
single-use firstOrNull helper is inlined
- the dashboard check moved after the device one to match the provision
order the comment claims, and the unreachable empty-list guard is gone
- tests cover both profile types, edges, the rule chain type and its two
unresolvable-name branches, the deduplicated lookup and a json file
holding null
- rule chains are looked up under the name from the rule chain file, the
same source the install uses, instead of the name in rule_chains.json
- the details end with a blank line, so the partial rollback warning the
dialog appends does not land inside the last list item
- an exception without a message falls back to its type, so the failing
entry is still named
- the dependency prefix is only added when the server sent an error
message, since the fallback sentence names the root item
The service was pre-composing "Failed to install dependency '<name>':",
which can never be translated and made the backend depend on the dialog
already printing the root item above the details. It now reports the
failure itself, and the dialog prefixes a localized sentence when the
entry that failed is not the root.
Only rule chains, profiles and dashboards were checked upfront, so a
template with a clashing customer, asset, device or edge died mid install
on a DB constraint and had to be rolled back. All of them are validated
now, and every conflict is named and reported at once instead of
repeating the same sentence per entity type. Rule chains are looked up by
exact name and dashboards by exact title, since the paged text search
matches with 'contains' and could report a different entity as the
conflict. The install dialog also stopped repeating "Failed to install
<item>" inside the error details, since it is already shown right above
them.
- rule chains are looked up under the name from the rule chain file, the
same source the install uses, instead of the name in rule_chains.json
- the details end with a blank line, so the partial rollback warning the
dialog appends does not land inside the last list item
- an exception without a message falls back to its type, so the failing
entry is still named
- the dependency prefix is only added when the server sent an error
message, since the fallback sentence names the root item
The service was pre-composing "Failed to install dependency '<name>':",
which can never be translated and made the backend depend on the dialog
already printing the root item above the details. It now reports the
failure itself, and the dialog prefixes a localized sentence when the
entry that failed is not the root.