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.
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.
Mobile apps derive the scheme from their package name, which may contain
an underscore. It cannot introduce an authority, so accepting it keeps
the rule as strong as the RFC 3986 grammar.
The user was looked up by email across the whole platform, so a client
belonging to one tenant could resolve a user of another. New users were also
placed in the tenant named by the provider response rather than in the tenant
that owns the client.
Both now follow the client's own tenant. System clients keep the platform-wide
behaviour they rely on.
A rejected deep link is otherwise invisible to support. AdminController
reuses the prevUri parameter and cookie names instead of its own copies,
and its redirect target moves into a helper so the read side is covered
by a test.
The scheme is restored from the oauth2_auth_request cookie, which the
client can replace, so checking it only while the authorization request
is built still let a forged cookie point the token redirect at any host.
Both handlers now re-check it on read, sharing the rule with
OAuth2AppTokenFactory.
The success handler keeps prevUri out of the base URL as well, so the
error redirect no longer appends /login to an in-app path.
- Drop the dangling "spec §7" reference from the test comments; inline the
actual rule (a lexical MIN/MAX result over string telemetry stays a string).
- Use a zero-padded code ("0009") for the string-result case - a clearer example
of a genuine string that must not be coerced to a number (would lose padding).
- Define the maxCode metric in the test CF configuration alongside consumption
and avgConsumption, so all parameterized metric names are configured.
Address review feedback on the integration test:
- Read latest telemetry with useStrictDataTypes=true always, so the value node
keeps its stored type (numeric -> JSON number, str_v -> JSON string).
- Assert the aggregation result is a numeric node across all existing scenarios
via a shared assertNumericValue helper, instead of a separate standalone test.
isNumber() is the actual regression guard; asLong()/asText() would coerce a
str_v string and miss it, so the type is asserted explicitly and the value is
compared numerically.
- Drop the redundant standalone test that duplicated an existing scenario.
Cover the fix that makes EntityAggregationCalculatedFieldState.toResult()
emit numeric aggregation results as numeric JSON nodes (dbl_v/long_v) instead
of JSON strings (str_v), which had broken server-side AVG/SUM aggregation.
- New unit test EntityAggregationCalculatedFieldStateTest: asserts toResult()
serializes a numeric result as a numeric node and a genuine string result
(lexical MIN/MAX over string telemetry) as a string node. Assertions check
the node type (isNumber/isTextual) rather than asText(), since asText()
coerces both node kinds identically - which is why the bug went unnoticed.
- EntityAggregationCalculatedFieldTest: add a strict-types read helper
(useStrictDataTypes=true) and a test asserting the stored SUM/AVG telemetry
are numeric JSON nodes end-to-end. Existing asText()-based assertions are
left untouched (they read via the non-strict endpoint, which stringifies
every value and therefore cannot observe the storage type).
EntityAggregationCalculatedFieldState.toResult() serialized every metric
result via ObjectNode.put(name, JacksonUtil.toString(value)), which produces
a JSON *string* node even for numeric aggregation results (SUM/AVG/COUNT/...).
When persisted (in particular with transport.json.type_cast_enabled=false, or
for non-parsable values) the result lands in ts_kv.str_v, so server-side AVG/SUM
aggregation returns no data in widgets/queries while COUNT/MIN/MAX still return.
Serialize with JacksonUtil.valueToTree(...) so numeric results are emitted as
numeric JSON nodes (-> dbl_v/long_v), mirroring
RelatedEntitiesAggregationCalculatedFieldState. Genuine string MIN/MAX results
over string telemetry are preserved as string nodes. The instanceof Number
guard is retained (it only governs rounding).
A device-state attribute save can complete after its tenant was deleted.
The post-save WS-update callback then resolves an evicted tenant profile
via partitionService.resolve -> getRoutingInfo and throws
TenantNotFoundException uncaught on the ws-callback thread.
Guard resolve() in forwardToSubscriptionManagerService: a deleted tenant
has no partition to route to and no subscribers to notify, so skip the
forward instead of propagating. Mirrors the existing tenant-gone handling
in DefaultDeviceStateService.checkStates().