Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom XML bug in the following use case - Add custom xml, make changes, delete, add again (both in ZigBee and Matter) #1391

Open
dhchandw opened this issue Aug 6, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dhchandw
Copy link
Collaborator

dhchandw commented Aug 6, 2024

Steps to reproduce:

  • Load a custom xml with a custom cluster into your session
  • Delete the custom xml
  • Make some changes to the custom xml (in my case I changed the name of the cluster and the type of one of the attributes)
  • Load the custom xml in the same session again

Expected Result:

  • You see only one custom cluster with the latest changes reflected

Actual Result:

  • You see two custom clusters - the older one and the newer one with changes.

Note:
If you delete, make changes again and re-upload you will now see three instances of the same cluster.

Screenshot 2024-08-06 at 11 03 27 AM
Screenshot 2024-08-06 at 11 06 01 AM

@dhchandw
Copy link
Collaborator Author

dhchandw commented Aug 6, 2024

First upload of custom xml:
In PACKAGE

{ "PACKAGE_ID": 96, "PARENT_PACKAGE_REF": null, "PATH": "/Users/dhchandw/Desktop/matter-custom-bug-test.xml", "TYPE": "zcl-xml-standalone", "CRC": 557013978, "VERSION": null, "CATEGORY": null, "DESCRIPTION": null, "IS_IN_SYNC": 1 }

After delete:
In PACKAGE

{ "PACKAGE_ID": 96, "PARENT_PACKAGE_REF": null, "PATH": "/Users/dhchandw/Desktop/matter-custom-bug-test.xml", "TYPE": "zcl-xml-standalone", "CRC": 557013978, "VERSION": null, "CATEGORY": null, "DESCRIPTION": null, "IS_IN_SYNC": 1 }

IN SESSSION_PACKAGE:

{ "SESSION_PARTITION_REF": 3, "PACKAGE_REF": 96, "REQUIRED": 1, "ENABLED": 0 }

After re-uploading changed custom xml:

  • No new package added
    In PACKAGE
{ "PACKAGE_ID": 96, "PARENT_PACKAGE_REF": null, "PATH": "/Users/dhchandw/Desktop/matter-custom-bug-test.xml", "TYPE": "zcl-xml-standalone", "CRC": 557013978, "VERSION": null, "CATEGORY": null, "DESCRIPTION": null, "IS_IN_SYNC": 1 }

IN SESSION_PACKAGE

{ "SESSION_PARTITION_REF": 3, "PACKAGE_REF": 96, "REQUIRED": 1, "ENABLED": 0 }
{ "SESSION_PARTITION_REF": 4, "PACKAGE_REF": 96, "REQUIRED": 1, "ENABLED": 1 }

IN CLUSTER

{ "CLUSTER_ID": 73, "PACKAGE_REF": 96, "DOMAIN_NAME": "General", "CODE": 4294048800, "MANUFACTURER_CODE": null, "NAME": "Sample Custom Cluster", "DESCRIPTION": "The Sample MEI cluster showcases cluster manufacturer extensions", "DEFINE": "SAMPLE_MEI_CLUSTER", "IS_SINGLETON": 0, "REVISION": null, "INTRODUCED_IN_REF": null, "REMOVED_IN_REF": null, "API_MATURITY": null }
{ "CLUSTER_ID": 74, "PACKAGE_REF": 96, "DOMAIN_NAME": "General", "CODE": 4294048800, "MANUFACTURER_CODE": null, "NAME": "Sample Changed Cluster", "DESCRIPTION": "The Sample MEI cluster showcases cluster manufacturer extensions", "DEFINE": "SAMPLE_MEI_CLUSTER", "IS_SINGLETON": 0, "REVISION": null, "INTRODUCED_IN_REF": null, "REMOVED_IN_REF": null, "API_MATURITY": null }

@dhchandw dhchandw added the bug Something isn't working label Aug 6, 2024
dhchandw added a commit that referenced this issue Aug 6, 2024
Added tests for Matter custom xml support for the following use cases:

- loads a file with a custom cluster and an extension of a cluster and checks it
- loads a second file with a further extension of the extended cluster and checks it
- tests generation with custom xml
- loading bad custom xml -> throw warning
- Add 2 custom files with manufacturer name/code and attribute code collisions -> throw error.
    * This should be an SQL error, it is currently broken and should be fixed in PR Adding constraints to the database       tables to avoid redundant entries #1352 is merged.
- test generation after deleting the custom xml
     * This doesn't work as expected - #1387
- Add custom xml, make changes, delete, add again -> make sure that generated content has new edits
      * Effected by #1387 and #1391
- Loading zap file with custom xml that does not exist - throw error
- Loading zap file with custom xml and generating

Once PR #1352 is merged and #1387 and #1391 are resolved - tests should be updated appropriately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants