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

Support for ES < 9.10 is dropped from Grafana 9.0.2 #263

Closed
markri opened this issue Jul 20, 2022 · 5 comments · Fixed by #274
Closed

Support for ES < 9.10 is dropped from Grafana 9.0.2 #263

markri opened this issue Jul 20, 2022 · 5 comments · Fixed by #274

Comments

@markri
Copy link

markri commented Jul 20, 2022

In Grafana 9.0.3, the support for Elasticsearch < 9.10 is dropped. Meaning that we can't create an ES datasource anymore as the dictionary prohibits the use of anything like that (on module 1.5.0)

es_version=dict(type='int', default=710, choices=[2, 5, 56, 60, 70]),

In Grafana 9.0.3 you have now 2 options, 7.10+ and 8.0+. Via API provisioning (I know because of exporting the datasource from grafana) you need to enter "7.10.0" to get it to 7.10+, but this is not an integer. So some typecasting needs to be done until a string "7.10.0" is put into esVersion on the actual call.

@markri
Copy link
Author

markri commented Jul 20, 2022

I just noticed that only 9.0.2 is supported for now. So I'll downgrade it to that version.

  • update *
    This issue also occurs on 9.0.2, which would make this somewhat more relevant I suppose as it should be supported ATM

@markri markri changed the title Support for ES < 9.10 is dropped from Grafana 9.0.3 Support for ES < 9.10 is dropped from Grafana 9.0.2 Aug 3, 2022
rrey added a commit that referenced this issue Aug 22, 2022
In latest versions of Grafana, the elastic version is no more provided
as an integer even if it is still supported and won't return any error.
To ease configuration, the module will accept the version format as
displayed by the WUI (ex: "7.10+") ad will map the value to what the API
expects ("7.10.0").

The module will keep on supporting the old format to avoid a breaking
change with significant impact.

Fixes: #263
rrey added a commit that referenced this issue Aug 22, 2022
In latest versions of Grafana, the elastic version is no more provided
as an integer even if it is still supported and won't return any error.
To ease configuration, the module will accept the version format as
displayed by the WUI (ex: "7.10+") and will map the value to what the API
expects ("7.10.0").
The added values are the one supported by Grafana 8 and 9 (greater than
elastic 7.0 which was already supported).

The module will keep on supporting the old format to avoid a breaking
change with significant impact.

Fixes: #263
@rrey
Copy link
Collaborator

rrey commented Aug 22, 2022

@markri I have a hotfix in review, I added an integration test that attempts to create a datasource with "7.10+" elastic version. The API and the WUI looks to reflect something that worked, but I would be happy if you could test with your real use case.

The Grafana Api has the tendancy to accepts things that are not really working and I don't have a real elastic instance running in my integration tests :/

Edit: You should be able to test the patch by referencing the collection by a Git Url and the hotfix-263 branch as version.

@markri
Copy link
Author

markri commented Aug 31, 2022

Hi @rrey I just confirmed that everything is working now. Thanks!

I tested following contexts:

  • es_version: "7.10+"
  • Setting existing ES to 8.0 and have Ansible set it to 7.10+
  • Creating a new ES datasource with 7.10+
  • Tested for idem potency

So ready to merge I guess?

@rrey
Copy link
Collaborator

rrey commented Sep 1, 2022

Thanks for testing this @markri !
The datasource is working properly after creation ? You can properly get data from it through explorer/panel/Dashboard ?

@markri
Copy link
Author

markri commented Sep 1, 2022

Yup, save & test button yields green message, and dashboard stats are working fine

@rrey rrey closed this as completed in #274 Oct 6, 2022
rrey added a commit that referenced this issue Oct 6, 2022
In latest versions of Grafana, the elastic version is no more provided
as an integer even if it is still supported and won't return any error.
To ease configuration, the module will accept the version format as
displayed by the WUI (ex: "7.10+") and will map the value to what the API
expects ("7.10.0").
The added values are the one supported by Grafana 8 and 9 (greater than
elastic 7.0 which was already supported).

The module will keep on supporting the old format to avoid a breaking
change with significant impact.

Fixes: #263
CWollinger pushed a commit to CWollinger/grafana that referenced this issue Nov 14, 2022
In latest versions of Grafana, the elastic version is no more provided
as an integer even if it is still supported and won't return any error.
To ease configuration, the module will accept the version format as
displayed by the WUI (ex: "7.10+") and will map the value to what the API
expects ("7.10.0").
The added values are the one supported by Grafana 8 and 9 (greater than
elastic 7.0 which was already supported).

The module will keep on supporting the old format to avoid a breaking
change with significant impact.

Fixes: ansible-collections#263
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants