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

[10.2.0] Backport of Aborted uploads are not cleared properly #35134

Merged
merged 1 commit into from
May 2, 2019

Conversation

sharidas
Copy link
Contributor

@sharidas sharidas commented May 2, 2019

File uploads should also be checked if they
are aborted or not. This would help to check
if the file is aborted or not. If aborted then
it would be cleared from the list.

Signed-off-by: Sujith H [email protected]

Description

When user uploads file and then aborts the upload ( the abort is done for the first time ), the global value of this._uploads is not updated properly. If the file is aborted, then as of now the state of upload is pending. And hence this._uploads will always have currently aborted upload. So when the user tries to upload a file next time ( say second time ), then the value in the this_upload mismatches. Because it has previous value. And the error could also be seen in the console.

In this change set I have introduced an attribute aborted for the upload. When the upload is aborted, aborted attribute of upload is set to true. And hence while clearing the uploads, it checks whether the current aborted upload should be added to remaining uploads or not.

In simple terms its an issue of not clearing uploads list.

Related Issue

Motivation and Context

The aborted upload(s) should be cleared from the list.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

File uploads should also be checked if they
are aborted or not. This would help to check
if the file is aborted or not. If aborted then
it would be cleared from the list.

Signed-off-by: Sujith H <[email protected]>
@sharidas sharidas added this to the development milestone May 2, 2019
@sharidas sharidas self-assigned this May 2, 2019
@sharidas sharidas requested a review from PVince81 May 2, 2019 06:04
@sharidas
Copy link
Contributor Author

sharidas commented May 2, 2019

Original PR: #35130

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@PVince81 PVince81 changed the title [stable10] Backport of Aborted uploads are not cleared properly [10.2.0] Backport of Aborted uploads are not cleared properly May 2, 2019
@codecov
Copy link

codecov bot commented May 2, 2019

Codecov Report

Merging #35134 into release-10.2.0 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@                Coverage Diff                @@
##             release-10.2.0   #35134   +/-   ##
=================================================
  Coverage             64.38%   64.38%           
  Complexity            20049    20049           
=================================================
  Files                  1285     1285           
  Lines                 76851    76851           
  Branches               1308     1308           
=================================================
  Hits                  49478    49478           
  Misses                26989    26989           
  Partials                384      384
Flag Coverage Δ Complexity Δ
#javascript 53.66% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.52% <ø> (ø) 20049 <ø> (ø) ⬇️

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 5c9e26c...5111ea7. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented May 2, 2019

Codecov Report

Merging #35134 into release-10.2.0 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@                Coverage Diff                @@
##             release-10.2.0   #35134   +/-   ##
=================================================
  Coverage             64.38%   64.38%           
  Complexity            20049    20049           
=================================================
  Files                  1285     1285           
  Lines                 76851    76851           
  Branches               1308     1308           
=================================================
  Hits                  49478    49478           
  Misses                26989    26989           
  Partials                384      384
Flag Coverage Δ Complexity Δ
#javascript 53.66% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.52% <ø> (ø) 20049 <ø> (ø) ⬇️

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 5c9e26c...5111ea7. Read the comment docs.

@PVince81 PVince81 merged commit c515df5 into release-10.2.0 May 2, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-upload-cancel-issue-release-10.2.0 branch May 2, 2019 09:15
@PVince81 PVince81 modified the milestones: development, QA May 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants