Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify getting started for newcomers #160

Merged
merged 35 commits into from
Apr 24, 2024
Merged

Conversation

gabor-boros
Copy link
Contributor

@gabor-boros gabor-boros commented Apr 20, 2024

Description

This PR simplifies the process to get started with the development, removes unnecessary steps, reduces the effort to set up the repository, and fixes smaller config-related bugs. In addition, the CI steps were refactored to include benchmarks, front-end tests, and additional linters.

Supporting information

Link to other information about the change, such as, GitHub issues or documentation.

Dependencies

N/A

Screenshots

N/A

Testing instructions

  1. proofread the updated documentation
  2. clone the repository (we need a fresh setup)
  3. checkout the related branch
  4. run ./scripts/setup.sh
  5. run pnpm --prefix web dlx playwright install --with-deps
  6. run make test

Other information

The original mailhog image is not compatible with arm64 architectures, hence it was replaced with a "fork".

Checklist

Documentation

  • Documentation comments are updated
  • Documentation site is updated

Review

Miscellaneous

  • Pull request is rebased onto main
  • Commit history is clean

@gabor-boros gabor-boros requested a review from a team as a code owner April 20, 2024 19:22
@gabor-boros gabor-boros force-pushed the gabor/docker-compose-fix branch from ece72f4 to 97813fd Compare April 20, 2024 19:25
@gabor-boros gabor-boros marked this pull request as draft April 20, 2024 19:35
@gabor-boros gabor-boros force-pushed the gabor/docker-compose-fix branch 2 times, most recently from 94df5fa to efa34e7 Compare April 22, 2024 08:37
Signed-off-by: Gabor Boros <[email protected]>
Signed-off-by: Gabor Boros <[email protected]>
Signed-off-by: Gabor Boros <[email protected]>
Signed-off-by: Gabor Boros <[email protected]>
@gabor-boros gabor-boros force-pushed the gabor/docker-compose-fix branch from 072bd47 to fec6911 Compare April 22, 2024 18:37
@gabor-boros gabor-boros force-pushed the gabor/docker-compose-fix branch from 64c2e7b to ec72bd4 Compare April 23, 2024 04:46
@boring-cyborg boring-cyborg bot added the build label Apr 23, 2024
@gabor-boros gabor-boros marked this pull request as ready for review April 23, 2024 04:47
@gabor-boros gabor-boros self-assigned this Apr 23, 2024
@gabor-boros gabor-boros added this to the v0.1.0 - MVP milestone Apr 23, 2024
@gabor-boros gabor-boros added documentation Improvements or additions to documentation enhancement New feature or request github actions Pull requests that update GitHub Actions code labels Apr 23, 2024
@gabor-boros gabor-boros changed the title fix: use docker compose instead of docker-compose Simplify getting started for newcomers Apr 23, 2024
Copy link

@nizarmah nizarmah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! I'm still running into the same issue unfortunately.

The docker compose env name and the bug report scripts are a nice addition.

Here's the two issues that stood out while reviewing.
They're directly related to this pull request.

Setup script fails to initialize relational database

Logs

> ./scripts/setup.sh
2024/04/23 21:29:57 License generated: /Users/elmo/elemo/configs/development/license.gen.key
[+] Running 6/6
 ✔ neo4j 5 layers [⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                       63.5s 
   ✔ ebc3dc5a2d72 Pull complete                                                                                                        13.7s 
   ✔ 9701f65253cb Pull complete                                                                                                        57.0s 
   ✔ 35efb11ab5fe Pull complete                                                                                                         1.4s 
   ✔ 701ed5e8b2fb Pull complete                                                                                                         2.7s 
   ✔ 56ca08505b7f Pull complete                                                                                                        45.3s 
[+] Running 5/5
 ✔ Network elemo-network      Created                                                                                                   0.0s 
 ✔ Volume "elemo_neo4j_data"  Created                                                                                                   0.0s 
 ✔ Volume "elemo_pg_data"     Created                                                                                                   0.0s 
 ✔ Container elemo-postgres   Started                                                                                                   1.1s 
 ✔ Container elemo-neo4j      Started                                                                                                   1.1s 
waiting 5 seconds to let the services boot
{"level":"info","ts":1713893471.1946611,"logger":"root","caller":"cli/root.go:147","msg":"config file loaded","path":"/Users/elmo/elemo/configs/development/config.local.gen.yml"}
{"level":"fatal","ts":1713893497.129895,"logger":"root","caller":"cli/auth_add_client.go:55","msg":"failed to initialize relational database","error":"failed to connect to `host=127.0.0.1 user=elemo database=elemo`: dial error (timeout: dial tcp 127.0.0.1:5432: connect: operation timed out)","stacktrace":"github.com/opcotech/elemo/cmd/elemo/cli.init.func1\n\t/Users/elmo/elemo/cmd/elemo/cli/auth_add_client.go:55\ngithub.com/spf13/cobra.(*Command).execute\n\t/Users/elmo/go/pkg/mod/github.com/spf13/[email protected]/command.go:987\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/Users/elmo/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115\ngithub.com/spf13/cobra.(*Command).Execute\n\t/Users/elmo/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039\ngithub.com/opcotech/elemo/cmd/elemo/cli.Execute\n\t/Users/elmo/elemo/cmd/elemo/cli/root.go:87\nmain.main\n\t/Users/elmo/elemo/cmd/elemo/main.go:18\nruntime.main\n\t/Users/elmo/go/pkg/mod/golang.org/[email protected]/src/runtime/proc.go:271"}
exit status 1

> git fetch origin && git status
On branch gabor/docker-compose-fix
Your branch is up to date with 'origin/gabor/docker-compose-fix'.

nothing to commit, working tree clean

Bug report script fails hangs on Elmo version

The script outputs the following...

OS information

Darwin makine-2.local 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103 arm64

Local Go version

go version go1.22.2 darwin/arm64

Then, it hangs here.

After a couple of seconds, it shows the following.

Elemo version

#13

Then it directly exits with a status code of 0.

@nizarmah
Copy link

I just ran into a new error thanks to the latest commit you just pushed 🥳

./scripts/setup.sh: line 29: type: pnpm: not found

pnpm should be added to the list of development requirements

@nizarmah
Copy link

nizarmah commented Apr 23, 2024

One brew install pnpm later...

DONE! Now, you can start the backend and front-end services.

Then make dev

image

🥳

Copy link

@nizarmah nizarmah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌🏼 awesome. Thanks for fixing this!

Just the note about adding "pnpm" to the list of development requirements.

@gabor-boros
Copy link
Contributor Author

@nizarmah 🎉 🥳

Thanks for the continuous help with checking it! The issue is with ! type "pnpm" && npm install -g pnpm;. The goal here was to install pnpm if not exists, however, it is obviously messed up.

@nizarmah
Copy link

Oh! Thanks for clarifying :D

Also, I'm glad I could help!!

@gabor-boros gabor-boros force-pushed the gabor/docker-compose-fix branch from 20114f1 to 92cdf75 Compare April 24, 2024 04:08
@gabor-boros gabor-boros merged commit f9b716b into main Apr 24, 2024
15 checks passed
@gabor-boros gabor-boros deleted the gabor/docker-compose-fix branch April 24, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build configs deployments documentation Improvements or additions to documentation enhancement New feature or request front-end github actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to initialize the relational database Add front-end e2e tests to the build system
2 participants