From 29a78c0d52820ebed00b917b339cd3a875c3df91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Due=C3=B1as?= Date: Tue, 13 Aug 2024 11:03:00 +0200 Subject: [PATCH] [enrich] Fix 'roles' attribute error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'roles' attribute wasn't available for all the enrichers. The attribute has been added to the main class 'Enrich' so subclasses will have it available even when they don't use it. Signed-off-by: Santiago Dueñas --- grimoire_elk/enriched/enrich.py | 1 + ...roles-attribute-not-available-on-some-enrichers.yml | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 releases/unreleased/roles-attribute-not-available-on-some-enrichers.yml diff --git a/grimoire_elk/enriched/enrich.py b/grimoire_elk/enriched/enrich.py index abb7279e9..f309f5635 100644 --- a/grimoire_elk/enriched/enrich.py +++ b/grimoire_elk/enriched/enrich.py @@ -101,6 +101,7 @@ class Enrich(ElasticItems): analyzer = Analyzer sh_db = None kibiter_version = None + roles = [] RAW_FIELDS_COPY = ["metadata__updated_on", "metadata__timestamp", "offset", "origin", "tag", "uuid"] KEYWORD_MAX_LENGTH = 1000 # this control allows to avoid max_bytes_length_exceeded_exception diff --git a/releases/unreleased/roles-attribute-not-available-on-some-enrichers.yml b/releases/unreleased/roles-attribute-not-available-on-some-enrichers.yml new file mode 100644 index 000000000..fc3f11c18 --- /dev/null +++ b/releases/unreleased/roles-attribute-not-available-on-some-enrichers.yml @@ -0,0 +1,10 @@ +--- +title: Roles attribute not available on some enrichers +category: fixed +author: Santiago Dueñas +issue: null +notes: > + The 'roles' attribute wasn't available for all the + enrichers. The attribute has been added to the + main class 'Enrich' so subclasses will have it + available even when they don't use it.