Skip to content

Commit

Permalink
Include missing parameters in enrich task
Browse files Browse the repository at this point in the history
There are some SortingHat parameters that weren't included when
starting the enrich_backend. This was not raising any error because
the backend was initialized in the load_identities method, but if
that method is skipped, the enrich backend process fails.

Signed-off-by: Jose Javier Merchante <jjmerchante@bitergia.com>
  • Loading branch information
jjmerchante committed Oct 10, 2023
1 parent 8da1f29 commit b14ab6b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions releases/unreleased/missing-parameters-for-sortinghat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Missing parameters for SortingHat
category: fixed
author: null
issue: null
notes: >
Include missing SortingHat parameters during the initialization of
the enrich backend.
4 changes: 3 additions & 1 deletion sirmordred/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ def _get_enrich_backend(self):
json_projects_map = self.conf['projects']['projects_file']

enrich_backend = connector[2](self.db_sh, json_projects_map,
self.db_user, self.db_password, self.db_host)
self.db_user, self.db_password, self.db_host,
self.db_path, self.db_port, self.db_ssl, self.db_verify_ssl,
self.db_tenant)
elastic_enrich = get_elastic(self.conf['es_enrichment']['url'],
self.conf[self.backend_section]['enriched_index'],
clean, enrich_backend)
Expand Down
1 change: 0 additions & 1 deletion sirmordred/task_enrich.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ def execute(self):

if autorefresh and self.db:
logger.info('[%s] autorefresh start', self.backend_section)
a = self._get_enrich_backend()
self.__autorefresh(self._get_enrich_backend())
logger.info('[%s] autorefresh end', self.backend_section)
else:
Expand Down

0 comments on commit b14ab6b

Please sign in to comment.