[Backport v3.4-branch] [nrf noup] [west zap] Refinements and fixes to some edge cases#725
Open
markaj-nordic wants to merge 4 commits into
Open
Conversation
…tion Some XML cluster definitions do not contain the dedicated 'name' entry in the attribute field, instead they just add name of the cluster as a text to the attribute definition. Added a fallback logic, so that such cases are handled to avoid ending up with null attributes in zcl.json file. This mimics the ZAP loader behavior. Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
Fixed the handling of the case when the default cluster definition file (zcl.json) is used as both input and output to the command. Without the fix, the script removes the zcl.json and exits, because the removed file cannot be copied. Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
It turns out that the subprocess may return no output if the Chromium cannot use sandbox due to the missing permissions. Added a workaround that raises an exception if the command execution output is empty, so that it can be handled with the fix_sandbox_permissions() call. Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
- Refined error handling - Reduced the verbosity Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
adigie
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[nrf noup] [west zap-gui] Refine error handling
It turns out that the subprocess may return no output
if the Chromium cannot use sandbox due to the missing
permissions. Added a workaround that raises an exception
if the command execution output is empty, so that it
can be handled with the fix_sandbox_permissions() call.
Signed-off-by: Marcin Kajor marcin.kajor@nordicsemi.no
[nrf noup] [west zap-sync] Handle overwriting of the default zcl file
Fixed the handling of the case when the default
cluster definition file (zcl.json) is used as both
input and output to the command. Without the fix,
the script removes the zcl.json and exits, because
the removed file cannot be copied.
Signed-off-by: Marcin Kajor marcin.kajor@nordicsemi.no
[nrf noup] [west zap-append] Add fallback to the attribute name deduction
Some XML cluster definitions do not contain the dedicated
'name' entry in the attribute field, instead they just
add name of the cluster as a text to the attribute
definition. Added a fallback logic, so that such cases
are handled to avoid ending up with null attributes in
zcl.json file. This mimics the ZAP loader behavior.
Signed-off-by: Marcin Kajor marcin.kajor@nordicsemi.no
Testing
Tested manually when adding a custom cluster.