From 4c1a85b16fe2aa30a578e095cc447db31abd45c8 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:06:15 +0200 Subject: [PATCH 1/8] fix: check if grafana api key is defined --- plugins/lookup/grafana_dashboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/lookup/grafana_dashboard.py b/plugins/lookup/grafana_dashboard.py index 514d4fd5..39e068f1 100644 --- a/plugins/lookup/grafana_dashboard.py +++ b/plugins/lookup/grafana_dashboard.py @@ -152,7 +152,7 @@ def grafana_switch_organisation(self, headers): def grafana_headers(self): headers = {"content-type": "application/json; charset=utf8"} - if self.grafana_api_key.get("grafana_api_key", None): + if self.grafana_api_key: headers["Authorization"] = "Bearer %s" % self.grafana_api_key else: headers["Authorization"] = basic_auth_header( @@ -222,9 +222,9 @@ def run(self, terms, variables=None, **kwargs): grafana_dict[key] = value grafana = GrafanaAPI( - **grafana_dict, validate_certs=self.get_option("validate_certs"), ca_path=self.get_option("ca_path"), + **grafana_dict, ) ret = grafana.grafana_list_dashboards() From e878b5ac683a1d636df4e59162ab30f1d8abdce0 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:09:06 +0200 Subject: [PATCH 2/8] docs: changelog fragment --- changelogs/fragments/392-dashboard-lookup-apikey.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/fragments/392-dashboard-lookup-apikey.yml diff --git a/changelogs/fragments/392-dashboard-lookup-apikey.yml b/changelogs/fragments/392-dashboard-lookup-apikey.yml new file mode 100644 index 00000000..286e9440 --- /dev/null +++ b/changelogs/fragments/392-dashboard-lookup-apikey.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - Fixed check if grafana_api_key is defined for `grafana_dashboard` lookup From 45b85ada777287232fc234712f8f62c09c1644e4 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:56:07 +0200 Subject: [PATCH 3/8] build(2.1.0): release version --- CHANGELOG.rst | 18 ++++++++++++++++++ changelogs/changelog.yaml | 14 ++++++++++++++ galaxy.yml | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bf836e6e..4ea8be1e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,24 @@ Grafana Collection Release Notes .. contents:: Topics +v2.1.0 +====== + +Minor Changes +------------- + +- Manage subfolders for `grafana_folder` and specify uid + +Deprecated Features +------------------- + +- Deprecate `grafana_notification_channel` with removal in version 3.0.0 + +Bugfixes +-------- + +- Add missing function argument in `grafana_contact_point` for org handling + v2.0.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index d9be1049..cda1be3c 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -333,3 +333,17 @@ releases: name: grafana_contact_point namespace: '' release_date: '2024-05-31' + 2.1.0: + changes: + bugfixes: + - Add missing function argument in `grafana_contact_point` for org handling + deprecated_features: + - Deprecate `grafana_notification_channel` with removal in version 3.0.0 + minor_changes: + - Manage subfolders for `grafana_folder` and specify uid + fragments: + - 378-grafana-version-sorting.yml + - 379-contact-points-org-name-func-args.yml + - 381-sub-folders.yml + - 382-notification-channel-deprecation.yml + release_date: '2024-07-03' diff --git a/galaxy.yml b/galaxy.yml index 0577f6c2..8d76b1ed 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: community name: grafana -version: 2.0.0 +version: 2.1.0 readme: README.md authors: - RĂ©mi REY (@rrey) From 9169fbe4ababc9b74cff0a83926bddfc41783195 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:34:57 +0200 Subject: [PATCH 4/8] chore: ignore antsibull plugin cache --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2483976d..f61fbd54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ __pycache__/ +changelogs/.plugin-cache.yaml From 89738f4fdba0a84d95e3ca8608910902292844f3 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:35:33 +0200 Subject: [PATCH 5/8] docs: update changelog --- CHANGELOG.rst | 1 + changelogs/changelog.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4ea8be1e..1e99596e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -21,6 +21,7 @@ Bugfixes -------- - Add missing function argument in `grafana_contact_point` for org handling +- Fix var prefixes in silence-task in role v2.0.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index cda1be3c..12ad88fe 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -337,6 +337,7 @@ releases: changes: bugfixes: - Add missing function argument in `grafana_contact_point` for org handling + - Fix var prefixes in silence-task in role deprecated_features: - Deprecate `grafana_notification_channel` with removal in version 3.0.0 minor_changes: @@ -346,4 +347,5 @@ releases: - 379-contact-points-org-name-func-args.yml - 381-sub-folders.yml - 382-notification-channel-deprecation.yml + - patch-1.yaml release_date: '2024-07-03' From c988b2394c09c19d74e6777a181e553ae62c54b1 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Wed, 7 Aug 2024 21:40:43 +0200 Subject: [PATCH 6/8] docs: update changelog --- CHANGELOG.rst | 1 + changelogs/changelog.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1e99596e..60f2e27f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,7 @@ Bugfixes - Add missing function argument in `grafana_contact_point` for org handling - Fix var prefixes in silence-task in role +- Fixed check if grafana_api_key is defined for `grafana_dashboard` lookup v2.0.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 12ad88fe..3560444b 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -338,6 +338,7 @@ releases: bugfixes: - Add missing function argument in `grafana_contact_point` for org handling - Fix var prefixes in silence-task in role + - Fixed check if grafana_api_key is defined for `grafana_dashboard` lookup deprecated_features: - Deprecate `grafana_notification_channel` with removal in version 3.0.0 minor_changes: @@ -347,5 +348,6 @@ releases: - 379-contact-points-org-name-func-args.yml - 381-sub-folders.yml - 382-notification-channel-deprecation.yml + - 392-dashboard-lookup-apikey.yml - patch-1.yaml release_date: '2024-07-03' From 8def016751922cded541a04b3731aa974e463948 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Thu, 8 Aug 2024 08:05:53 +0200 Subject: [PATCH 7/8] docs: update deprecation changelog for notification channel --- changelogs/fragments/382-notification-channel-deprecation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/382-notification-channel-deprecation.yml b/changelogs/fragments/382-notification-channel-deprecation.yml index 9af1cf01..cd0463e8 100644 --- a/changelogs/fragments/382-notification-channel-deprecation.yml +++ b/changelogs/fragments/382-notification-channel-deprecation.yml @@ -1,5 +1,5 @@ --- deprecated_features: - - Deprecate `grafana_notification_channel` with removal in version 3.0.0 + - Deprecate `grafana_notification_channel`. It will be removed in version 3.0.0 trivial: - Check Grafana version for `grafana_notification_channel` integration tests From 825100f0ee7c6b9028c05168796471fb1958da46 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Thu, 8 Aug 2024 08:07:42 +0200 Subject: [PATCH 8/8] docs: update changelog --- CHANGELOG.rst | 2 +- changelogs/changelog.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 60f2e27f..72b29254 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,7 @@ Minor Changes Deprecated Features ------------------- -- Deprecate `grafana_notification_channel` with removal in version 3.0.0 +- Deprecate `grafana_notification_channel`. It will be removed in version 3.0.0 Bugfixes -------- diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 3560444b..cc85d41c 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -340,7 +340,7 @@ releases: - Fix var prefixes in silence-task in role - Fixed check if grafana_api_key is defined for `grafana_dashboard` lookup deprecated_features: - - Deprecate `grafana_notification_channel` with removal in version 3.0.0 + - Deprecate `grafana_notification_channel`. It will be removed in version 3.0.0 minor_changes: - Manage subfolders for `grafana_folder` and specify uid fragments: @@ -350,4 +350,4 @@ releases: - 382-notification-channel-deprecation.yml - 392-dashboard-lookup-apikey.yml - patch-1.yaml - release_date: '2024-07-03' + release_date: '2024-08-08'