Skip to content

[Error] Build and Docker Compose Issues with Backend System Setup #10

@ImAnAmAnI-iMaNaMaNi

Description

@ImAnAmAnI-iMaNaMaNi

Hi there,

I encountered some problems in the final stage while following the installation instructions for the backend system:

  1. Detekt Task Missing
    When running ./gradlew build -x detekt as instructed in the documentation:
Task 'detekt' not found in root project 'health-research-backend' and its subprojects.
Some candidates are: 'test'.
  1. Code Style Violations
    To resolve the previous issue, running ./gradlew build (without -x detekt) results in the following error:
xecution failed for task ':platform:ktlintTestSourceSetCheck'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.ConsoleReportWorkAction
> KtLint found code-style violations.
Report: backend-system/platform/build/reports/ktlint/ktlintTestSourceSetCheck/ktlintTestSourceSetCheck.txt

I resolved this by removing an unused import from one of the Kotlin files.
3. Redis Integration Test Failures
After fixing the code style issues, running ./gradlew build produces test failures:

> Task :platform:test
LettuceRedisWatcherTest > update should work properly() FAILED
    java.lang.RuntimeException at LettuceRedisWatcherTest.kt:24
LettuceRedisWatcherTest > update should throw RedisConnectionException when it failed to connect to redis server cause of password() FAILED
    java.lang.RuntimeException at LettuceRedisWatcherTest.kt:24
[... 4 more similar Redis test failures ...]
LettuceSubThreadTest > redis listener should work properly() FAILED
    java.lang.RuntimeException at LettuceSubThreadTest.kt:28

886 tests completed, 6 failed, 7 skipped

These tests fail despite having Redis running locally:

bash$ brew services start redis
==> Successfully started `redis` (label: homebrew.mxcl.redis)
$ redis-cli ping
PONG
  1. Successful Build with Tests Disabled
    The project builds successfully when running ./gradlew build -x test.
  2. Docker Compose Missing Services
    When trying to run docker-compose up -d (since I'm using "Method 1: Using Docker Compose"), several services appear to be missing from the repository:
WARN[0000] /docker-compose.yml: the attribute `version` is obsolete and will be ignored; please remove it to avoid confusion
[+] Running 7/7
  ! cloud-storage-service            pull access denied for cloud-storage-service (repository does not exist or requires 'docker login')
  ✔ postgres                         Pulled
  ! data-query-service               pull access denied for hrp-data-query-service (repository does not exist or requires 'docker login')
  ✔ haproxy                          Pulled
  ! platform                         pull access denied for hrp-platform (repository does not exist or requires 'docker login')
  ! account-service                  pull access denied for account-service (repository does not exist or requires 'docker login')
  ! trino-rule-update-service        pull access denied for trino-rule-update-service (repository does not exist or requires 'docker login')
unable to prepare context: path ".../backend-system/account-service" not found

The current repository only contains the platform service, but the Docker Compose configuration expects multiple services (account-service, data-query-service, cloud-storage-service, trino-rule-update-service) that don't exist in the main branch.

I have followed the documentation and tested it on two Mac computers, but I still encounter the same problems. Additionally, I'm working with the latest commit from the main branch. Thanks in advance for your help in resolving these issues!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions