hawkbit icon indicating copy to clipboard operation
hawkbit copied to clipboard

building hawkbit snapshot using mvn clean install fails

Open kareemZarka opened this issue 3 years ago • 3 comments

I'm building hawkbit snapshot and I've hit this error in testing

#11 991.4 [ERROR] Failures:
#11 991.4 [ERROR]   AutoCleanupSchedulerTest.executeHandlerChain:51
#11 991.4 Expecting:
#11 991.4  <2608>
#11 991.4 to be equal to:
#11 991.4  <4>

my docker file is the following

FROM maven:3.6.0-jdk-11-slim AS build
WORKDIR /src
# Update aptitude with new repo
RUN apt-get update

# Install git software
RUN apt-get install -y git

# cloning eclipse-hawkbit rep
RUN git clone https://github.com/eclipse/hawkbit.git /project/hawkbit
WORKDIR /project/hawkbit
RUN ls
# generating the binary
RUN if ! mvn clean install >log 2>err; then tail -n 1000 log err; exit 1; fi

is that expected ?

kareemZarka avatar Aug 16 '22 10:08 kareemZarka

I've bisected this down to 825cb644489ec0c773ba87eb8a3936dec2a71863 :

825cb644489ec0c773ba87eb8a3936dec2a71863 is the first bad commit
commit 825cb644489ec0c773ba87eb8a3936dec2a71863
Author: Sebastian Firsching <[email protected]>
Date:   Thu Sep 30 15:26:36 2021 +0200

    Introduce basic functionality for invalidation of distributionsets (#1179)

    * Basic DS invalidation functionality

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Add checks for valid/complete DS

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Stop rollouts + auto assignments when invalidating a DS

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Add methods to count AAs + rollouts for invalidation

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Small refactoring for DS management

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Add invalidation functionality to REST API

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Fix update stopped rollouts status

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Add various tests

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Introduce countActionsForInvalidation

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Fix event tests with incomplete DS

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Add H2 migration script

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Fix action count method

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Fix REST documentation tests

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Change flyway version number

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Add lock for DS invalidation + adapt tests

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Move concurrency test to own class

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Handle possible InterruptedException

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Fix concurrency test

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Use one transaction for all invalidations

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Add invalidate endpoint to REST docu

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Execute invalidation in transaction when actions are cancelled

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Check that distribution set is valid when editing/creating metadata

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Remove all changes in UI

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Add DB migration files for all databases

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Implement review findings

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Move DS invalidation to own class to check permissions for single steps

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Move invalidation count methods to management classes

    Signed-off-by: Sebastian Firsching <[email protected]>

    * Fix failing tests

    Signed-off-by: Sebastian Firsching <[email protected]>

 .../eclipse/hawkbit/exception/SpServerError.java   |  28 +-
 .../hawkbit/repository/DeploymentManagement.java   | 123 ++++++---
 .../DistributionSetInvalidationManagement.java     |  49 ++++
 .../repository/DistributionSetManagement.java      | 139 +++++++---
 .../hawkbit/repository/RepositoryProperties.java   |  14 +
 .../hawkbit/repository/RolloutManagement.java      |  63 +++--
 .../repository/TargetFilterQueryManagement.java    |  76 ++++--
 .../event/remote/RolloutStoppedEvent.java          |  69 +++++
 .../InvalidAutoAssignDistributionSetException.java |  30 --
 .../exception/InvalidDistributionSetException.java |  44 +++
 .../repository/exception/StopRolloutException.java |  51 ++++
 .../hawkbit/repository/model/DistributionSet.java  |   8 +-
 .../repository/model/DistributionSetFilter.java    |  12 +
 .../model/DistributionSetInvalidation.java         |  71 +++++
 .../model/DistributionSetInvalidationCount.java    |  41 +++
 .../eclipse/hawkbit/repository/model/Rollout.java  |  11 +-
 .../java/org/eclipse/hawkbit/event/EventType.java  |  10 +-
 .../hawkbit/repository/RolloutStatusCache.java     |  31 ++-
 .../hawkbit/repository/jpa/ActionRepository.java   |  62 ++++-
 .../repository/jpa/JpaDeploymentManagement.java    |  59 ++--
 .../JpaDistributionSetInvalidationManagement.java  | 165 +++++++++++
 .../jpa/JpaDistributionSetManagement.java          |  67 ++++-
 .../hawkbit/repository/jpa/JpaRolloutExecutor.java |  37 +++
 .../repository/jpa/JpaRolloutManagement.java       |  43 ++-
 .../jpa/JpaTargetFilterQueryManagement.java        |  41 +--
 .../jpa/RepositoryApplicationConfiguration.java    |  83 +++---
 .../repository/jpa/RolloutGroupRepository.java     |  36 ++-
 .../hawkbit/repository/jpa/RolloutRepository.java  |  29 +-
 .../jpa/TargetFilterQueryRepository.java           |  12 +-
 .../repository/jpa/builder/JpaRolloutCreate.java   |   9 +-
 .../jpa/builder/JpaTargetFilterQueryCreate.java    |   9 +-
 .../repository/jpa/model/JpaDistributionSet.java   |  13 +
 .../hawkbit/repository/jpa/model/JpaRollout.java   |   3 +-
 .../DistributionSetSpecification.java              |  26 +-
 .../DB2/V1_12_19__add_valid_flag_to_ds___DB2.sql   |   3 +
 .../H2/V1_12_19__add_valid_flag_to_ds___H2.sql     |   3 +
 .../V1_12_19__add_valid_flag_to_ds___MYSQL.sql     |   3 +
 ...V1_12_19__add_valid_flag_to_ds___POSTGRESQL.sql |   3 +
 ...V1_12_19__add_valid_flag_to_ds___SQL_SERVER.sql |   3 +
 .../event/remote/entity/RolloutEventTest.java      |  10 +-
 .../event/remote/entity/RolloutGroupEventTest.java |  10 +-
 .../ConcurrentDistributionSetInvalidationTest.java |  79 ++++++
 .../repository/jpa/DeploymentManagementTest.java   |  43 ++-
 .../DistributionSetInvalidationManagementTest.java | 304 +++++++++++++++++++++
 .../jpa/DistributionSetManagementTest.java         | 118 +++++++-
 .../repository/jpa/RolloutManagementTest.java      |  71 ++++-
 .../jpa/TargetFilterQueryManagementTest.java       |  67 ++++-
 .../jpa/autoassign/AutoAssignCheckerTest.java      |  22 +-
 .../test/util/AbstractIntegrationTest.java         |   4 +
 .../repository/test/util/TestdataFactory.java      | 221 ++++++++-------
 .../model/distributionset/MgmtCancelationType.java |  44 +++
 .../model/distributionset/MgmtDistributionSet.java |  11 +
 .../MgmtInvalidateDistributionSetRequestBody.java  |  43 +++
 .../mgmt/rest/api/MgmtDistributionSetRestApi.java  |  18 ++
 .../rest/resource/MgmtDistributionSetMapper.java   |   1 +
 .../rest/resource/MgmtDistributionSetResource.java |  35 ++-
 .../mgmt/rest/resource/MgmtRestModelMapper.java    |  36 ++-
 .../mgmt/rest/resource/MgmtRolloutResource.java    |   9 +-
 .../resource/MgmtDistributionSetResourceTest.java  |  37 +++
 .../MgmtTargetFilterQueryResourceTest.java         |  26 +-
 .../rest/exception/ResponseExceptionHandler.java   |   4 +-
 .../main/asciidoc/distributionsets-api-guide.adoc  |  48 ++++
 .../AbstractApiRestDocumentation.java              |  27 +-
 .../rest/documentation/MgmtApiModelProperties.java |   4 +
 .../DistributionSetsDocumentationTest.java         |  34 ++-
 .../hawkbit/im/authentication/SpPermission.java    |  17 +-
 66 files changed, 2412 insertions(+), 510 deletions(-)
 create mode 100644 hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DistributionSetInvalidationManagement.java
 create mode 100644 hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutStoppedEvent.java
 delete mode 100644 hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/exception/InvalidAutoAssignDistributionSetException.java
 create mode 100644 hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/exception/InvalidDistributionSetException.java
 create mode 100644 hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/exception/StopRolloutException.java
 create mode 100644 hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/model/DistributionSetInvalidation.java
 create mode 100644 hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/model/DistributionSetInvalidationCount.java
 create mode 100644 hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDistributionSetInvalidationManagement.java
 create mode 100644 hawkbit-repository/hawkbit-repository-jpa/src/main/resources/db/migration/DB2/V1_12_19__add_valid_flag_to_ds___DB2.sql
 create mode 100644 hawkbit-repository/hawkbit-repository-jpa/src/main/resources/db/migration/H2/V1_12_19__add_valid_flag_to_ds___H2.sql
 create mode 100644 hawkbit-repository/hawkbit-repository-jpa/src/main/resources/db/migration/MYSQL/V1_12_19__add_valid_flag_to_ds___MYSQL.sql
 create mode 100644 hawkbit-repository/hawkbit-repository-jpa/src/main/resources/db/migration/POSTGRESQL/V1_12_19__add_valid_flag_to_ds___POSTGRESQL.sql
 create mode 100644 hawkbit-repository/hawkbit-repository-jpa/src/main/resources/db/migration/SQL_SERVER/V1_12_19__add_valid_flag_to_ds___SQL_SERVER.sql
 create mode 100644 hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/ConcurrentDistributionSetInvalidationTest.java
 create mode 100644 hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/DistributionSetInvalidationManagementTest.java
 create mode 100644 hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtCancelationType.java
 create mode 100644 hawkbit-rest/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/json/model/distributionset/MgmtInvalidateDistributionSetRequestBody.java
bisect run success

zyga avatar Aug 16 '22 13:08 zyga

This works with java 8

zyga avatar Aug 18 '22 21:08 zyga