chaoss / grimoirelab-elk

GNU General Public License v3.0
58 stars 121 forks source link

[Sortinghat] The port of database is always `3306` and is not supported to be changed as we want #1022

Closed xiao623 closed 9 months ago

xiao623 commented 2 years ago

https://github.com/chaoss/grimoirelab-elk/blob/1b2ccbd2b4bd4760ea884c47795c4defee67d2c6/grimoire_elk/enriched/enrich.py#L119-L133

I deployed my database on my host with other port instead of 3306. And I couldn't connect my database unless changing the port to 3306 (But for some reason, I couldn't use this port).

From the above code, we can known that the port is always 3306.

What I want

We can change this value as we want.

And currently, I add new parameter db_port to enrich_backend and pass it to xxxEnrich and Enrich (There are too many backends, thus I just modified those backends what I want and use) https://github.com/chaoss/grimoirelab-elk/blob/1b2ccbd2b4bd4760ea884c47795c4defee67d2c6/grimoire_elk/elk.py#L488-L489

Whether the value of the port would be supported to be changed in the future verson?

zhquan commented 2 years ago

Hi @xiao623,

By default, Sortinghat use the port 3306. When ELK connect to the database no port is passed to Sortinghat https://github.com/chaoss/grimoirelab-elk/blob/1b2ccbd2b4bd4760ea884c47795c4defee67d2c6/grimoire_elk/enriched/enrich.py#L131-L132

At first glance, you can add port to:

Then you can use it in setup.cfg as the host parameter.

I hope it helps you.

Best, Quan

xiao623 commented 2 years ago

Hi @zhquan,

That was what i had done. And we also need to pass the port to those enrich backends to create the database connector. But there are too many backends, thus I just modified those backends what I want and use.

Whether the value of the port would be supported to be changed in the future verson? If not, this issue could be closed.

jjmerchante commented 9 months ago

Now we are using a different version of SortingHat and the port can be defined using the configuration from Mordred.