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

just frontend/init fails with cryptic error if plausible service isn't ready for requests #2489

Closed
sarayourfriend opened this issue Jun 27, 2023 · 8 comments · Fixed by #3153
Assignees
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: mgmt Related to repo management and automations 💲 tech: bash Involves Bash 🔧 tech: just Involves Just.js

Comments

@sarayourfriend
Copy link
Collaborator

Description

$ just frontend/up
...
$ just frontend/init
env COMPOSE_PROFILES="frontend" just ../up 
env COMPOSE_PROFILES="frontend" docker-compose -f docker-compose.yml up -d
[+] Running 3/0
 ✔ Container openverse-plausible_db-1  Running                                                      0.0s 
 ✔ Container openverse-plausible_ch-1  Running                                                      0.0s 
 ✔ Container openverse-plausible-1     Running                                                      0.0s 

================================================================================
                                 Service Ports                                  
================================================================================
plausible (plausible/analytics):
-  http://0.0.0.0:50288 (→ 8000)
================================================================================
echo "🚧 TODO"
🚧 TODO
cd .. && ./setup_plausible.sh
--rpc-eval : RPC failed with reason :nodedown
error: Recipe `init` failed on line 66 with exit code 1

Reproduction

  1. `just down`
  2. `just frontend/up` and right after `just frontend/init`
  3. See the error above.

Fix

Add a "wait for" recipe that waits for Plausible to be available before running setup_plausible.sh similar to the docker/es/wait-for-index recipe.

@sarayourfriend sarayourfriend added help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🛠 goal: fix Bug fix 🤖 aspect: dx Concerns developers' experience with the codebase 💲 tech: bash Involves Bash 🧱 stack: mgmt Related to repo management and automations 🔧 tech: just Involves Just.js labels Jun 27, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Jun 27, 2023
@dhruvkb dhruvkb added the good first issue New-contributor friendly label Jun 27, 2023
@YashGaur000
Copy link
Contributor

YashGaur000 commented Jul 18, 2023

how to run it on my machine to check for error? I opened localhost: 50288 by ctrl + click. now how to run it like whats the command to run it?

@sarayourfriend
Copy link
Collaborator Author

@YashGaur000 I'm not sure what you're asking exactly. The steps to reproduce the issue are in the description. You do not need to click any links to reproduce the problem. Can you clarify your understanding of the issue and what you are trying to do?

@YashGaur000
Copy link
Contributor

YashGaur000 commented Jul 18, 2023

where to write 'just down'? in terminal of VS? or in git bash? i don't know how to run it and how to reproduce it. Do I need to setup my machine for it to run?
just down error

if there's anything silly mistake/ wrong setup or anything worst silly mistake I'm doing then please tell me. I wanna know it so that I wont repeat those again.
load sample data error

I guess I have to make changes the marked area. Am I right?

Please give some brief steps please

@sarayourfriend
Copy link
Collaborator Author

Please follow the general setup guide for working with Openverse locally: https://docs.openverse.org/general/general_setup.html

Note that Openverse does not support development directly on Windows. The linked guide recommends using WSL. Additionally, the changes required for this issue are more complex than what you are describing. As the issue describes:

Add a "wait for" recipe that waits for Plausible to be available before running setup_plausible.sh similar to the docker/es/wait-for-index recipe.

This will require a new just recipe to wait for plausible (added to a new docker/plausible/justfile or to the frontend/justfile). The new recipe must be called before setup_plausible.sh is called by the frontend justfile's init recipe to ensure Plausible is running.

@YashGaur000
Copy link
Contributor

can you assign me this issue?

@sarayourfriend
Copy link
Collaborator Author

Sure thing, you're assigned. Please ping @WordPress/openverse-maintainers if you need assistance working on the issue as I'll be on holiday for the next two weeks.

@ngken0995
Copy link
Collaborator

@sarayourfriend, Can I be assigned to this?

@AetherUnbound
Copy link
Collaborator

@ngken0995 I've assigned the PR to you - please do check out the previous PR related to this for some information on how to approach it: #2705

@YashGaur000 if you're still interested in working on this let us know! We're also happy to help you find something else to work on within the project 🙂

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Openverse Backlog Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: mgmt Related to repo management and automations 💲 tech: bash Involves Bash 🔧 tech: just Involves Just.js
Projects
Archived in project
5 participants