* Renamed the Tuya integration credential fields to Access ID and Access Secret, as in the Tuya Developer Platform
* Removed unused Access Key length translations
---------
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
Nodes call JsonConverter.attributesFromMsg / telemetryFromMsg / sortedTelemetryFromMsg,
which read the type-cast-disabled keys from the message metadata. The key-set overloads
become private. NoCastKeys is renamed to TypeCastDisabledKeys, and the related metadata
key, UplinkData, DedicatedUplinkData and proto fields to *TypeCastDisabledKeys, matching
JsonConverter's isTypeCastEnabled.
The platform guessed the kept strings from the values (STRING_V that
parses as a number). The guess was wrong for a decoder decimal with more
than 16 fraction digits, which the proto parser keeps as a string: it was
saved as a number before and became a string.
The typed converter already has the exact sets. UplinkData now carries
telemetryNoCastKeys / attributesNoCastKeys, and DeviceUplinkDataProto /
AssetUplinkDataProto get them as new repeated fields 8 and 9, so embedded,
remote and executor integrations pass them on. The platform and the
integration executor put them into the "noCastKeys" metadata as given. An
older remote integration sends none and is parsed as before.
NoCastKeys.fromKvList is removed.
PROD-9057
KCL 3.0.1 depends on com.amazonaws:dynamodb-lock-client 1.3.0, which is
licensed under the Amazon Software License. That license restricts use
of the library to Amazon's services, so it does not fit redistribution
as part of our product. KCL 3.1.2 depends on dynamodb-lock-client 1.4.0,
which is licensed under Apache-2.0.
In KCL 3.1 the SynchronousBlockingRetrievalFactory constructor takes an
additional SleepTimeController. KinesisPollingConfig now passes a
KinesisSleepTimeController, the same default that KCL's own
PollingConfig uses, so polling keeps its current behavior.
Proto3 JSON writes 64-bit integers as strings, so The Things Stack sends
uplink_message.settings.frequency (TxSettings.frequency, uint64) as
"868100000". The unwrapper parses the mapped 64-bit integer fields back
to numbers, so frequency stays a number while identifiers stay strings.
PROD-9057
Co-Authored-By: Claude <noreply@anthropic.com>
Values that the network server sends as JSON strings and that the typed
converter adds from the unwrapped event (devAddr, eui, joinEui, netId,
hardwareVersion, ...) skip the numeric type cast, so devAddr "01020304"
stays "01020304". Numbers from the event (fCnt, rssi, snr, ...) and the
decoder output are cast as before.
JsonConverter gets convertToTelemetryProto/convertToAttributesProto
overloads with a set of no-cast keys; the existing methods do not change.
PROD-9057
Co-Authored-By: Claude <noreply@anthropic.com>
A script passes a numeric-string metadata ts through unchanged, and the telemetry
parser reads it as a long, so the metadata keys must join that element too.
With its own element at the uplink ts, a metadata key also returned by the script
overwrote the script's value. The metadata keys now go into the script's element at
that ts, only where the script has no value, as for an object result. Without such an
element they keep their own element at the uplink ts.
The metadata telemetry keys went into a separate array element without ts, so they
were saved at the server time, while the script's own values were saved at the
uplink time. The element now takes ts from the metadata, the same ts the script reads
and the one an object result already uses for these keys.
- The device install form shows placeholders, templated defaults, an
Advanced section and a ThingsBoard connection section with the MQTT host
and port, cleans pasted values, shows errors after the user leaves a field
and does not let the browser autofill ThingsBoard credentials.
- A field marked by the package checks the integration connection.
- The TTN and TTI install methods are named The Things Stack Sandbox and
The Things Stack Cloud.
- The TTN converter metadata includes the coding rate and the gateway channel.
- Deleting or updating a device package keeps the integrations, converters
and other entities that another installed device package uses, and the
delete dialog names them before the user confirms.
- The Open button of an installed item names what it opens.
- Keep rest-client working on Spring Framework 6 and 7 (PR #16341)
- Refuse to start, install or upgrade on Java older than 25 (PR #16341)
- Move the lower-case header names filter from util to http-integrations so rest-client consumers no longer get it (PR #16341)
- Sign the renamed commit so the log.showSignature check in the lineage test can fail (PR #16341)
- Build SkipPathRequestMatcherTest's matcher from the ThingsboardSecurityConfiguration constants (PR #16341)
- Enforce upper-bound convergence of nimbus-jose-jwt (PR #16341)
refresh() schedules STOPPED for a singleton whose partition moved away, and
skips integrations that are still running when the partition comes back. If
the lifecycle executor ran that STOPPED only after the partition came back
(busy pool, or tryUpdate rescheduled after a lost tryLock), it destroyed the
integration on the node that owned it again, and nothing restarted it until
the next partition change.
When STOPPED runs, fetch the configuration and check the current ownership:
- skip the stop if the integration is running, enabled, not remote and mine;
- otherwise stop it, and if it is mine again after the stop (the partition
came back while it was being stopped) schedule CREATED. processStop()
removes the state first, so CREATED starts from a fresh state.
If the configuration can't be fetched or the ownership can't be resolved, the
integration is stopped as before. Stops for integrations switched to remote
or disabled are not affected.
A PartitionChangeEvent carries only the queue keys whose partitions changed
(and the removed ones), not a full snapshot. Keeping only the last pending
event dropped the changes of every other integration type: e.g. on a node
whose neighbours support different integration types, an MQTT-only event
queued after a first event with all types left HTTP, KAFKA, ... unsubscribed
and not refreshed until their partitions changed again. This could happen at
startup and, since events are now drained after startup too, while an event
thread waits for the synchronized drain.
Merge the pending events per queue key instead; the latest partitions of
each key win.
DefaultClusterIntegrationService.onTbApplicationEvent() added a
PartitionChangeEvent to pendingEvents only while the executor was still
starting. Once started, it skipped the add and drained an empty queue, so
every partition change after startup was dropped: refresh() did not run and
the downlink consumers were not re-subscribed. Each node kept the partition
snapshot it held when its startup completed, until the JVM restarted.
After a rolling restart, or when a single node restarts while the others
keep running, this leaves singleton integrations (MQTT, AWS IoT, Azure, ...)
running on two nodes or on none. Brokers that enforce unique client IDs
keep disconnecting the two copies, and brokers that allow both process every
uplink twice.
- Always enqueue the event before draining. Make drainPendingEvents()
synchronized, so that snapshots are applied in the order they arrive.
- In update(), check ownership against the current partitions before
starting or updating an integration (CREATED, STARTED, UPDATED,
ACTIVATED), and stop it if it is no longer owned. Ownership can change
between scheduling an event and running it.
- In reInitIntegrations(), stop FAILED integrations that are no longer
owned instead of re-initializing them.
- In refresh(), treat an empty partition set as a real snapshot and stop the
singletons of that type. Restrict the stop loop to the refreshed
integration type, because the owned partitions belong to that type only.
Nothing new is created on an empty snapshot.
Adds DefaultClusterIntegrationServiceTest and
DefaultIntegrationManagerServiceTest, covering partition flip-flops during
startup and on long-running nodes.
Integration executors loaded the rule engine queues only at startup and never
evicted the cached tenant routing info. After a tenant switched to or from an
isolated rule engine they kept pushing its uplinks to the old queue until restart.
- send queue update/delete notifications to integration executors
(new repeated fields 2 and 3 in ToIntegrationExecutorNotificationMsg)
- apply them in DefaultClusterIntegrationService
- evict tenant routing info on TENANT / TENANT_PROFILE events, after the
tenant profile caches (new PartitionService.evictTenantProfileInfo)