algolia / docsearch-scraper

DocSearch - Scraper

Home Page:https://docsearch.algolia.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow the nb_hits updater prompt to be bypassed

mojavelinux opened this issue · comments

When the docsearch run command finishes, and the number of hits has changed, it prompts the user to update the nb_hits field in the configuration file. When used in a CI/CD environment, this causes the job to hang waiting on user input.

Provide a way to either disable or bypass this prompt so that the docsearch run command can be used in an automated environment such as CI. A simple way to control this behavior would be to use an environment variable. It's also possible to check for a non-interactive environment and skip (or automatically apply) the update.

👋
Same as #426. To be honest, this is not a need on our end. Except if you finish the PR #429, we will not put much effort on solving this. Happy to merge this PR though.

I'll wrap up as requested asap.

I must say though, this is a pretty critical change. Otherwise, the scraper is worthless in CI because it hangs the job. Unless you have no plans for anyone to actually use it...which I don't think is the case ;)

Note that the docker image does not include this updater. You will not face this step using the docker image

Note that the docker image does not include this updater.

I can confirm this is true.

However, it seems very strange to me that you are modifying the code base used in the Docker image. That's a very atypical situation. The Docker image should align with the releases of the software (aka tags).

I've updated the PR and submitted documentation, as requested.

Great thank you.

We will need to test it and merge it asap

Thanks @s-pace! If there's anything else you need from me, don't hesitate to ask.