Closed tehmaestro closed 2 years ago
I think you can create env variables for specific jobs!
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idenv
I have no idea how to fix this, though.
This is quite unfortunate since fix for ES 8+ is quite badly needed.
Are there some tests failing without "indices.id_field_data.enabled": "true"
in test job?
As far as I undertand it's an option quite rarely used (sorting by _id
) and I only found for kibana (cloud) usage.
Also see setting env variable.
I've spent two hours trying to get the tests to run and failed, and we clearly need somebody who's better at github actions.
So for full compatibility with ES 8 the extension needs to have indices.id_field_data.enabled
env variable set to true
, otherwise sorting by _id
does not work. All other versions do not care about that env var, except ES 6.8.9 which fails to start. (I've tested with ES 6.8.21, it does not work either.)
The link above (setting the env variable) does not help. We need to conditionally set the variable in the service, not in the job.
I see no way to set up the ES 6.8 service differently from other ES services if we're using a matrix. This can be solved by just duplicating a bunch of lines from build.yml, but that's clearly not a good solution.
Stupid github :(
What tests are failing without indices.id_field_data.enabled : true
?
Solved in #323.
The tests on 6.8.9 fail, because elasticsearch does not recognize
indices.id_field_data.enabled
setting, which is needed because on 8.x you can no longer use_id
to sort, unless you activate this setting. I'm open to suggestions :)Also, I changed the commit from https://github.com/yiisoft/yii2-elasticsearch/pull/320 to check for
dslVersion >= 7
, as on version7
the calls were deprecated anyway.