8000 added triggers to check for and handle code conflicts in custom XMLs and updated relevant tests by dhchandw · Pull Request #1402 · project-chip/zap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

added triggers to check for and handle code conflicts in custom XMLs and updated relevant tests #1402

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

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

dhchandw
Copy link
Collaborator
@dhchandw dhchandw commented Aug 13, 2024
  • Added triggers to check for mfg code and code conflicts in custom xml.
  • When a session package (that is a manufacturer specific custom xml) is inserted or re-enabled these triggers check for the following:
    • If any other custom XMLs linked to the same session have cluster code conflicts
    • If any other custom XMLs extend the same cluster and have attribute or command code conflicts
  • and adds the relevant session notifications
  • Also added triggers to delete all code conflict session notifications related to a session package when that session package is deleted/disabled
  • Updated relevant tests to check for these session notifications

ZAPP-1467

@dhchandw dhchandw requested review from brdandu and paulr34 August 13, 2024 18:05
@dhchandw dhchandw marked this pull request as ready for review August 13, 2024 18:11
@dhchandw dhchandw force-pushed the bug/codeConflict branch 3 times, most recently from bf84955 to a1abd4a Compare August 14, 2024 13:36
Copy link
Collaborator
@brdandu brdandu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor comments.

ON
c.PACKAGE_REF = p.PACKAGE_ID
INNER JOIN
SESSION_PACKAGE spk
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a big deal but cleanup formatting

AND (
(c.CODE = c2.CODE AND c.MANUFACTURER_CODE = c2.MANUFACTURER_CODE)
OR
(c.CODE = c2.CODE AND c.MANUFACTURER_CODE IS NULL AND c2.MANUFACTURER_CODE IS NULL)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(c.MANUFACTURER_CODE IS NULL OR c.MANUFACTURER_CODE = 0) AND (c2.MANUFACTURER_CODE IS NULL OR c2.MANUFACTURER_CODE=0) ?

p.PACKAGE_ID <> p2.PACKAGE_ID;
END;

/* Trigger that deals with code conflicts in attributes when a session package is re-enabled */
Copy link
Collaborator
@brdandu brdandu Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does re-enablement work for a user? how is the user flow in this case?

p.PACKAGE_ID <> p2.PACKAGE_ID;
END;

/* Trigger that deletes relevant code conflict session_notice entries when a session package is disabled */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are disabled and deleted separate for a user's flow with ZAP UI?

)
expect(
sessionNotif.some((notif) =>
notif.message.includes('Cluster code conflict')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these messages also check for the path you inserted to be more precise on the error?

- Added triggers to check for mfg code and code conflicts in custom xml.
- When a session package (that is a manufacturer specific custom xml) is inserted or re-enabled these triggers check for the following:
	*If any other XMLs linked to the same session have cluster code conflicts
	*If any other XMLs extend the same cluster and have attribute or command code conflicts
- and adds the relevant session notifications
- Also added triggers to delete all code conflict session notifications related to a session package when that session package is deleted/disabled
- Updated relevant tests to check for these session notifications

ZAPP-1467
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.20%. Comparing base (1bf40e8) to head (d102bfa).
Report is 44 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1402      +/-   ##
==========================================
+ Coverage   66.00%   66.20%   +0.19%     
==========================================
  Files         194      191       -3     
  Lines       20528    20674     +146     
  Branches     4455     4530      +75     
==========================================
+ Hits        13550    13687     +137     
- Misses       6978     6987       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dhchandw dhchandw merged commit d309a42 into project-chip:master Aug 15, 2024
13 checks passed
@dhchandw dhchandw deleted the bug/codeConflict branch August 22, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0