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

Improve promotion code batch #5830

Merged

Conversation

kjriga
Copy link
Contributor

@kjriga kjriga commented Aug 16, 2024

Summary

We are opening a PR with the work from #5383. This fixes #5379.

We integrated suggestions from the reviewers on #5383.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

DanielePalombo and others added 4 commits August 16, 2024 13:31
Before this fix, when the Spree::PromotionCode creation failed, the
exception was raised and the job fails with error.
This commit rescues the creation exception and remove the failed code
from the codes list.
Collecting results of large code counts can exceed available memory.

This was initially proposed on another PR that we are basing this one
on: solidusio#5383

Co-authored-by: Jared Norman <[email protected]>
Co-authored-by: Nick <[email protected]>
Co-authored-by: Benjamin <[email protected]>
Co-authored-by: Sofia <[email protected]>
Co-authored-by: Senem Soy <[email protected]>
Co-authored-by: Andrew Stewart <[email protected]>
Co-authored-by: Chris <[email protected]>
@kjriga kjriga requested a review from a team as a code owner August 16, 2024 21:08
@github-actions github-actions bot added the changelog:repository Changes to the repository not within any gem label Aug 16, 2024
@kjriga kjriga changed the title Sg/improve promotion code batch Improve promotion code batch Aug 16, 2024
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.03%. Comparing base (2ae2bfd) to head (211110a).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5830   +/-   ##
=======================================
  Coverage   89.03%   89.03%           
=======================================
  Files         737      737           
  Lines       17188    17189    +1     
=======================================
+ Hits        15304    15305    +1     
  Misses       1884     1884           

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

@kennyadsl kennyadsl merged commit ea43f41 into solidusio:main Aug 19, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:repository Changes to the repository not within any gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PromotionCodeBatch fails generating million codes
4 participants