Knowledge-Graph-Hub / kg-microbe

https://knowledge-graph-hub.github.io/kg-microbe/index.html
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

Jenkins build fails due to old python version #256

Open hrshdhgd opened 3 weeks ago

hrshdhgd commented 3 weeks ago

Error:

10:16:18    File "/var/lib/jenkins/workspace/edge-graph-hub_kg-microbe_master/gitrepo/venv/lib/python3.9/site-packages/kg_microbe/utils/pandas_utils.py", line 104, in establish_transitive_relationship
10:16:18      zip(subject_intermediate_df["object"], subject_intermediate_df["subject"], strict=False)
10:16:18  TypeError: zip() takes no keyword arguments

Cause: Jenkins may be using an older version of Python (3.9).

Could the python version be updated in code of does it need to be a setup thing?

Attn: @caufieldjh , @justaddcoffee @realmarcin @bsantan

caufieldjh commented 3 weeks ago

It's going to depend on the Docker image - the one it's using, caufieldjh/ubuntu20-python-3-9-14-dev:2, is just python 3.9, and I don't think I have one ready to go with 3.10.

I'll make a new one for KG builds following these instructions (but without mysql/postgres): https://github.com/Knowledge-Graph-Hub/kg-idg/issues/107#issuecomment-1295161374

hrshdhgd commented 3 weeks ago

but without mysql/postgres

It will have sqlite3 though, correct? We'll need it for oaklib's SQLiteImplementation use.

caufieldjh commented 3 weeks ago

sqlite3 is usually included with a python3 install, but I'll make sure it's included

caufieldjh commented 3 weeks ago

The image ID in the Jenkinsfile should be replaced with caufieldjh/kg-hub-3_10:1. The Jenkinsfile may also require some updates to avoid specifying python3.9

caufieldjh commented 3 weeks ago

OK, looks like the new Docker image works except for this detail:

This is what it should do:

[Pipeline] sh ([hide](https://build.berkeleybop.io/job/knowledge-graph-hub/job/kg-microbe/job/master/260/consoleFull#))
10:25:19  + id
10:25:19  uid=114(jenkinsuser) gid=120 groups=120
[Pipeline] sh
10:25:20  + whoami
10:25:20  jenkinsuser

but this is what it does instead:

[Pipeline] sh
15:49:56  + id
15:49:56  uid=114 gid=120 groups=120
[Pipeline] sh
15:49:57  + whoami
15:49:57  whoami: cannot find name for user ID 114
caufieldjh commented 3 weeks ago

I think the username for jenkinsuser just isn't getting set as expected. Will push a fix.

caufieldjh commented 3 weeks ago

The image caufieldjh/kg-hub-3_10:2 should work now