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

Update grafana_silence.py #400

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

prahastakumar
Copy link

SUMMARY

I am using Grafana Cloud and version is 11.3.0-75221. The get version function is not able to fetch major, minor, rev due to error " ValueError: invalid literal for int() with base 10"

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

grafana_silence

I am using Grafana Cloud and version is 11.3.0-75221. The function is not able to fetch major.minor.rev due to error " ValueError: invalid literal for int() with base 10"
@rndmh3ro
Copy link
Collaborator

This breaks for grafana oss-versions, where there is no build-number. This needs to be fixed.

We also use this function in multiple modules, not only the silence-module, e.g. here. https://github.com/ansible-collections/community.grafana/blob/main/plugins/modules/grafana_notification_channel.py#L646

So this needs to be fixed everywhere.

We should also move this function to the module-utils, but if you don't feel comfortable doing this, there is no need.

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 this pull request may close these issues.

2 participants