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

Clear previous errors after completing sync #2738

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

mikkamp
Copy link
Contributor

@mikkamp mikkamp commented Dec 18, 2024

Changes proposed in this Pull Request:

This PR clears out previous sync errors if the synced countries are all contained within the set of target countries. Previously the length of the arrays needed to match as well. This is no longer the case since we don't sync each target country individually anymore.

The unit tests were updated to reflect the new behaviour.

Closes #2737

Detailed test instructions:

  1. On a site where we completed onboarding (and use a live URL so we are allowed to sync)
  2. During onboarding make sure to select multiple target countries
  3. Create a product with no description (complete all other requirements such as product image and price)
  4. Save the product with Sync and Show status to trigger the sync
  5. Wait for Action Scheduler to complete sync
  6. Edit the product and confirm the error has shown up after sync attempt
    Image
  7. View the product issues in the Product Feed page and confirm that the issue is showing up there as well
  8. Update the product to add a description and complete all requirements so it can sync
  9. Wait for the product sync to complete
  10. Edit the product and confirm the errors don't show up in the product
  11. View the product issues in the Product Feed page and confirm that the issue is not showing up there either
  12. Clear the product status cache to reload it (tool in connection test page)
  13. View the product issues table again and confirm that the error is still not there

Changelog entry

  • Fix - Clear previous errors after completing sync.

@mikkamp mikkamp self-assigned this Dec 18, 2024
@github-actions github-actions bot added type: bug The issue is a confirmed bug. changelog: fix Took care of something that wasn't working. labels Dec 18, 2024
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.0%. Comparing base (3b936b3) to head (8284510).
Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             develop   #2738     +/-   ##
===========================================
+ Coverage       66.3%   67.0%   +0.7%     
+ Complexity      4693    4692      -1     
===========================================
  Files            816     479    -337     
  Lines          24805   19612   -5193     
  Branches        1273       0   -1273     
===========================================
- Hits           16435   13136   -3299     
+ Misses          8197    6476   -1721     
+ Partials         173       0    -173     
Flag Coverage Δ
js-unit-tests ?
php-unit-tests 67.0% <100.0%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Product/ProductHelper.php 92.3% <100.0%> (ø)

... and 337 files with indirect coverage changes

@mikkamp mikkamp requested a review from a team December 18, 2024 12:39
Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Confirmed that after product issues are resolved and the product is synced, the corresponding issues on the product editor and the "Issues to resolve" table no longer appear. LGTM.

@mikkamp mikkamp merged commit d9c3385 into develop Dec 19, 2024
14 checks passed
@mikkamp mikkamp deleted the fix/2737-clear-presync-errors branch December 19, 2024 08:45
@tomalec tomalec mentioned this pull request Dec 25, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre sync errors are not always cleared after successful sync
2 participants