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

Add maximum length to configuration put step definition #3812

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

MDeLuise
Copy link
Contributor

Brief description of the PR
Due to the fact that the database column property_value is of type TEXT, a configuration cannot have more than 65535 characters.
This because the column type TEXT can hold data up to about 64 Kilobytes size.

This PR adds a validation in the frontend that permits to illegal requests to fail fast without even sending them to the backend.

Related Issue
This PR relates to #3469.

Description of the solution adopted
A proper maximum length is forced to the textarea.

Copy link
Contributor

@Coduz Coduz left a comment

Choose a reason for hiding this comment

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

Please add the ArgumentValidation.lengthRange(...) invocation in the backend service

@Coduz Coduz added the Bug This is a bug or an unexpected behaviour. Fix it! label Jul 12, 2023
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #3812 (cdd9cd0) into develop (bad8d29) will increase coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head cdd9cd0 differs from pull request most recent head 33b290a. Consider uploading reports for the commit 33b290a to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #3812   +/-   ##
==========================================
  Coverage      22.22%   22.22%           
  Complexity         6        6           
==========================================
  Files           1876     1876           
  Lines          35439    35448    +9     
  Branches        2783     2785    +2     
==========================================
+ Hits            7876     7879    +3     
- Misses         27251    27257    +6     
  Partials         312      312           
Impacted Files Coverage Δ
...s/internal/DevicePackageManagementServiceImpl.java 0.00% <0.00%> (ø)
.../service/job/step/internal/JobStepServiceImpl.java 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@MDeLuise MDeLuise force-pushed the fix/large-configuration-put branch from 02b9cac to 5ef0d25 Compare July 13, 2023 14:32
A configuration cannot have more than 65535 characters, due to the database column `TEXT` definition. Adding the validation in the frontend permits to fail fast illegal requests without sending them to the backend. Also add check on backend.
@MDeLuise MDeLuise force-pushed the fix/large-configuration-put branch from 5ef0d25 to 33b290a Compare July 13, 2023 14:33
@Coduz Coduz merged commit 58c1b7e into eclipse:develop Jul 17, 2023
29 of 30 checks passed
@MDeLuise MDeLuise deleted the fix/large-configuration-put branch July 17, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it!
Projects
Development

Successfully merging this pull request may close these issues.

2 participants