4ded7deeb2d3e42e0303a4283a291ec91ebdc857
76 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7440d90f59 |
[#1383] Spring Boot 3 migration Step 2 (#1559)
* [#1383] Spring Boot 3 migration Step 2 Some of the steps: 1. Change spring version parent and versions in root pom.xml 2. update eclipselink versions 3. javax.annotation -> jakarta.annotation (*.java) 4. javax.persistence -> jakarta.persistence (*.java) 5. javax.servlet -> jakarta.servlet (*.java, pom.xml) 6. javax.validation:validation-api -> jakarta.validation:jakarta.validation-api (pom.xml) 7. javax.validation -> jakarta.validation (*.java) 8. javax.transaction -> jakarta.transaction (*.java) 9. replace spring-cloud-stream-binder-test (hawkbit-repository-test) with ``` <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-stream-test-binder</artifactId> </dependency> ``` , TestSupportBinderAutoConfiguration.class }) -> }) @Import(TestChannelBinderConfiguration.class) 10. Set to Simple UI standard parent 11. requestMatchers to securityMatcher 12. @SpringBootApplication(scanBasePackages = "org.eclipse.hawkbit") (otherwise for instance flyway doesn't work - suffix is default ".sql", not H2.sql and don't differentiate dbs? strange is there a change?) 13. @NonEmpty for Long leads to validation exception - replaced with @NotNull 14. RSQLUtilityTest.correctRsqlBuildsPredicate - fixed - mock query builder add method 15. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#spring-mvc-and-webflux-url-matching-changes - aliases as targers/ return 404 - remove trailing slash 16. firewall tests (allowedHostNameWithNotAllowedHost) doesn't throw 'rejected exception' but return 400 instead (as probably is expected anyway) Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com * Fix tenant listing to do not mix with multitenancy Tenant metadata is not multitenancy aware while depend on distribution set type which is. Thus querying all tenant metadata (in non tenant context) sometimes leads to resolution of distribution set type which is tenant scoped and leads to problems. So, now listing tenant lists just their ids - not fill entities. Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com> --------- Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com> |
||
|
|
7768e543fd |
[#1548] Add support for dynamic rollouts (#1533)
* [#1548] Add support for dynamic rollouts -- Current status -- Initial draft only !!!, to be improved TODO: * evaluate the target count - if update group/rollout total count fails dynamic updates could (?), actually, contain more targets * is it needed to break handler on group creating? * if dynamic group schedulers occur to be heavy - maybe a handler per tenant will ensure that one tenant won't break all *Concept for dynamic groups*: Rollouts are static and dynamic. Static rollouts consist of static groups only while dynamic rollouts have a number of static groups (first groups) and then an unlimited number of dynamic groups. Group targets assignments: * static groups include ALL matching targets created at the time the rollout was created, nevertheless they have active actions with bigger weight or not. Actions for the rollout and included targeets however are created at the start time. * dynamic groups however are filled in when started and consider the action weight. The targets included in a dynamic group are: * matching (filter and distribution set compatible) * not included in this or following rollout static groups (if already included in any of the following rollouts - it's intended to be overridden) * not in active actions of any rollouts with equal or bigger weight In general, when you create a rollout it contains all matching targets available at create time overriding any previous rollouts, actions, and so on. If the rollout is dynamic when its dynamic group becomes running it gets only matching targets that doesn't belong to static groups or have actions with great or equal weight Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com> * [#1548] Add 1000 weight for actions, rollouts and auto assignments without weight Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com> --------- Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com> |
||
|
|
4b5a7d6e7d |
[#1509] Sync Target type with SW and DS types (Mgmt Layer) (#1513)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com> |
||
|
|
44e7a72be3 |
Rollout retry (#1454)
* Rollout retry mechanism initial commit Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Remove test target fields for filter query Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * minor refactoring Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Fixes after review Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * more refactoring after review Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * skip compatibility check of dstype for retried rollout Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * remove dsType from javadoc Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> --------- Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> |
||
|
|
9c86729a68 |
[#1393,#1008] Switch to Eclipse v2.0 license (#1427)
Switching license from EPL v1 to v2. Following https://www.eclipse.org/legal/epl-2.0/faq.php#h.tci84nlsqpgw Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com> |
||
|
|
4a3a79aa6b |
Migration to Spring Boot 2.7.10 (#1320)
* Initial commit * Fix compile breaks * Fix hibernate config * Fix hibernate config * Fix failing tests * Improve logging * Improve logging * Fix Sonar issues * Remove BusProperties * Add BusProperties bean back in * Fix JPA workaround * Fix CVE-2021-22044 * Fix test failures * Fix PR review findings * Fix CVEs * Remove H2 version downgrade, fix schema migration, enable legacy mode * Downgrade Vaadin back to 8.14.3 * Fix EventPublisherHolder * Fix RemoteTenantAwareEvent * Fixed EventPublisherAutoConfiguration * New version of spring-hateoas requires links to be expanded (Mgmt API) * New version of spring-hateoas requires links to be expanded (Mgmt API) * Fix PR review findings * Fix PR review findings * Fix PR review findings * Update README.md * MariaDB Java Client downgrade to maintain compatibility with AWS Aurora * Temporarily disable RSQL test that depends on DB collation type * Upgrade to boot 2.7.10 * Upgrade snakeyaml to 1.33 * Upgrade Spring Security OAuth2 to version 5.7.7 * Remove obsolete exclusion of junit-vintage-engine * Upgrade jackson-bom to 2.14.2 |
||
|
|
21f1569881 |
Support user consent flow (#1293)
* Introduce user consent flow * Add permissions to confirmation management * rename from consent to confirmation * Reformat code. Remove unused imports. Change and add permission checks when configuring auto-confirmation. * Do not include null values for DDI confirmation base endpoint * fix confirmation required checkbox id * Remove unused import. Fix consume/produce type of new API's. * Change term processing to proceeding when activating user consent flow * Align formatting and extend integration test cases for DMF and DDI. * Extend DMF test cases to consider auto-confirmation * Refactor action management to fix problem of handling action status updates on closed actions. * remove unsupported validation * use new confirmation api for DMF. Extend test cases., * Remove unnecessary fields. * Extend API documentation for DDI and MGMT API. * adapt ddi api docs adoc file * Fixed the duplicate migration version for db files * fix method to support confirmation * Fixed PR comments * Addressed PR comments * Fixed after merge compilation issue * Fixed after merge compilation issue * Fix failing tests in MgmtRolloutResourceTest * Fixed the permissions issue reflected by integration tests * Added back the missing line of code lost during merge * Fix the failing test on Jenkins Signed-off-by: Stanislav Trailov <stanislav.trailov@bosch.io> Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> Signed-off-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com> Co-authored-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com> |
||
|
|
ea5a3b3d30 |
Adapt cancel flow (#1274)
* Adapt assignment events to communicate mass cancel operations within one event. Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> * Fix edge cases identified by test failures. Adapt tests and reduce amount of published cancel events. Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> * Fix license header Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> * Refactor visibility of methods in assignment strategy classes. Avoid having empty action status messages. Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> * Fix api docs Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> Co-authored-by: Bogdan Bondar <Bogdan.Bondar@bosch.io> |
||
|
|
5e963f8308 |
Introduce action status scoped custom code (#1277)
* Allow providing a custom code with an action status feedback to give more fine grained device specific details. * Add ddi rest docs for new optional status code value. * Provide new code value via mgmt api. Fix review findings. * Fix failing tests Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> Co-authored-by: Stefan Behl <stefan.behl@bosch.io> |
||
|
|
537548defb |
Update jsoup (#1276)
* upgraded jsoup to 1.15.3 * removed deprecated safe html annotation * added own valid string jsoup validator, disabled hibernate parallel method declaration constraint * adapted valid string validator * static method * return invalid value in case of processing exception Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io> |
||
|
|
bc2f228edc |
Dmf batch support changes. (#1273)
* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off. Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> * Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off. Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> * Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off. Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> * Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off. Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> * Update hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageDispatcherServiceIntegrationTest.java Co-authored-by: Bondar Bogdan <36962546+bogdan-bondar@users.noreply.github.com> * Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off. Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> * Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off. Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> * Dmf batch support changes. Implement code review comments. Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> Co-authored-by: Bondar Bogdan <36962546+bogdan-bondar@users.noreply.github.com> |
||
|
|
527f7de6a8 |
Fix overdue timestamp calculation permission (#1235)
* fixed overdue timestamp calculation permission error Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io> * changed method visibility Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io> |
||
|
|
44a85f20eb |
Feature/fix sonar warnings (#1226)
* Fixed sonar warnings - "Cognitive Complexity" - "Do not use replaceAll when not using a regex" - java:S5869 - Character classes in regular expressions should not contain the same character twice - Improved bad name - Typos - reduced code duplications - Replaced hand-made wait-utility with Awaitility - Log messages - Duplicate code - Typos - Removed Thread.sleep, instead relaxed check condition - Removed use of deprecated API - Removed use of deprecated API - Added supress-warnings as I do not see a better way to write the tests - Removed Thread.sleep / redundant functionality to Awaitility - Fixed other warnings (use isZero, isEmpty, hasToString) - Removed/Reduced duplicate code - Added generics - Fixed asserts - removed: field.setAccessible(true) actually should not be needed for public static fields! - Too long constructor passes arguments in wrong order - how surprisingly... - Clean-up use of varargs arguments - Fixed regex - Fixed typos and other minor stuff - Making public constructors protected in abstract classes - Swapped expected and asserted argument - volatile not enough for syncing threads - volatile not enough for syncing threads - out-commented code - Made regex not-greedy, added tests for verification - Avoid exposure of thread-local member var Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Fixed Sonar warnings * License header fix Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * License header fix #2 Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Fixing review findings Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> * Fixing tests - Fixed '&' usage in javadoc and typos - Fixing some warnings Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io> |
||
|
|
70779d1ac7 |
Feature target type filter (#1197)
* Added Target type filter with drag and drop support Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Removed the unused enums and target type filter button class Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Resolved merge conflicts Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Fixed java doc issue with the method link in the comment Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Fixed the IN query overflow for target Type assignment Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Fixed Review comments Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> |
||
|
|
dea6fa3ce6 |
Adapt UI for target type compatibility check (#1189)
* Added compatibility calls needed for UI Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * Adapted UI for target type compatibility checks Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * improved exception handling for incompatibility check Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * added & fixed unit tests Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * fixed merged conflicts Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * fixed target type incompatibly specification Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * changed UI behaviour to close assignment popup in case of IncompatibleTargetTypeException Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * added unit test to validate incompatibly specification fix Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * fixed review findings Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * fixed review findings Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * fix potential null pointer Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * Fixed rolloutcopy by adding dsTypeId to ProxyDistributionSetInfo Signed-off-by: Robert Sing <robert.sing@bosch-si.com> * suppressed warning Signed-off-by: Robert Sing <robert.sing@bosch-si.com> |
||
|
|
d80d0d6349 |
Implement target type CRUD UI operations (#1184)
* implement target type CRUD UI operations Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix licenses Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * code clean up Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * code clean up Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * refactor proxy target type Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * refactor proxy target type Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix review comments Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix review comments Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix review comments Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * update class description Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix review comments Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix review comments Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix review comments Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix sonar issue Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix sonar issue Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix sonar issue Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * fix showing assigned ds types Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> * remove unused import Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io> |
||
|
|
825cb64448 |
Introduce basic functionality for invalidation of distributionsets (#1179)
* Basic DS invalidation functionality Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add checks for valid/complete DS Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Stop rollouts + auto assignments when invalidating a DS Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add methods to count AAs + rollouts for invalidation Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Small refactoring for DS management Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add invalidation functionality to REST API Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Fix update stopped rollouts status Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add various tests Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Introduce countActionsForInvalidation Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Fix event tests with incomplete DS Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add H2 migration script Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Fix action count method Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Fix REST documentation tests Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Change flyway version number Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add lock for DS invalidation + adapt tests Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Move concurrency test to own class Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Handle possible InterruptedException Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Fix concurrency test Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Use one transaction for all invalidations Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add invalidate endpoint to REST docu Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Execute invalidation in transaction when actions are cancelled Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Check that distribution set is valid when editing/creating metadata Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Remove all changes in UI Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add DB migration files for all databases Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Implement review findings Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Move DS invalidation to own class to check permissions for single steps Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Move invalidation count methods to management classes Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Fix failing tests Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> |
||
|
|
3fa1dd1be4 |
Feature target type entity (#1162)
* Added Target Type model Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added Target Type JPA model Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added Target Type repository model classes Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Removed the name entity from Target Type Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Refactored the Target Type models Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added the DB migration script and updated the Target Type models Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added target type in target Mapper Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Changed the target type ID to Long Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added MYSQL DB migration script and removed the deleted column for target type Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Updated the DB migration script for target table Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added manyToMany reltation between target type and Ds type Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added POSTGRESQL DB migration script Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added MSSQL SERVER DB migration script Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added DB2 DB migration script Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added missing license header and java docs Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added on delete cascade in DB migration script Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added Target Type specification Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Removed the delete cascade and Added type API Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * fixed API doc build Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added target type management test Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added target type events test Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added target type update and unassign to target Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added API tests for assigning target type to target Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added missing license header Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added missing docs Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Fixed sonar issues Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Fixed license header build issue Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Updated the attribute name to target type Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Fixed the review comments Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Removed unused error status variable Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added target API to assign target type Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Added the tests for assigning target type to target Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> * Fixed the review comments for null check Signed-off-by: Anand kumar <anand.kumar@bosch-si.com> |
||
|
|
41922b6dca |
Feature/remove junit5 leftovers (#1097)
* Migrate JUnit4 leftovers to JUnit5 Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io> * Fix method name typos Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io> * Avoid unnecessary Mockito stubbings Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io> * Replace assertThrows by assertThatExceptionOfType, fix test TODO Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io> |
||
|
|
84740a2b1c |
Introduce new tenant configuration events (#1059)
* 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> |
||
|
|
81defa10a6 |
Migration to JUnit5 as default test runtime (#1082)
* Migrate tests to JUnit5 Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> * REST docs tests migrated to JUnit5 Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> * Migrated security and UI tests to JUnit5 Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> * Migrated management tests to JUnit5 Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> * Reflecting changes from JUnit5 migration Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> * Fix RabbitMQ test detection Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> * Drop support for JUnit4 Signed-off-by: Dominic Schabel <dominic.schabel@bosch.io> |
||
|
|
2e224b0ffd |
Merge remote-tracking branch 'origin/master' into fix_migration_to_new_spring_boot_version_merge
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io> |
||
|
|
541a0129ef |
UI Spring Context Holder bean registration (#1026)
* register the Spring Context Holder bean for UI instead of setting the context for each UI separately * reverted test scope for db driver Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io> |
||
|
|
8e90ffd95e |
Adaptations due to Vaadin 8 merge
Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io> |
||
|
|
28b65a290d |
Update Spring Boot to 2.3.2
-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> |
||
|
|
e82b9cee70 |
Feature/type for multi actions (#986)
* Introduce different types of Multi Action Event to distinguish between an Assignment and a Cancel. * Minimize the payload for the multiAction assignment and cancel event. Write tests for the MultiActionCancelEvent. * Remove unused action status. * Move list of actionIds to MultiActionEvent and declare it as abstract. * Remove unused imports. Signed-off-by: Michael Herdt <Michael.Herdt2@bosch-si.com> |
||
|
|
9f3ff40658 |
Migrated Hawkbit UI to Vaadin 8 (#980)
* Migrated Hawkbit UI to Vaadin 8
* fixed tag assignment messages
* disable rollout buttons instead of hinding them in Rollout Grid
* fix mssql db error
* small improvements to remove duplications while creating labels and distribution set type combo
* upgraded Vaadin to 8.11.1, upgraded jsoup to 1.11.2 (used by Vaadin 8.11.1), fixed selection in Metadata window, moved Rollout Window components to separate components package
* moved DS/SM type combobox creation to FormComponentBuilder, fixed add to collection error in SoftwareModuleDetails, changed save entity icons to harddrive, common refactoring
* removed duplications between breadcrumb grid headers (RolloutGroupGridHeader, RolloutGroupTargetGridHeader, TargetFilterDetailsGridHeader)
* replace proxy type in proxy objects with simple type info
* made all text fileds lazy (the timeout is 500ms), fixed add rollout window error on getting the bean from layout to controller
* removed duplications between ds to tag and target to tag assignment supports, extracted assignment notification from HawkbitCommonUtils
* fixed search input with caption overlap
* refactored layout visibility and resize listeners
* fixed approval strategy, adapted rollout advanced group ids to always increase
* Combine created and modified column creation
* remove Column<?, ?> variables
* fix confirmation dialog line breaks
* fix grids in details and filters
* fix column creation for upload grids
* add default ExpandRatio, fix rollouts and target filter
* add default addColumn method and fix action grids
* update deployment and rollout grid and grid css
* fix grid column widths
* refactored approval layout
* adapted approval layout
* refactored advanced rollout group layout
* refactored advanced group definitions to use proxy bean
* fixed copy rollout window enable save button
* third draft of Rollout Window validation: added UNKNOWN validation status, validate all layouts after validation listener is added
* second draft of Rollout Window Validation
* first Rollout Window Validation draft for enable/disable save button
* fixed custom target filter de-selection on delete, re-selection on update, reset edit/delete crud menu mode on custom filter tab selection
* added error threshold validation on total target and number of groups change
* added random ids to Proxy identifiable entities without defined ids
* add universal check box generator
* adapted Update and Approve Rollout Window Layout
* adapted setting and getting bean values for Add and Copy Rollout layouts
* fix setting ConfirmationDialog ID
* refactor ConfirmationDialog to use a CommonDialogWindow internally
* fix rollout group definition input width
* remove code duplication in UI grid column creation
* refactored rollout group pie chart and legend by extracing them to their own class VisualGroupDefinitionLayout
* remove code duplication on link creation
* moved creation of AutoStartOptionGroupLayout to FormComponentBuilder
* extracted RolloutFormLayout and SimpleGroupsLayout together with corresponding proxy beans from AddRolloutWindowLayout, adapted code accordingly
* move TimeforcedIcon generation to StatusIconBuilder
* move code to StatusIconBuilder
* use objects to build labels from entity states
* use generic method to generate status icon labels
* moved AdvancedGroupRow from DefineGroupsLayout to separate class
* remove code duplication on icon creation
* removed Optionals from Data Providers
* fixed remaining parts of xss vulnarable components (tags/types)
* added description to key-value details pairs, moved the logic of paginated database access to HawkbitCommonUtils
* further adapted xss atack posibilities
* adapted details header and key-value details
* adapted MetaData header
* adapted Artifact and Action History Grid headers
* adapted artifact download
* adapted already assigned notification and rollout approval permission check
* removed tenant and username cookies from hawkbit login
* adapted attributes sorting by key
* adapted controller attributes details
* removed grid ResizeSupport (can be introduced later if needed)
* refactored grids to not use resizeSupport but rather removing all columns and re-adding them after max/min state transition
* fixed selection of added items
* moved restoreState to AbstractGrid
* unified Ds grids on Distribution and Deployment Views
* moved filter support and drag and drop support to AbstractGrid
* removed stale Sm grid id for Upload view
* removed duplication between SwModuleGrid and SoftwareModuleGrid
* removed unneccessary status icons css properties
* added grid MasterEntitySupport, adapted grids
* fixed tags/types filter deselection after deletion
* fixed deletion success notification, added artifact uploads count check to software module table
* unified target/ds/sm grid headers
* unified DS and SM grid headers and details
* added Delete Support to Rollout, adapted deletion permissions
* introduced EntityResizeSupport, upgraded vaadin version to 8.10.4
* unified ds and sm type filter components
* removed duplications between Target and Ds tag filters
* removed duplication for #buildActionButton
* initial iteration of removing duplications between grids
* added GridActionsVisibilityListener
* added layout visibility listener to filter and rollout views
* unified LayoutResizeListener and LayoutVisibilityListener
* extracted ShowEntityFormLayoutListener
* refactored grid filter listeners
* refactored target filter listeners, introduced filter support
* added GenericEventListener, further unified listeners
* partially unified LayoutViewAware event listeners, added PinningChangedListener, TagFilterListener and TypeFilterListener
* fixed sql exception in case NO_TAG is selected without any additional tags active
* unified entity modified listeners, adapted tag token modified update
* fixed Upload View drop area enable on SM select
* unified selection listeners
* unified search listeners
* added common SearchFilterListener, added temporare EntityModifiedMasterAwareSupport for EntityModifiedListener, fixed Rollout View change after rollout deletion/modification, adapted state restore
* refactored entity modified and selection listeners together with support classes
* added maintenance window and created/modified at tooltips in Action History Window, added id to Bulk Upload popup window and main popup layout, fixed duplicated DS error during DS edit/update
* substituted ShowEntityDetailsEventPayload with SelectionChangedEventPayload in Rollout View for consistency with other Views, unified rollout ui state class
* added builder to EntityModifiedListener, adapted code
* refactored sm type modification of ds type
* fix removing sm type from ds type via ui
* refresh rollout group targets table on group-updated-event
* moved grid label icon creation to SpUiComponent builder
* fixed edit tag/type with invalid colour
* added range validator(0-100) to trigger threshold
* fixed rollout auto start option updates, fixed rollout grid search state restore, extended SPDateTimeUtil
* Rollout Window Form fixes
* small partial fix for error threshold percent/count validation and value change
* fixed time forced empty datetime in Rollouts Update Window
* added workaround for target/ds tags drag and drop due to the missing selection support
* fixed ds unpinning after deletion and completion state change
* added reason to bulk upload failed notification
* fixed target add/update window form name id, introduced separate layout listeners for entity modified events and selection/master changed events, extended grid selection support, refactored corresponding grids, layouts and listeners
* fixed required messages in the from builder, changed asyncExecutor to ui executor for file streaming, fixed auto-assignment for layout
* fixed drag and drop registration for non-selection grid model, small restore state refactoring
* fixed action remote events tests, adapted crudMenu/resize/search header supports to use mode-{mode} classes instead of ids modification
* changed id of metadata popup grid to 'metadata.window.table.id' and details grid to '{typePrefix}.metadata.details.table.id', fixed tag/type cell text wrapping, tooltip shows full tag/type name, removed checkboxes from Distributions Set Type Software module selection grids
* added tooltip to Rollout/RolloutGroup status bar, small bug fixes for Rollout Window target filter and approval
* fixed edit permission validation in DetailsHeader
* unbind distributionsview javascript from vaadin theme
* small refactoring of form component builder, assignment and rollout layout
* remove ds combobox code duplication, fix assig and autoassign popup
* add BoundComponent class, fix assignment popup
* remove duplicates for name, version description and actiontype fields
* removed code duplication, fix assign- and autoassign-popup
* adapted Action history eventing, changed entity modified parent event propagation
* added id to DS details modules grid
* started adapting Action History View
* adapted filter by ds drop area restore
* align drop styling with previous
* fix filter target table by assigned ds
* small refactoring of Deployment View and System config View layouts
* adapted DS tag layout
* fixed incompelete DS deselection and unpinning
* added filter to RemoteEventListener in order to ignore remote events, added select entity on add to grids
* fixed DS modules details, explained why session scope is used for bulk upload
* adapted bulk upload window to be lazy loaded, fixed restore by usinng session scope
* fixed user cell text selection in grid, drop hint highlighting
* fixed undo for iot-update-server config option
* fixed parsing in DurationField and refactored system config view
* removed unused variable from DurationField
* refactored config option view
* fixed polling option value in config option view
* fixed token refresh value in config option view
* added binder auth config option
* added binder to save config option
* added binder for auto cleanup option
* upgraded vaadin to 8.10.0, removed dd package together with CustomAcceptCriteria extension, removed CustomAcceptCriteria tests, removed all vaadin v7 dependencies, removed compatibility server and client
* added selection by pressing key up/down, refactored range selection handler and connector, drag and drop support drop style listener, removed unneccessary styles for selection extension
* show drop hint
* fix h2 cast error
* make unselected row dragable
* add support for selection using Shift and CTRL
* remove grid checkboxes, fix selection and drag and drop
* moved bulk upload classes to own package, started implementing bulk upload window builder
* further adaptations of bulk upload
* started adapting bulk upload
* partially removed stale classes/methods, vaadin v7 imports
* completeted pinning refactoring
* further pinning refactoring, added restore to distributions grid in deployment view
* started adapting pinning of target and distribution set
* further remote eventing refactoring, small styling adaptations
* added 'maximize' and 'minimize' ids to max/min grid icons
* removed event containers, adapting the delayed event bus push strategy, event provider and remote events listener
* small eventing refactoring
* adapted tag filter eventing, removed old event classes
* adapted selection eventing, fixed color styling for grid selection, added countByAssignedId to softwaremodulemanagement
* adapted type filter eventing
* adapted search filter eventing
* adapted actions visibility change eventing in filter layouts
* adapted layout eventing in Deployment View
* adapted layout eventing in Distributions View
* adapted layout eventing in Upload View
* adapted entity modified eventing
* adapted rollout eventing
* fix rollout view and window styling
* handle rollouts view remote events
* adapted eventing in Rollouts View
* fixed Target Filter session state management in Edit Form mode
* adapted target filter query add/update layout to use form layout
* started adapting tags assignment
* removed AbstractNotificationView
* added row border in grids
* fixed restoreState in Target Filters and Target Grid, refatored eventing in Deployment View
* Added event listener for DsSetType
* added confirmation window id for deletion support, added id for action type radio group, reworked restore state, small changes in Deployment view
* started adapting ds grid, ds tags, action history and Deployment View layout
* started adapting target grid
* reworked Target Filter View and event handling
* fixed Target Details error, started adapting Target Grid Layout
* refactored Date time parser
* fixed Date time parser
* fixed formatting
* fixed errors in auto close option
* fixed errors in auto cleanup option
* fixed errors in Polling view option
* adapted filter management view and selection listener behaviour
* cleanup, fix vaadin query to spring pageable convertion
* adapted target tag filter layout
* started adapting Deployment view
* fixed software modules details grid rendering under Distribution Set Details
* adapted artifact details grid popup window for Software Module details
* adapted auto assignment details grid for DS
* added get by ids to target tag management, adapted tag details layout for distribution set tag and target tag
* package structure refactoring
* started adapting software module details tab within distribution set details layout
* excluded javax.validation because of a reference to an old sources file
* fixed system config view misconfiguration
* fixed ids formating, added UI access call for updating entities through listeners
* refactored sm and ds types saving in proxy sm and ds entities
* fixed software module to distribution set assignment and software module dataprovider in Distributions View
* adapted add/update notification for software module and distribution set to show name and version, fixed search text field id
* adapted software module color highlighting in Distributions View
* adapted login ui
* started adapting Distributions View
* unified filter buttons click behaviour, added restore clicked filter to Upload View
* removed duplications in filter headers
* removed duplication in filter type/tag layouts
* added sm and ds type remote events matchers for listener
* adapted metadata details grid, update eventing fo details layout in Upload View
* adapted entity deletion eventing and selection on restore state for Upload View
* adapted file upload events handling, introduced RemoteEventsListener for the complete UI
* adapted Details Header to render two separate labels for caption prefix (entity type) and entity name to prevent xss attack
* upgraded vaadin to version 8.9.3, adapted upload artifact view and corresponding eventing further
* change visibility of components instead of removing them in Upload View
* adapted metadata popup window for target, distribution set and software module
* first iteration of adapting metadata window layout: created meta data dataproviders and window grids for target, ds and sm
* adapted auto assign window layout
* further refactoring of Target filter view and layouts
* adapted software module add/update window layout
* adapted distribution set add/update window layout
* refactored window layouts
* fixed software module add/update layout, adapted target add/update layout
* added validation of empty distribution set type software module types and mandatory property change
* further refactoring of distribution set type add/update window
* adapted distribution set type add/update window
* adapted software module type add/update window layout
* adapted tag layouts and color picker structure
* adapted target and ds tag add/update windows, refactored color picker
* added ds and sm type event containers
* refactored local eventing and remote events handling, mainly only for distributions view
* fixed ui alignment on the right side of the page
* Finalized upload view migration
* Fixed upload layout not enabled problem
* Migrated Upload view. Some small glitches still open.
* moved details headers to layouts
* added callback to update last selected entity in UI state after each grid selection, unified all details layouts
* further refactoring of Target Details
* added selected event publishing to selection support, refactored target details
* started unifying details layouts and adding details support classes
* unified grid layouts
* unified Target Filter Header
* fixed glitches in UI regarding Headers, dapted eventing for crud menu and close header supports
* unified types and tags headers
* unified more headers
* adapted TargetTableHeader to use AbstractGridHeader with Header Support classes, renamed to TargetGridHeader, removed unsused css properties
* added CrudMenuHeaderSupport, refactored AbstractGridHeader
* added AddHeaderSupport, BulkUploadHeaderSupport, CloseHeaderSupport, FilterButtonsHeaderSupport, ResizeHeaderSupport, SearchHeaderSupport, refactored ConfigMenuBar behaviour in MultipleTargetFilter
* started unifying headers
* extracted BulkUpload from AbstractTableHeader to TargetTableHeader
* removed header row for tags and types grids, adapted margin/padding for some layouts, modified css properties for borders, updated vaadin version to 8.8.6, vaadin-spring to 3.2.1
* added javax servlet api maven dependency to hawkbit-autoconfigure, because gwt-user is not used anymore, fixed a couple of runtime errors, hawkbit starts :)
* adapted TargetTableHeader drag and drop in order to filter targets by Distribution Sets, adapted gwt modules to inherit from compatibility Vaadin7WidgetSet, upgraded DistributionBar addon to be compatible with vaadin 8
* added NO TAG button to Target Tag and Distribution Tag layouts
* adapted Distribution Set Types and Software Module Types layouts
* adapted Target Tags layout, Distribution Set Tags Layout, added corresponding drag and drop supports
* migrated from Table to Grid in TargetFilterQueryButtons, adapted click listeners
* adapted twin columns layout for creating/updating Distribution Set Type
* adapted MetaData Details classes
* adapted AbstractMetadataPopupLayout and all children classes, refactored DeleteSupport
* adapted Grid in UploadProgressInfoWindow
* adapted software module details, target filter query details, removed custom combobox for autoassignment, adapted layouts and details
* removed obsolete classes, adapted layouts as needed, removed Custom Renderers because components are used directly within the grids
* added ArtifactDetailsGrid for Upload View, modified Artifact Layout to be consistent with Action History Layout in Deployment View, adapted Views and Layouts
* added SoftwareModuleGrid to Upload View
* migrated SwModuleTable to SwModuleGrid
* migrated Distribution Set Table from Distributions View to Grid, refactored drag and drop
* refactored target grid in Create/Update Filter View
* refactored tag classes to use TagData where possible
* migrated CreateOrupdateFilterTable to grid
* adapted tag token classes
* adapted Layouts, chaned Base Ui Event to except Proxy Entities
* adapted TargetFilterGrid
* Migrated TargetFilterTable to grid
* Removed vaadin Tokenfield dependency
* removed ConfirmationTab, using Component ConfirmationDialog instead; adapted MaintenanceWindowLayout, introduced AssignmentWindowLayout together with corresponding ComponentBuilder and Controller; added Drag and Drop support with differen Assignments support, adapted TargetGrid and DistributionGrid correspondingly; removed TargetAssignmentOperations utility class
* second version of PinSupport
* added DeleteSupport for target and distribution set items deletion
* first draft of PinSupport for pinning targets and distribution setes
* added first draft of Management Distribution Set Grid, adapted the corresponding data provider, adapted AbstractBaseViewFilter (should be checked)
* first draft of Target Grid, refactored Selection support to include multi-selection mode
* extracted single selection support, resize support and master details support from AbstractGrid, added filter type to AbstractGrid so the dataproviders are filterable by default, adapted some data providers to use filters, refactored master-details scenario for action history/status/msg layouts
* Adapted AbstractGrid for resize support, adapted ActionHistoryGrid, ActionStatusGrid, ActionStatusMsgGrid
* added rollout window specific classes (layouts, controllers, component builders)
* changed Rollout/Group/Target List Grids to use vaadin 8 concepts, added temp utility classes
* added ArtifactDataProvider and corresponding ProxyArtifact, SoftwareModuleArtifactsStateDataProvider, SoftwareModuleDistributionsStateDataProvider, TargetFilterStateDataProvider, TargetManagementStateDataProvider, TargetTagDataProvider and corresponding mappers
* added parent Type model class for DistributionSetType and SoftwareModuleType and corresponding ProxyType, added ActionDataProvider, ActionStatusDataProvider, ActionStatusMsgDataProvider, DistributionSetTagDataProvider, DistributionSetTypeDataProvider, SoftwareModuleTypeDataProvider and corresponding mappers
* extended data providers with filter, implemented multiple distribution set data providers for sifferent ui state (views), added target tag data provider, adapted Proxy Tag
* added data providers, mappers and proxy classes for fetching entities from backend and mapping them to ui proxy entities
* removed setImmediate on classes
* fixed usage of option group layouts, removed all setImmediate calls
* removed flexibleoptiongroup dependency and adapted the Option Group Layouts to use the default RadioButtonGroup
* adapted Vaadin Security and fixed Notifications
* Migrated vaadin 7 sources with the Vaadin migration tool to vaadin 8 compatibility mode
* fixed some minor sonar issues
* fixed license headers
* fixed dynamic stylesheet js license header
* adapted java docs parameters description, removed unused event classes
* fixed icon styles, made action icons a little bigger
* fixed download artifact action icon column header, fixed styling for the target filter query add/update layout, made it more responsive instead of hardcoding pixel values
* fixed Notification rendering regarding word wrap
* fixed restore behaviour with the invalid target filter query in Filter View
* replaced List collection with Set for better performance during DS pinning, tag assignment, target status filtering and rollout add/update window validation, ignored irrelevant sonar issues
* disable crud menu button on no CUD permissions, disable Rollout Group Button on missing permissions, removed Target Metadata details tab on missing repository read permissions, removed Autoassignment DS details tab on missing target read permissions, added UIEventPermissionChecker/HawkbitEventPermissionChecker to verify if current user has the required permissions in order to receive push events/notifications
* disable Autoassignment link in case of missing read repository permissions, disable TFQ save button in case of missing update target permissions
* adapted ordering of columns in maximized state
* limited selection in grids to 1000 entities, removed shift+ctrl selection behaviour (due to complex logic for preserving and limiting selection) disable edit/copy rollout on creation, small naming changes and java docs improvements
* added java docs to notification class
* fixed restoration of the default filter value for grids
* added caption to Delete column in grids, made target filter grid columns hidable, stoped propagation of select all event in order to not select the text on the page
* removed com.google.gwt.gwtmockito test dependency
* renamed RemoteEventsListener to HawkbitEntityEventListener to better describe the use-case for the listener
* changed Guava cache to Caffeine cache for EntityModified UI events
* removed obsolete HawkbitErrorNotificationMessage, UINotification is used instead
* added stacked notifications custom extension
* removed unused JUnitParams dependency
* fixed license header for ParallelNotificationConnector
* set ui mode back to production
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
|
||
|
|
9cb5d31396 |
Prioritisation of assignments via mgmt-API (#895)
* 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> |
||
|
|
09f2d8a481 |
Fix upload quota check and provide better error message (#893)
* 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> |
||
|
|
8687510131 |
Assign multiple distribution sets to a target via mgmt api (#886)
* 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> |
||
|
|
c68c5a6f5b |
Feature event publishing (#884)
* 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> |
||
|
|
fde0cbdf16 |
fix bug: change sql-query in localArtifactRepository (#820)
Also-by: Nazife Basbaz <nazife.basbaz@bosch-si.com> Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch-si.com> |
||
|
|
509693d0ae |
Sonar issue fixed
Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com> |
||
|
|
1ac40a7a95 |
Support for Multi-Assignments (#833)
* 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> |
||
|
|
56b938d22b |
Wrong applicationId fixed in case of context refresh (#811)
Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com> |
||
|
|
664c467920 |
Feature soft autoassignment (#789)
* Repository layer and database migration * Changed target filter management to update auto assignment action type together with distribution set, extended mgmt API, adapted auto assign checker/scheduler, changed auto assign distribution set select table to combobox, added filter functionality (needs refactoring) * Refactored auto assignment dialog window, added soft/forced option group, restructured action type option group layout * Added forced icon to target filter table autoassignment cell for the forced auto assign actions * First working draft of distribution set select combobox for auto assignment window * Optimised filtering queries, added alphabetical sorting on distribution set name and version * Refactoring of distribution bean query for lazy loading * Distribution set combobox refactoring and comments * Added verification of auto assign distribution set validity (completed, not deleted), exdended target filter query fields with auto assign action type field, added rsql filter tests, added repository layer tests * Added mgmt API tests * Changed target filter rest docu tests to include auto-assignment type * Updated hawkbit docs with auto-assignment description * Added debouncing to key and value input fields of metadata popup layout to get rid of unnecessary value change events, removed redundant set value call in common dialog window, minimizing the repaint components calls * Fixed sonar findings * Reverted changes of common dialog window validaton, setting the value of the field explicitly as before, until we rethink the whole concept of validaton mechanism * Fixed review findings * Removed rsql filtering by filter auto-assign action type, due to missing conversion of disallowed timeforced action type * Small fix regarding usage of page request * Updated sql script version for flyway * Extended tests for soft deleted distribution sets for auto-assignment and filter string within distribution set specification builder Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> |
||
|
|
d52a720480 |
Spring Boot 2.0 (#721)
* Migration to Boot 2.0. Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com> |
||
|
|
a2c1e5f132 |
Transaction handling refactoring (#771)
* unified new transaction handling in jpa repositories, extended Deployment Management and Action Repository Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * moved Deployment Helper to utilities package Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * removed superfluous utility method from Deployment Helper Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * refactored distribution set to target assignment, fixed PR review findings Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * fixed PR review findings Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * added additional validation of active flag and current status fields for action status update repository method Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * fixed timing issue in amqp message handler integration test, when validating target attributes update Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> |
||
|
|
a460f61e13 |
Added TargetAttributesRequestedEvent event type (#769)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> |
||
|
|
0cf4f8e8b9 |
Feature target metadata (#757)
* Defined the model for target matadata and the corresponding repository layer/management * Added target metadata quotas incl enforcement * Extended Target Mgmt REST API to allow for metadata CRUD operations * Added migration scripts for each database * Added back reference to target metadata in JpaTarget * Added tests for target management, Mgmt REST API, target metadata RSQL, and REST documentation * Updated asciidocs for target rest documentation * Fix Allure imports and annotations * Fix review findings Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> |
||
|
|
d09ca7be05 |
Migrate to Allure 2 (#749)
Add allure 2.7.0 dependency; change class references of Description, Features, Stories Signed-off-by: Stefan Klotz <stefan.klotz@bosch-si.com> |
||
|
|
086408e8f8 |
Feature Max Artifact Storage quota (#739)
* Enforcement of artifact storage quota * Added REST integration tests for artifact upload * Fix test config * Fix failing test cases * Fix PR review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> |
||
|
|
19caff6e46 |
Feature action cleanup (#704)
* Initial commit * Tenant configuration enhancements * Update REST documentation * Enhance System Configuration view in UI * Add unit tests * Fix delete query for H2 * Improve test coverage * Fix Sonar findings * Fix Hawkbit bot findings * Fix PR review findings * Fix peer review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> |
||
|
|
ecfe774e53 |
Target attributes update can be (re-)triggered by management API (#690)
* extend Management API with attribute `requestAttributes` * introduce new DMF Event Topic `REQUEST_ATTRIBUTES_UPDATE` * enhance REST documentation by new functionality * add tests for: * Management API * Amqp Message Dispatcher Service * Repository (Target Management) Signed-off-by: Jeroen Jan Laverman (INST/ESY3) <jeroen.laverman@bosch-si.com> |
||
|
|
cef7c2bbf2 |
Feature Approval Workflow for rollouts (#678)
* implement feature approval workflow Signed-off-by: Ioannis Spyropoulos <ioannis.spyropoulos@bosch-si.com> Signed-off-by: Michael Müller <Michael.Mueller17@bosch-si.com> * add documentation for REST endpoints Signed-off-by: Ioannis Spyropoulos <ioannis.spyropoulos@bosch-si.com> Signed-off-by: Michael Müller <Michael.Mueller17@bosch-si.com> * fix broken documentation test Signed-off-by: Ioannis Spyropoulos <ioannis.spyropoulos@bosch-si.com> * fix broken documentation test II Signed-off-by: Ioannis Spyropoulos <ioannis.spyropoulos@bosch-si.com> |
||
|
|
6dd98d2134 |
Protection against misuse with system-wide quota definitions (#670)
* Added quota for meta data per software module Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Added unit test for "meta data per module" quota Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * quota test enhancements Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Verify enforcement of meta data quota via REST Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota for distribution set meta data Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Verify enforcement of distribution set meta data quota via REST Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * software modules per distribution set quota Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Integration test enhancements for Modules per DistSet quota Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota for software module types per distribution set type Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota for max artifacts per software module Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quotas for ActionStatus per Action and Messages per ActionStatus Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota attributes per target Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota targets per rollout group Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * quota max actions per target Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max actions per target Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max actions per target Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per auto assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per manual assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per auto assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per auto assign Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per auto assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max actions per target Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per manual assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix issues caused by merge Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Improve JavaDoc Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar issues Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max artifact size Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Optimize quota configuration Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix test failures Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Improve test coverage Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max rollout groups per rollout Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Configure Rollout UI enhancements Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * UI enhancements Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Minor changes Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar 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 failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar finding Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix code review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * New approach for 'max artifact size' enforcement Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Reduce max artifact size for tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Kai's review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> |
||
|
|
e700acc312 |
Fix DistributionSet type should not be updatable (#659)
* DistributionSet type is no longer changable for an existing distribution set in the ui. Signed-off-by: Markus Block <markus.block@bosch-si.com> * Removed field "type" from a distribution update. Signed-off-by: Markus Block <markus.block@bosch-si.com> * Incorporated review comments. Signed-off-by: Markus Block <markus.block@bosch-si.com> |
||
|
|
f4278c45ef |
245 maintenance window (#535)
* Maintenance Window: Introduced dynamic update to polling time. (#245) Resolves #245 Added new configuration parameters and controller handling that can be used to enable reduction in polling time near to start of a maintenance window. - The device may only get to know of start of maintenance window when the device polls the server. If a window is available, server responds with maintenanceWindow as 'available' and the update as 'forced'. Hence, as the time for start of a maintenance window approaches, the device should poll the server more often in order to decrease the possibility of missing the maintenance window start time due to non-alignment of polling with the start time, or due to packet losses and other network issues. - Additional configuration parameter is introduced that will be used to specify the minimum number of times the controller should poll between current time and the start of maintenance window. Using this parameter, an "inverse exponential back-off" scheme for reducing the polling time is implemented. - Implemented inverse exponential back-off for polling. For example, considering default polling-time = 00:05:00, min-polling-time = 00:00:30, maintenance-window-poll-count = 3, we expect that controller should poll the server 3 times between current time and start of a maintenance window. Thus in following scenario controller will get to know of start of maintenance 3 secs after scheduled start. Whereas without this scheme, delay may be as much as 4 minutes. time until start: 00:21:00; polling time: 00:05:00 time until start: 00:16:00; polling time: 00:05:00 time until start: 00:11:00; polling time: 00:03:40 time until start: 00:07:20; polling time: 00:02:27 time until start: 00:04:53; polling time: 00:01:38 time until start: 00:02:10; polling time: 00:00:43 time until start: 00:01:27; polling time: 00:00:30 time until start: 00:00:57; polling time: 00:00:30 time until start: 00:00:27; polling time: 00:00:30 time until start: -00:00:03; polling time: 00:05:00 - Once a maintenance window starts, the polling time is reverted to default. Polling time is not changed near the end of a maintenance window. Signed-off-by: Christian Storm <christian.storm@siemens.com> Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com> Signed-off-by: Raju HS <raju.hs@siemens.com> * Maintenance Window: Updated the DMF API. Added maintenance window handling for DMF API. Currently no timer or scheduler is used to send updates to devices when a maintenance window becomes available. The device can simulate a poll behaviour by sending a message on UPDATE_ACTION_STATUS topic. Depending on whether there is a maintenance window available or not, server should send DOWNLOAD_AND_INSTALL or DOWNLOAD_AND_SKIP. - Additional action status (DOWNLOADED) and event topic (DOWNLOAD_AND_SKIP) - Server sends DOWNLOAD_AND_SKIP or DOWNLOAD_AND_INSTALL based on maintenance window using ControllerManagement Signed-off-by: Christian Storm <christian.storm@siemens.com> Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com> Signed-off-by: Raju HS <raju.hs@siemens.com> * Maintenance Window: Added tests for DDI and Management APIs. Added test cases for DDI and Management API to test for maintenance window related logic. - Tests for Management API for DistributionSet assignment with and without valid maintenance schedule specified. - Tests for lapsed maintenance schedule. - Additional test helper methods. Signed-off-by: Christian Storm <christian.storm@siemens.com> Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com> Signed-off-by: Raju HS <raju.hs@siemens.com> * Maintenance Window: Added new fields, enums, APIs and helper classes. Extended the data model and Action API to support maintenance schedule. Also provided helper classes to parse cron expression and calculate maintenance window based on the schedule. - DOWNLOADED status added to Action interface for controller to record action status. - Extra fields and APIs are added to Action to set schedule, duration and time zone of maintenance window. - Maintenance schedule can be defined using: a cron expression (e.g. "0 30 10-13 ? * WED,FRI" for 30 minutes past the hour, between 10:00 AM and 01:59 PM, only on Wednesday and Friday), a duration (e.g. "00:30:00" for 30 minutes) and the time zone (e.g. "+02:00" for CET summer time or "+00:00" for UTC) relative to which maintenance window start time is calculated. - Extra APIs added to check if a maintenance schedule is defined or lapsed and if a maintenance window is available based on the schedule. - Added database fields to store the schedule, duration and timezone of maintenance window. - Added helper classes to parse and calculate the maintenance window schedule. - Added exception handling classes to handle invalid maintenance window schedule. Signed-off-by: Christian Storm <christian.storm@siemens.com> Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com> Signed-off-by: Raju HS <raju.hs@siemens.com> * Maintenance Window: Extended JSON model for REST APIs. Extended the JSON model to support defining and communicating the maintenance window information using the REST APIs. - Additional JSON objects are defined to extend request and response bodies. - When requesting a distribution set assignment to a target, the maintenance schedule information can be specified. Example below specifies a maintenance schedule at 11:00 PM, only on Saturday, only in 2017, for 30 minutes. Maintenance window start time is then calculated relative to the time zone specified, in this case CET summer time. $ curl 'http://127.0.0.1:8080/rest/v1/targets/2/assignedDS' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -d '{ "forcetime" : "0", "id" : "1", "type" : "forced", "maintenanceWindow": { "schedule": "0 0 23 ? * SAT 2017", "duration": "00:30:00", "timezone": "+02:00" } }' - When device requests the action information it gets to know if there is a 'maintenance schedule' for this action or not based on presence of maintenanceWindow field in the response. The value of maintenanceWindow is either 'available' (i.e. the maintenance window is now available as per defined schedule and the update can progress) or 'unavailable' (implying that maintenance window is not available now and update should not be attempted). If there is no 'maintenance schedule' defined, the field is null or not present. $ curl 'http://127.0.0.1:8080/default/controller/v1/2/deploymentBase/1?c=411629670' -i -H 'Accept: application/hal+json' HTTP/1.1 200 OK Content-Type: application/hal+json;charset=UTF-8 Content-Length: 1665 { "id": "1", "deployment": { "download": "forced", "update": "forced", "chunks": [ { "part": "os", "version": "1", "name": "1", "artifacts" : [ { "filename" : "binary.tgz", "hashes" : { "sha1" : "8b71973e835cd0718827238b1cf89f0079e44dae", "md5" : "a90218782025c48e09ba0436cf30d029" }, "size" : 5, "_links" : { "download" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz" }, "md5sum" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM" }, "download-http" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz" }, "md5sum-http" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM" } } } ] } ], "maintenanceWindow": "available" } } Signed-off-by: Christian Storm <christian.storm@siemens.com> Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com> Signed-off-by: Raju HS <raju.hs@siemens.com> * Maintenance Window: Added additional UI elements. Added additional UI elements to specify maintenance window schedule in hawkBit UI while assigning distribution set(s) to target(s). - Added UI control to hawkBit UI when distribution set assignment is confirmed. - Also added required theme updates and resource strings. Signed-off-by: Christian Storm <christian.storm@siemens.com> Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com> Signed-off-by: Raju HS <raju.hs@siemens.com> * Maintenance Window: Modified DDI and Mgmt APIs for maintenance window. Modified controller management and deployment management to handle maintenance window schedule in Management API and DDI API. - Modified REST endpoints to accept and respond with maintenance window information. $ curl 'http://127.0.0.1:8080/rest/v1/targets/2/assignedDS' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -d '{ "forcetime" : "0", "id" : "1", "type" : "forced", "maintenanceWindow": { "schedule": "0 0 23 ? * SAT 2017", "duration": "00:30:00", "timezone": "+02:00" } }' - Check for availability of a maintenance window based on the schedule. - Device gets go-ahead to install by change in ETAG and 'update' status to 'forced' when it polls during an available maintenance window. $ curl 'http://127.0.0.1:8080/default/controller/v1/2/deploymentBase/1?c=411659461' -i -H 'Accept: application/hal+json' HTTP/1.1 200 OK Content-Type: application/hal+json;charset=UTF-8 Content-Length: 1665 { "id": "1", "deployment": { "download": "forced", "update": "forced", "chunks": [ { "part": "os", "version": "1", "name": "1", "artifacts" : [ { "filename" : "binary.tgz", "hashes" : { "sha1" : "8b71973e835cd0718827238b1cf89f0079e44dae", "md5" : "a90218782025c48e09ba0436cf30d029" }, "size" : 5, "_links" : { "download" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz" }, "md5sum" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM" }, "download-http" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz" }, "md5sum-http" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM" } } } ] } ], "maintenanceWindow": "available" } } - In case the current available maintenance window lapses, the device is again sent 'update' status as 'skip'. The device may choose then to abort the update and restart during next available window. $ curl 'http://127.0.0.1:8080/default/controller/v1/2/deploymentBase/1?c=411659455' -i -H 'Accept: application/hal+json' HTTP/1.1 200 OK Content-Type: application/hal+json;charset=UTF-8 Content-Length: 1665 { "id": "1", "deployment": { "download": "forced", "update": "skip", "chunks": [ { "part": "os", "version": "1", "name": "1", "artifacts" : [ { "filename" : "binary.tgz", "hashes" : { "sha1" : "8b71973e835cd0718827238b1cf89f0079e44dae", "md5" : "a90218782025c48e09ba0436cf30d029" }, "size" : 5, "_links" : { "download" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz" }, "md5sum" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM" }, "download-http" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz" }, "md5sum-http" : { "href" : "http://127.0.0.1:8080/api/v1/default/download/controller/2/softwaremodules/8/filename/binary.tgz.MD5SUM" } } } ] } ], "maintenanceWindow": "unavailable" } } - In case the entire maintenance schedule lapses, before device is able to send the completed status, the action is canceled. $ curl 'http://127.0.0.1:8080/default/controller/v1/2' -i -H 'Accept: application/hal+json' HTTP/1.1 200 OK Content-Type: application/hal+json;charset=UTF-8 Content-Length: 340 { "config": { "polling": { "sleep": "00:05:00" } }, "_links": { "cancelAction": { "href": "http://127.0.0.1:8080/default/controller/v1/2/cancelAction/1" }, "configData": { "href": "http://127.0.0.1:8080/default/controller/v1/2/configData" } } } Signed-off-by: Christian Storm <christian.storm@siemens.com> Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com> Signed-off-by: Raju HS <raju.hs@siemens.com> |
||
|
|
c64a2e7ecc |
Feature add missing entity events (#640)
* introduce CRD event interfaces and add missing events for entities Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com> * extend EntityIdEvent by TenantAwareEvent Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com> * add tests for additional events and skip test preperation events Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com> * add missing expected events to tests Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com> * add target filter query CUD events Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com> * fix order imports Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com> * fix javadoc link Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com> * add neccessary EventType mapping for serialization Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com> |
||
|
|
d3cb9bb24d |
Improvements repository validation constraints (#626)
* Add html tag Validator on strings. Add string trim. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Revert unintended changes. Sonar issues. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Remove weired comment. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Raise EclipseLink due to validation problem. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix permission. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Colour field test. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix sonar issues. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> |