algolia / gatsby-plugin-algolia

A plugin to push to Algolia based on graphQl queries
https://yarn.pm/gatsby-plugin-algolia
Apache License 2.0
177 stars 45 forks source link

Builds still fails when using `continueOnFailure: true` #141

Closed haysclark closed 3 years ago

haysclark commented 3 years ago

I'm using Environment Variables to set my appId, apiKey and indexName. If the Environment Variable is not set, the plug-in throws an error and the build fails. There is no change is I add continueOnFailure: true

Expected: When continueOnFailure: true is enabled build should never fail.

Haroenv commented 3 years ago

just checking, why don't you not run the plugin in the case it's not meant to execute? Could you explain your setup?

It's true that continueOnError only will continue with any errors inside the process, not on the check of environment variables. That can be replaced with a log instead of an error maybe in continueOnError, but still stop there, since if there's no indices, there's essentially nothing to do

janpio commented 3 years ago

Not OP, but for us the situation is that we have a simple Gastby project with the plugin included, and by default (and in many cases like during local development) we do not actually want to update the index at all. Not setting the env vars would be an obvious and simple choice to indicate that.

Haroenv commented 3 years ago

published continueOnError stopping for appId or apiKey missing in 0.22.0