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 upload quota check and provide better error message #893

Merged
merged 13 commits into from Oct 30, 2019

Conversation

dobleralex
Copy link
Contributor

This PR fixes the quota checks for uploads. It moves the quota check to be executed after the upload. This enables to consider the file size within the check and show a proper error message.
Before the quota was only successfully checked when it was already exceeded before.

…r message

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
@schabdo schabdo added this to the 0.3.0M6 milestone Oct 2, 2019
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
… fixes

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
Copy link
Contributor

@aktivk aktivk left a comment

Choose a reason for hiding this comment

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

have a look on the code comment

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
@hawkbit-bot
Copy link

SonarQube analysis reported 5 issues

  • MINOR 5 minor

Watch the comments in this conversation to review them.

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
…ad_quota_message

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
@schabdo schabdo merged commit 09f2d8a into eclipse:master Oct 30, 2019
@schabdo schabdo deleted the feature_better_upload_quota_message branch October 30, 2019 10:24
ramannas pushed a commit to bosch-io/hawkbit that referenced this pull request Nov 18, 2019
* Adjusted upload quota check to include file size and show proper error message

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Fixed failing upload quota tests

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Moved quota check to stream, fixed review findings

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Added missing license header to QuotaInputStream

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Reworked uploadLock, ensured error messages may be translated, review fixes

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Added local artifactrepo to gitignore

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Fixed sonar issues and assignment quota message

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* PR review fixes

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Split quota exceptions, PR fixes

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Removed left over conversion method in quota helper

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Made conversion helper class final

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
AmmarBikic pushed a commit to bosch-io/hawkbit that referenced this pull request Oct 2, 2020
* Adjusted upload quota check to include file size and show proper error message

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Fixed failing upload quota tests

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Moved quota check to stream, fixed review findings

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Added missing license header to QuotaInputStream

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Reworked uploadLock, ensured error messages may be translated, review fixes

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Added local artifactrepo to gitignore

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Fixed sonar issues and assignment quota message

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* PR review fixes

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Split quota exceptions, PR fixes

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Removed left over conversion method in quota helper

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>

* Made conversion helper class final

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
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.

None yet

6 participants