* Removed unnecessary DB queries when editing/validating RSQL query in Target Filter Management (#1023)
Added valid TargetFields to RSQL validation when editing Target Filter.
Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
* Corrected visit OrNode implementation.
Changed isValid to receive FieldNameProvider as parameter
Reduced code duplication by moving commonly used utility methods to AbstractFieldNameRSQLVisitor from ValidationRSQLVisitor abd JpqQueryRSQLVisitor
Refactored and extended Unit Tests.
Minor corrections and typos.
Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
* Added Maven entry for devolo 2020 copyright header.
Signed-off-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
* Fix failing unit tests
* # WARNING: head commit changed in the meantime
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Fix Sonar findings.
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Cleanup
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Fix PR review findings
* Fix invalid queries in unit tests
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
* Added test case to create filter with invalid query via Mgmt REST API
Signed-off-by: Stefan Behl <stefan.behl@bosch.io>
Co-authored-by: Sergey Gerasimov <sergey.gerasimov@devolo.de>
* download soft deleted artifact throws binary gone exception
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* add test and update documentation
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* fix javadoc
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* test soft deleted artifact has no download link
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
* Introduce new events that are triggered when changes are made to the tenant configuration.
* Add new events to EventTypes
* Fix DeploymentManagement tests.
* Fix AmqpMessageDispatcherServiceIntegration tests.
* Fix DdiRootControlle test.
* Remove unused imports.
* TenantConfigUpdatedEvent should implement EntityUpdatedEvent
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
Back in the days "time" was specified in API but never implemented/evaluated by hawkBit.
So we better remove it from the docs in order to avoid confusion.
Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io>
-Update Spring Cloud to Hoxton.SR7
-Replace ResourceSupport by RepresentationModel (Spring Hateoas 1.0)
-Replace ControllerLinkBuilder by WebMvcLinkBuilder (Spring Hateoas 1.0)
-Move getId() from Identifiable to BaseEntity (Spring Hateoas 1.0)
-Remove hamcrest.Factory
-Use static Sort.by reference
-Place http security anyRequest().authenticated()
-Replace MockMvcRequestBuilders.fileUpload by MockMvcRequestBuilders.multipart
-Deprecate MEDIA_TYPE_CBOR_UTF8
-Replace MEDIA_TYPE_CBOR_UTF8 by MEDIA_TYPE_CBOR in tests
-Replace HAL_JSON_UTF8 by HAL_JSON in tests
-Replace APPLICATION_JSON_UTF8 by APPLICATION_JSON in tests
-Use org.mockito.junit.MockitoJUnitRunner
-Remove overridden dependency versions
-Removing not needed comments in pom.xml
-Downgrade flyway-core to be MySQL 5.6 compatible
-Add maven-site-plugin since it was removed with spring-boot 2.3
-Set servlet encoding properties
-Introducing Test that verifies the charset inside the content-type of a response
-Add @DirtiesContext to CorsTest and ContentTypeTest
-Add content-type mockmvc test with adapted mockmvc config
-Move encoding.force property to test class
-Switch expected and actual parameter values in content-type test
-Delete deprecated content-type test with TestRestTemplate
-Exclude JUnit5 from spring-boot-starter-test
-Upgrade allure-junit4 to 2.13.5
-Add aspectjweaver 1.9.6 to surefire test execution
-Add flyway-core version to property
-Use getRequiredLink() within MgmtBaseEntity.getId()
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
* Removed unused status from data config endpoint
* Removed unused paramter from test
* Formating fixes
* Fixed comments after review
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Added documentation for download status of ddi feedback
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Added download status to cancelAction docs
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Fixed some typos in documentation
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Added download status to ddi_api.md and added missing quotation marks
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Added mising of in documentation
Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
* Add x-content-type-options header to fileStreamingUtil
Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
* Add comment why the x-content-type-options header has to be set
Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
* Truncate target name when name is empty and controllerId exceeds name length limit
* Add check if controllerId is null
* Use seperate method to truncate controllerId + use Array.asList to create list
* Make truncateControllerIdToMaxNameLength a static method
* Additionally check target name by calling target management
Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
* Updating the schema for targetfilterquery and rollout
* Updating the weight validation logic and tests
* Make weight optional
* Fix existing multi assignment tests by adding weight, remove weight from TargetFilterQuery
* Add weight validation tests, fix tests
* Add mgmt api tests for assignment and getting action with weight
* Add management layer validation and tests for creating rollouts with weight
* Fix amqp test, add repo level validation to resource tests
* Add weight to rollout mgmt-api and tests
* Add weight to mgmt api target Filter create and update
* Add target filter auto assign weight. disable enforcement of setting a weight in multiassign mode
* Remove ignored tests, fix api doc
* Fix minor findings
* Fix findings
* Remove hardcoded min weight
* Add docu text, fix findings
* Fix api documentation
* Expose weight via DMF
* Expose actions according to weight via ddi
* Fix documentation
* Add method to get actions ordered by weight to deploymentManagement
* Updating the schema for targetfilterquery and rollout
* Updated the indentation
* Updated the helper class, fixed the randomUID in test factory
* Updated the class name with prefix JPA
* Adding the missing License for WeightValidationHelper class
* Adding documentation to the dmf api on weight
* Removed the merger markers
* Updated the class name
* Removed the redundant method
* Addressed final PR comments
* Updated the missing testcase with latest default weight value
* Reverting the default value of weight back to 1000 and updated tests
Signed-off-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com>
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* improved documentation of ddi-rootcontroller resource's links list
* fixed review comments
* improved formatting
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
* Add multiassignment to mgmt api target endpoint
* Remove single assignment ds to targets offline
* Fix tests
* Add quota for maxResultingActionsPerManualAssignment
* Fix assignment with same target or distribution set multiple times in one request
* Log UI error
* Add tests
* Enable single assignment requests with multiple DSs and types
* Remove redundant target to DS assignment methods
* Add tests, fix assignment
* Fix possible nullpointer during target assignment request
* Update api docu
* Clean up deployment management code
* Enforce MaxActions quota for offline assignment
* Fix review findings
* Rename property, add migration into
* Add builder for DeploymentRequest
* Change offline assignment method to accept an assignment list, like online assignment
* Fix PR findings
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* added missing JsonIgnoreProperties annotation for DDI model classes
* added Copyright Headers & serialization tests for all Ddi model classes
* fixed typo in test
* fixed review findings
* added missing test descriptions
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
* refactored code to use EventPublisherHolder for publishing application events where possible
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
* fixed comment
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
* fixed typos in server error codes and messages
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
* reverted changes of server error message keys
Signed-off-by: Robert Sing <Robert.Sing@bosch-si.com>
* Handle response of MethodArgumentNotValidException
* Readapt DdiDeploymentBaseTest after merge conflicts
* Handle Exceptions HttpMessageNotReadable and MethodArgumentNotValid in one ExceptionHandler method
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch-si.com>
* refactored DdiDeploymentBaseTest.java
* removed hardcoded variables, moved createArtifact() to TestDataFactory
Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com>
* Increase target name to 128 and target controller id to 256
* Fix test failures by using constant NamedEntity.NAME_MAX_SIZE + 1
* Use constant NamedEntity.NAME_MAX_SIZE + 1 for mgmt-resource tests
* Add db migration scripts to increase the controllerId and name limit
* Fix review issues
* Use correct constant field for junit tests
* Change Hawkbit documentation url of application-<db>.properties
* Add new line at the end of db migration scripts
* Update assertion description
* Revert copyright years to its creator year
* Add DDI-, AMQP- and controller management-tests
Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch-si.com>
* fixed repository to check for file existence before trying to get the artifact
* added additional existence checks before retrieving the artifact from repository
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
* First draft of new assignment logic
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Enhancements of System Configuration view
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Drag&drop enhancements for multiple distribution set assignments
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Misc fixes
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* test that previous assignments are not canceled
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* add description and expected events to test
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* extend TenantConfigurationManagement by NullPointerException proof
getConfigurationValue method
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Hide "Required Migration Step" if Multi Assignments is enabled
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Make fields transient
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Add IDs for Required Migration Step elements
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Save work in progress
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Added new DMF message DmfMultiActionRequest
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* DMF enhancements to send out MultiActionRequest messages
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Minor changes
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Multi Assignment support for cancellations
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* fix permission problems and immutable lists
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* add message dispatcher tests for outgoing multiassignment messages, fix
old tests
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Implement Multi-Assignment support for rollout groups
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Minor changes
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Refactoring
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Register new deployment event with protobuff framework
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Allow same DS to be assigned multiple times
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix assignment with pending cancellations
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Reduce repository /DB calls
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Revert latest perf fix (causing a regression)
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* test if a rollout sends multiaction messages in multiassignment mode
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Minor changes
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Do not close new action if DS is already assigned (if multi-assign on)
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* add test that starts and finishes multiple rollouts in multiassignt mode
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* add javadoc to test method
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Prevent Multi-Assignments from being disabled via Repo Config UI
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Add link to Provisioning State Machine
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* test that Multiassignment can not be disabled via mgmt-api
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* refactor AmqpMessageHandlerService code
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Prevent Multi-Assignments feature from being disabled via Mgmt REST API
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* add license header, remove unused instance variables
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* fix tenantConfigurationManagement mock in test
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* return empty list instead of null
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* add ddi test for multiassignment, fix old test
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Prevent autoclose from being modified if Multi-Assignments is enabled
# WARNING: head commit changed in the meantime
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Add test for autoClose /multiAssign
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Javadoc improvements
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* change test method that waits for dmf messages to be dispatched
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* clean up code
Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com>
* Fix UI-related PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings, Sonar issues, and test failures
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix Sonar findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
* Fix PR review findings
Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>