From e4dca938589a24e31593659df86c4c0b9e592786 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:59:33 +0200 Subject: [PATCH 1/3] chore(deps): bump github.com/samber/lo from 1.44.0 to 1.45.0 (#70) Bumps [github.com/samber/lo](https://github.com/samber/lo) from 1.44.0 to 1.45.0. - [Release notes](https://github.com/samber/lo/releases) - [Changelog](https://github.com/samber/lo/blob/master/CHANGELOG.md) - [Commits](https://github.com/samber/lo/compare/v1.44.0...v1.45.0) --- updated-dependencies: - dependency-name: github.com/samber/lo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Rochow --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c56d79d8..853ea50b 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/onsi/gomega v1.33.1 github.com/onuryilmaz/ginprom v0.0.2 github.com/prometheus/client_golang v1.19.1 - github.com/samber/lo v1.44.0 + github.com/samber/lo v1.45.0 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 github.com/vektah/gqlparser/v2 v2.5.16 diff --git a/go.sum b/go.sum index 22edb16c..04a2869d 100644 --- a/go.sum +++ b/go.sum @@ -180,8 +180,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/samber/lo v1.44.0 h1:5il56KxRE+GHsm1IR+sZ/6J42NODigFiqCWpSc2dybA= -github.com/samber/lo v1.44.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= +github.com/samber/lo v1.45.0 h1:TPK85Y30Lv9Jh8s3TrJeA94u1hwcbFA9JObx/vT6lYU= +github.com/samber/lo v1.45.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= From 92594924dafdd782a74576459006a04a0af4be7f Mon Sep 17 00:00:00 2001 From: Michael Reimsbach Date: Tue, 16 Jul 2024 17:29:54 +0200 Subject: [PATCH 2/3] chore(doc): add setup section (#67) * chore(doc): add setup section * chore(doc): Update README.md --------- Co-authored-by: David Rochow --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index be7cc0ef..327ae797 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,60 @@ For a detailed understanding of the system's architecture and design, refer to t ## Requirements and Setup -*Insert a short description what is required to get your project running...* +The application can be configured using environment variables. These variables are stored in a `.env` file at the root of the project. +For configuring tests, there is a separate `.test.env` file. + +Here's a basic example of what the .env file could look like: + +``` +DB_USER=my_username +DB_PASSWORD=my_password +DB_ROOT_PASSWORD=my_password +DB_NAME=heureka +DB_ADDRESS=localhost +DB_PORT=3306 +DB_SCHEMA=internal/database/mariadb/init/schema.sql + +DB_CONTAINER_IMAGE=mariadb:latest + +DOCKER_IMAGE_REGISTRY=hub.docker.com + +DOCKER_CREDENTIAL_STORE=docker-credential-desktop + +LOG_PRETTY_PRINT=true + +LOCAL_TEST_DB=true + +SEED_MODE=false +``` + +### Docker + +The `docker-compose.yml` file defines two profiles: `db` for the `heureka-db` service and `heureka` for the `heureka-app` service. +To start a specific service with its profile, use the --profile option followed by the profile name. + +For example, to start the heureka-db service, run: +``` +docker-compose --profile db up +``` + +And to start the heureka-app service, run: +``` +docker-compose --profile heureka up +``` + +To start both services at the same time, run: +``` +docker-compose --profile db --profile heureka up +``` + +### Makefile + +Alternatively, the application can be started by using the provided Makefile: + +``` +make start-all-heureka +``` ## Support, Feedback, Contributing From 09243f1beea266b4c78d0ba0ec84aa3e4d164570 Mon Sep 17 00:00:00 2001 From: Michael Reimsbach Date: Tue, 16 Jul 2024 17:32:05 +0200 Subject: [PATCH 3/3] fix(tests): reduce number of relationships in fixtures (#73) --- internal/database/mariadb/test/fixture.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/database/mariadb/test/fixture.go b/internal/database/mariadb/test/fixture.go index cd0f7b29..f86df6cd 100644 --- a/internal/database/mariadb/test/fixture.go +++ b/internal/database/mariadb/test/fixture.go @@ -329,16 +329,16 @@ func (s *DatabaseSeeder) SeedDbWithNFakeData(n int) *SeedCollection { issueVariants := s.SeedIssueVariants(n, repos, issues) users := s.SeedUsers(n) owners := s.SeedOwners(n, services, users) - supportGroupServices := s.SeedSupportGroupServices(n, services, supportGroups) - supportGroupUsers := s.SeedSupportGroupUsers(n, users, supportGroups) + supportGroupServices := s.SeedSupportGroupServices(n/2, services, supportGroups) + supportGroupUsers := s.SeedSupportGroupUsers(n/2, users, supportGroups) activities := s.SeedActivities(n) - activityHasServices := s.SeedActivityHasServices(n, activities, services) - activityHasIssues := s.SeedActivityHasIssues(n, activities, issues) + activityHasServices := s.SeedActivityHasServices(n/2, activities, services) + activityHasIssues := s.SeedActivityHasIssues(n/2, activities, issues) evidences := s.SeedEvidences(n, activities, users) - componentVersionIssues := s.SeedComponentVersionIssues(n, componentVersions, issues) + componentVersionIssues := s.SeedComponentVersionIssues(n/2, componentVersions, issues) issueMatches := s.SeedIssueMatches(n, issues, componentInstances, users) - issueMatchEvidences := s.SeedIssueMatchEvidence(n, issueMatches, evidences) - issueRepositoryServices := s.SeedIssueRepositoryServices(n, services, repos) + issueMatchEvidences := s.SeedIssueMatchEvidence(n/2, issueMatches, evidences) + issueRepositoryServices := s.SeedIssueRepositoryServices(n/2, services, repos) issueMatchChanges := s.SeedIssueMatchChanges(n, issueMatches, activities) return &SeedCollection{