From 5d44caffa95b6471baae7b87c68e2a555ac6f381 Mon Sep 17 00:00:00 2001 From: Jose Javier Merchante Date: Thu, 8 Aug 2024 10:25:37 +0200 Subject: [PATCH] Update the author's filter in autorefresh process This commit updates the filter construction to correctly match UUIDs in OpenSearch, addressing a bug in Mordred that prevented role identities from being refreshed. Signed-off-by: Jose Javier Merchante --- grimoire_elk/elk.py | 2 +- .../unreleased/identity-refresh-bug-for-some-items.yml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 releases/unreleased/identity-refresh-bug-for-some-items.yml diff --git a/grimoire_elk/elk.py b/grimoire_elk/elk.py index ac8d512e8..47f631c8e 100755 --- a/grimoire_elk/elk.py +++ b/grimoire_elk/elk.py @@ -262,7 +262,7 @@ def refresh_identities(enrich_backend, author_fields=None, individuals=None): def create_filter_authors(authors, to_refresh): filter_authors = [] for author in authors: - author_name = author if author == 'author_uuid' else author + '_uuids' + author_name = author if author.endswith('_uuid') else author + '_uuids' field_author = { "name": author_name, "value": to_refresh diff --git a/releases/unreleased/identity-refresh-bug-for-some-items.yml b/releases/unreleased/identity-refresh-bug-for-some-items.yml new file mode 100644 index 000000000..a49a16b4e --- /dev/null +++ b/releases/unreleased/identity-refresh-bug-for-some-items.yml @@ -0,0 +1,9 @@ +--- +title: Identity refresh bug for some items +category: fixed +author: Jose Javier Merchante +issue: 1161 +notes: > + Update the filter construction to correctly match UUIDs in + OpenSearch, addressing a bug in Mordred that prevented role + identities from being refreshed.