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

Job Step Properties limits and basic validation #3318

Merged

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented May 28, 2021

This PR add some fields to perform validation on JobStepPropertyes when creating a Step.
As per default no validation is added for existing JobStepDefinitions to not break any existing JobStep Definition.

Related Issue
None

Description of the solution adopted
Added following fields to JobStepProperty:

  • minLength
  • maxLength
  • minValue
  • maxValue
  • validationRegex

These fields will be enforced only if specified.

Screenshots
None

Any side note on the changes made
None

@Coduz Coduz added the Enhancement This PR/Issue improves an part of Kapua label May 28, 2021
@Coduz Coduz requested a review from lorthirk May 28, 2021 10:35
@Coduz Coduz force-pushed the feature-jobStepDefinitionPropertyLimits branch from 21fbdbb to 9524e99 Compare May 28, 2021 10:38
@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #3318 (f00240f) into develop (08bb941) will decrease coverage by 29.20%.
The diff coverage is 41.11%.

❗ Current head f00240f differs from pull request most recent head fffa91e. Consider uploading reports for the commit fffa91e to get more accurate results
Impacted file tree graph

@@              Coverage Diff               @@
##             develop    #3318       +/-   ##
==============================================
- Coverage      55.02%   25.81%   -29.21%     
+ Complexity       794      661      -133     
==============================================
  Files           1488     1488               
  Lines          30009    30080       +71     
  Branches        2498     2507        +9     
==============================================
- Hits           16511     7764     -8747     
- Misses         12581    21714     +9133     
+ Partials         917      602      -315     
Impacted Files Coverage Δ
.../eclipse/kapua/commons/util/ArgumentValidator.java 25.45% <14.28%> (-74.55%) ⬇️
.../step/definition/internal/JobStepPropertyImpl.java 52.17% <26.31%> (-18.20%) ⬇️
.../service/job/step/internal/JobStepServiceImpl.java 39.64% <48.43%> (-35.77%) ⬇️
...rc/main/java/org/eclipse/kapua/KapuaException.java 0.00% <0.00%> (-100.00%) ⬇️
...c/main/java/org/eclipse/kapua/KapuaErrorCodes.java 0.00% <0.00%> (-100.00%) ⬇️
...in/java/org/eclipse/kapua/broker/BrokerDomain.java 0.00% <0.00%> (-100.00%) ⬇️
...ain/java/org/eclipse/kapua/event/ServiceEvent.java 0.00% <0.00%> (-100.00%) ⬇️
...n/java/org/eclipse/kapua/broker/BrokerDomains.java 0.00% <0.00%> (-100.00%) ⬇️
...va/org/eclipse/kapua/commons/util/SystemUtils.java 0.00% <0.00%> (-100.00%) ⬇️
...n/java/org/eclipse/kapua/model/domain/Actions.java 0.00% <0.00%> (-100.00%) ⬇️
... and 626 more

@Coduz Coduz force-pushed the feature-jobStepDefinitionPropertyLimits branch from 9524e99 to 0f2f617 Compare May 28, 2021 11:12
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
@Coduz Coduz force-pushed the feature-jobStepDefinitionPropertyLimits branch from 0f2f617 to ffa6a2a Compare May 28, 2021 12:34
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Coduz added 4 commits May 31, 2021 12:35
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
@Coduz Coduz merged commit 7ba5cfb into eclipse:develop Jun 1, 2021
@Coduz Coduz deleted the feature-jobStepDefinitionPropertyLimits branch July 6, 2021 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants