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

Fix processing of scheduled sheet coupon assignment tasks #2565

Merged
merged 3 commits into from
Feb 7, 2023

Conversation

mbertrand
Copy link
Member

@mbertrand mbertrand commented Feb 6, 2023

Pre-Flight checklist

  • Testing
    • Code is tested
    • Changes have been manually tested

What are the relevant tickets?

Closes #2456

What's this PR do?

Stops treating celery task metadata kwargs as a serialized string, because it is now a proper dict (maybe as a result of a prior celery upgrade?)

How should this be manually tested?

In a shell run the following:

from sheets.tasks import schedule_coupon_assignment_sheet_handling, _get_scheduled_assignment_task_ids
schedule_coupon_assignment_sheet_handling.delay("1xMmUnWm95uyMKXQm-_262tARY0uGYLcSay0qKhud1Zo")
print(_get_scheduled_assignment_task_ids("1xMmUnWm95uyMKXQm-_262tARY0uGYLcSay0qKhud1Zo"))

On this branch, the print statement should show a list with one value. On master branch, it will throw an error (AttributeError: 'dict' object has no attribute 'replace')

@odlbot odlbot temporarily deployed to xpro-ci-pr-2565 February 6, 2023 22:09 Inactive
@odlbot odlbot temporarily deployed to xpro-ci-pr-2565 February 6, 2023 22:11 Inactive
@codecov-commenter
Copy link

Codecov Report

Merging #2565 (f55e166) into master (ac480c2) will increase coverage by 8.66%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #2565      +/-   ##
==========================================
+ Coverage   88.34%   97.00%   +8.66%     
==========================================
  Files         324      150     -174     
  Lines       15346     4773   -10573     
  Branches     1133        0    -1133     
==========================================
- Hits        13557     4630    -8927     
+ Misses       1524      143    -1381     
+ Partials      265        0     -265     
Impacted Files Coverage Δ
sheets/tasks.py
users/management/commands/unblock_users.py
ecommerce/conftest.py
b2b_ecommerce/admin.py
mail/urls.py
courseware/factories.py
courses/serializers.py
courseware/constants.py
courses/models.py
compliance/apps.py
... and 164 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@rachellougee rachellougee left a comment

Choose a reason for hiding this comment

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

Code and tests are good for me. No AttributionError with this branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'dict' object has no attribute 'replace'
4 participants