Skip to content

First pass fix for non-existent users being passed to the calculate user storage task#2961

Merged
micahscopes merged 1 commit intolearningequality:hotfixesfrom
rtibbles:user_storage
Mar 18, 2021
Merged

First pass fix for non-existent users being passed to the calculate user storage task#2961
micahscopes merged 1 commit intolearningequality:hotfixesfrom
rtibbles:user_storage

Conversation

@rtibbles
Copy link
Copy Markdown
Member

@rtibbles rtibbles commented Feb 17, 2021

Description

  • Catch and log non-existent users.

Issue Addressed (if applicable)

Fixes #2825

Steps to Test

  • Upload a file
  • Finish up editing the contentnode
  • Go to upload a new file
  • Confirm that your storage has still updated properly

@rtibbles rtibbles added this to the Post Release Stabilization milestone Feb 17, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 17, 2021

Codecov Report

Merging #2961 (9a5601a) into hotfixes (28587f8) will increase coverage by 4.91%.
The diff coverage is 92.89%.

Impacted file tree graph

@@             Coverage Diff              @@
##           hotfixes    #2961      +/-   ##
============================================
+ Coverage     80.80%   85.72%   +4.91%     
============================================
  Files           281      298      +17     
  Lines         12659    15879    +3220     
============================================
+ Hits          10229    13612    +3383     
+ Misses         2430     2267     -163     
Impacted Files Coverage Δ
contentcuration/contentcuration/decorators.py 56.60% <50.00%> (-37.60%) ⬇️
...ntentcuration/contentcuration/db/models/manager.py 91.20% <90.98%> (-8.80%) ⬇️
contentcuration/contentcuration/forms.py 82.35% <93.90%> (+33.89%) ⬆️
contentcuration/contentcuration/api.py 92.06% <100.00%> (+1.43%) ⬆️
...tentcuration/contentcuration/context_processors.py 100.00% <100.00%> (ø)
...ontentcuration/contentcuration/db/advisory_lock.py 100.00% <100.00%> (ø)
...tcuration/contentcuration/db/models/expressions.py 93.33% <100.00%> (-6.67%) ⬇️
...entcuration/contentcuration/db/models/functions.py 100.00% <100.00%> (ø)
...ation/contentcuration/tests/test_rest_framework.py 36.93% <0.00%> (-63.07%) ⬇️
contentcuration/contentcuration/utils/format.py 21.05% <0.00%> (-49.54%) ⬇️
... and 181 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c65e2d0...9a5601a. Read the comment docs.

@micahscopes
Copy link
Copy Markdown
Contributor

With the user user@b.com, I wasn't able to get the available storage bar to update. I also didn't see any errors in the console. Not sure what's going on?

Copy link
Copy Markdown
Contributor

@micahscopes micahscopes left a comment

Choose a reason for hiding this comment

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

👍

@micahscopes micahscopes merged commit 300e36f into learningequality:hotfixes Mar 18, 2021
@pcenov
Copy link
Copy Markdown
Member

pcenov commented Mar 30, 2021

@rtibbles today I tested the following 2 cases as mentioned in the QA Scenarios section of #3044:

  • File upload and user storage status
  • Adding and deleting a file updates publish channel size

I have to report that both test cases are currently failing because the 'Total storage' value remains the same after uploading or deleting a file. See the following screenshots where you can see that the initial storage size of 34 MB remains unchanged:

2021-03-30_17-56-24

2021-03-30_14-29-00

Tested mainly with the following user: cenov1@melon.bg but also with another one cenov2@melon.bg again with no observable change in the 'Total storage' value.

@radinamatic

@rtibbles rtibbles deleted the user_storage branch March 30, 2021 15:10
@rtibbles
Copy link
Copy Markdown
Member Author

Yes, my fix here was to prevent backend errors - seems like we have more work to do for cache invalidation here.

Can you file an issue with the above so we can track?

@pcenov
Copy link
Copy Markdown
Member

pcenov commented Mar 30, 2021

Filed a new issue with the above here: #3058

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.

Calculate user storage task is frequently executed for non-existent user_ids

4 participants