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

Add test to check mini-dashboard is up #1767

Closed
curquiza opened this issue Oct 4, 2021 · 20 comments · Fixed by #1852
Closed

Add test to check mini-dashboard is up #1767

curquiza opened this issue Oct 4, 2021 · 20 comments · Fixed by #1852
Labels
good first issue Good for newcomers maintenance Issue about maintenance (CI, tests, refacto...)

Comments

@curquiza
Copy link
Member

curquiza commented Oct 4, 2021

MeiliSearch integrates an interface so that the users can search in a friendly user interface we call the Mini Dashboard.

When launching MeiliSearch locally, the mini dashboard is accessible at http://localhost:7700

We need to add a test that checks the mini-dashabord is up when compiling and running MeiliSearch.

@MarinPostma will add some mentoring steps to guide you through this issue :)

@MarinPostma
Copy link
Contributor

MarinPostma commented Oct 4, 2021

So, I think a relatively easy way to test that the mini-dashboard loads correctly is to check that all the assets are served correctly.

To do so, we can take some inspiration from the method that creates the routes for the assets. We use the route path, and send a GET request to that path on the test server to see if we get a 200 response. Be careful to the index.html redirection to /.

@vaibhav135
Copy link

hii, @curquiza and @MarinPostma can I work on this issue

@MarinPostma
Copy link
Contributor

@vaibhav135, sure, I'm assigning you. Don't hesitate if you need more guidance.

@vaibhav135
Copy link

@MarinPostma Thanks, I'll let you know about my progress and will ask for the further guidance that I may need.

@vaibhav135
Copy link

Hi, @MarinPostma, I've compiled the project from source locally. I've already ran it on localhost:7700. But the problem is I can't search for anything as it is not showing any result. I suppose since I am in development mode I don't necessarily need the master key or any key as a matter of fact.
The picture below shows my problem. Is it really a problem or is it suppose to happen currently I am reading docs. Maybe I am missing something.

image

Thank you

@MarinPostma
Copy link
Contributor

Hey @vaibhav135 , have you added any documents to your db?

@vaibhav135
Copy link

@MarinPostma there is already a sample document in datasets/movies/movies.json but how do I add it to the DB. Do I create a node.js file then use MongoDB or something like that. I am a little bit confused

@vaibhav135
Copy link

vaibhav135 commented Oct 5, 2021

@MarinPostma Do i need to execute a curl request

curl \
  -X POST 'http://localhost:7700/indexes/movies/documents' \
  --data '[{
      "id": 287947,
      "title": "Shazam",
      "poster": "https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg",
      "overview": "A boy is given the ability to become an adult superhero in times of need with a single magic word.",
      "release_date": "2019-03-23"
  }]' 

something like the above example then replace the data value with the dataset path or something like that

@MarinPostma
Copy link
Contributor

Yes you can pass --data @datasets/movies.json

@vaibhav135
Copy link

@MarinPostma thanks finally, added documents to the DB that worked.

@curquiza
Copy link
Member Author

curquiza commented Oct 5, 2021

Hello @vaibhav135 and @MarinPostma, the movie.json dataset is going to be removed, see the draft PR: #1693
This PR waits for the docs approval before being merged, but it will.

You can pass the document you planned to pass at first @vaibhav135 :)

And thank you for your PR!

@curquiza curquiza added the maintenance Issue about maintenance (CI, tests, refacto...) label Oct 7, 2021
@vaibhav135
Copy link

@MarinPostma and @curquiza :-
Update: Sorry It took me a long time to update. But the thing is when I saw this project I immediately liked it and wanted to contribute but I didn't know that the project was written in rust at that time. So yes now I am learning rust. So yeah, it will take me few more days.
Just wanted to give you an update.
Thanks

P.S. Rust is weird more like c/c++ added with go.

@igaul
Copy link
Contributor

igaul commented Oct 8, 2021

Hi @vaibhav135, it sounds like you might be over thinking this :)
You want to just check that MS successfully serves the mini-dashboard, not actually test its searching abilities (that would belong in the mini-dashboard repo), so it shouldn't be crazy lifetime rust. Feel free to post your branch if you want help, I think most people end up liking rust.

@MarinPostma
Copy link
Contributor

Yes, just open a draft pr and I'll take a look at it 😉

@curquiza
Copy link
Member Author

curquiza commented Oct 14, 2021

Hello @vaibhav135, I will remove the assignation since we did not get any PR from you, we can understand this is not an easy PR and you may not have the time to do it 🙂

In general, and from now, we prefer not assigning people to our issues because sometimes people ask to be assigned and never come back, which discourages the other volunteers contributors to open a PR to fix this issue.
We will accept and merge the first PR that fixes correctly and well implements the issue following our contributing guidelines.

Thanks again for your involvement and feel free to still open a PR if you have the time 🙂

@CNLHC
Copy link
Contributor

CNLHC commented Oct 15, 2021

Hello @vaibhav135, I will remove the assignation since we did not get any PR from you, we can understand this is not an easy PR and you may not have the time to do it 🙂

In general, and from now, we prefer not assigning people to our issues because sometimes people ask to be assigned and never come back, which discourages the other volunteers' contributors to open a PR to fix this issue. We will accept and merge the first PR that fixes correctly and well implements the issue following our contributing guidelines.

Thanks again for your involvement and feel free to still open a PR if you have the time 🙂

Will this policy apply to those issues that already have an assignee before you claim this new policy?

@vaibhav135
Copy link

vaibhav135 commented Oct 16, 2021

Hello @vaibhav135, I will remove the assignation since we did not get any PR from you, we can understand this is not an easy PR and you may not have the time to do it slightly_smiling_face

In general, and from now, we prefer not assigning people to our issues because sometimes people ask to be assigned and never come back, which discourages the other volunteers contributors to open a PR to fix this issue. We will accept and merge the first PR that fixes correctly and well implements the issue following our contributing guidelines.

Thanks again for your involvement and feel free to still open a PR if you have the time slightly_smiling_face

Hi, @curquiza actually I am still looking at it. Actually, I am also learning rust so it's taking me quite some time. Sorry for not participating actively. By the way, I am also fairly new to open source so yeah. Sorry I was just overwhelmed looking at the source code. But starting to figure out things now.

@curquiza
Copy link
Member Author

Hello @CNLHC and @vaibhav135!

@CNLHC, actually here is our policy about Hacktoberfest, and about contribution in general, and we never mention the issue assignation: https://github.com/meilisearch/MeiliSearch/blob/main/CONTRIBUTING.md#hacktoberfest
But you're right the fact is, it's not really clear. We should note something about assignation!
We are trying to do our best with Hacktoberfest and the problems we encounter and we did not really plan. Sorry for the confusion anyway.

Sorry @vaibhav135 this made you rush! This was not the goal! We can understand you need time to learn rust, but if a PR is open to fix this issue, even if it's not yours, you are more than welcome to review it and give your feedback. This will make you learn as well :)

Thanks to both of you for your involvement anyway, and sorry for the confusion.

@vaibhav135
Copy link

@curquiza thanks, I think I took the problem without even knowing it properly. Next time I'll be better with my judgment I will continue to work on this project since I really like it. I have unassigned myself. Thank u I learned a lot next time I'll discuss the whole thing before asking to get assigned.
My apologies.

@curquiza
Copy link
Member Author

Thanks for understanding, and don't hesitate to ask all the questions you need :)
To be honest, MeiliSearch is a really complex project, it's not an easy one to start learning Rust, so don't be discouraged 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers maintenance Issue about maintenance (CI, tests, refacto...)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@curquiza @CNLHC @MarinPostma @vaibhav135 @igaul and others