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

Update hasObjectChangedInGivenFields to ignore predefined fields #1355

Merged

Conversation

sgratch
Copy link
Collaborator

@sgratch sgratch commented Oct 15, 2024

Reference: https://issues.redhat.com/browse/MTV-1546

  • Check if the inventory data has changed for re-loading the data to UI and re-rendering only for specified fields by ignoring a pre-defined list of fields.
  • Remove unused hasObjectChangedInGivenFields duplicate method implementation.

Up till now, all fields have been compared to check if something was changed for reloading. But since there are few fields that are changed occasionally in inventory, while not being displayed in UI, we can ignore them while checking for new data, for less requent unnecessary re-rendering.

Reference: https://issues.redhat.com/browse/MTV-1546

- Check if the inventory data has changed for re-loading the data to UI
and re-rendering only for specified fields by ignoring a pre-defined list of fields.
- Remove unused hasObjectChangedInGivenFields duplicate method
  implementation.

Up till now, all fields have been compared to check if something was
changed for reloading. But since there are few fields that are changed occasionally in inventory,
while not being displayed in UI, we can ignore them while checking for new data, for less requent unnecessary re-rendering.

Signed-off-by: Sharon Gratch <[email protected]>
Copy link

sonarcloud bot commented Oct 15, 2024

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 18.75000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 36.16%. Comparing base (13484d0) to head (e24a243).
Report is 82 commits behind head on main.

Files with missing lines Patch % Lines
...ers/utils/helpers/hasObjectChangedInGivenFields.ts 0.00% 7 Missing ⚠️
...rc/modules/Providers/hooks/useProviderInventory.ts 25.00% 3 Missing ⚠️
...dules/Providers/hooks/useProvidersInventoryList.ts 25.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1355      +/-   ##
==========================================
- Coverage   36.81%   36.16%   -0.65%     
==========================================
  Files         158      158              
  Lines        2548     2577      +29     
  Branches      599      601       +2     
==========================================
- Hits          938      932       -6     
- Misses       1428     1630     +202     
+ Partials      182       15     -167     

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

@sgratch
Copy link
Collaborator Author

sgratch commented Oct 15, 2024

Hi @ernesgonzalez33
Can you please check why all latest PRs, including this one, failed for the Konflux ci?
Thanks

@sgratch sgratch merged commit f743629 into kubev2v:main Oct 15, 2024
8 of 9 checks passed
@sgratch sgratch deleted the add-ignored-fieds-for-inventory-updates branch October 15, 2024 11:54
@ernesgonzalez33
Copy link
Contributor

@sgratch This one should fix the EC issues: kubev2v/forklift#1110

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.

4 participants