Closed luabida closed 1 year ago
I will provide some examples in a bit
On Wed, Apr 5, 2023, 13:13 Luã Bida Vacaro @.***> wrote:
@.**** commented on this pull request.
In tests/test_webapp.py https://github.com/thegraphnetwork/EpiGraphHub/pull/183#discussion_r1158799261 :
@@ -0,0 +1,40 @@ +from selenium import webdriver +from selenium.webdriver.common.by import By +import unittest +import os + +CHROMEDRIVER = os.getenv('CHROMEDRIVER') + +class TestEpiGraphHub(unittest.TestCase):
- @classmethod
- def setUpClass(cls):
- cls.driver = webdriver.Chrome(CHROMEDRIVER)
- cls.driver.get("https://epigraphhub.org/")
I'm aware, and the step should be below the containers initialization. But the chromedriver nor chrome-setup seem to be working on CI, kinda lost at this point
— Reply to this email directly, view it on GitHub https://github.com/thegraphnetwork/EpiGraphHub/pull/183#discussion_r1158799261, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHX5HNNCBFLEOCICD3HSF3W7WR3XANCNFSM6AAAAAAWUAXBNE . You are receiving this because your review was requested.Message ID: @.***>
Thanks for pushing this @xmnlab, this will be very important for the maintenability of the egh services
I will provide some examples in a bit
@xmnlab the last solution I have in mind is instead of using the chromedriver action, install the chrome with wget and run it as a step, any thoughts about trying this approach?
maybe you can find something here: https://github.com/osl-pocs/poc-python-selenium/
@xmnlab it seems like the postgres container is not initializing properly, dor you have any idea why the postgres volumes of the compose-dev are not working correctly?
ref: https://github.com/thegraphnetwork/EpiGraphHub/actions/runs/4629712850/jobs/8190327546#step:14:2951
I don't think that it is a volume problem the volume is not pointing to a specific path in the host side: https://github.com/thegraphnetwork/EpiGraphHub/blob/main/containers/compose-dev.yaml#L18
but if you want to test, you can remove that line and check how it would be performed by the CI
@xmnlab the file that has the line GRANT ALL ON SCHEMA switzerland TO dev_epigraph;
is one of the volumes below that, more specifically the ./postgresql/sql/dev/02-epigraphhub.sql
Got it .. have you tried that locally as well? Just to check where is the problem .. maybe a new version of the image changed the path etc
@xmnlab Yes, the same error occurs locally
@xmnlab Yes, the same error occurs locally
can you share what you have in the logs? maybe it would give us some tips
PS: btw, in the worst case we could have it as a COPY statement in the dockerfile
@xmnlab can you share what you have in the logs? maybe it would give us some tips
sure, the logs are very similar
PS: btw, in the worst case we could have it as a COPY statement in the dockerfile
I tried to run the sql file directly into the postgres container, all tables and schemas were created, I think only the grants didn't worked. The commands are ok tho, since after granting manually the dag works
sure, the logs are very similar
I mean the postgresql server log
but nvm .. we have a step that upload the logs as an artifact here https://github.com/thegraphnetwork/EpiGraphHub/suites/12074760051/artifacts/635510868
[35mpostgres_1 |[0m 2023-04-06 15:07:06.444 UTC [64] ERROR: relation "foph_hospvaccpersons_pkey" already exists
[35mpostgres_1 |[0m 2023-04-06 15:07:06.444 UTC [64] STATEMENT: ALTER TABLE ONLY switzerland.foph_hospvaccpersons_d
[35mpostgres_1 |[0m ADD CONSTRAINT foph_hospvaccpersons_pkey PRIMARY KEY (id_);
[35mpostgres_1 |[0m psql:/docker-entrypoint-initdb.d/12-epigraphhub.sql:18323: ERROR: relation "foph_hospvaccpersons_pkey" already exists
[35mpostgres_1 |[0m
[35mpostgres_1 |[0m PostgreSQL Database directory appears to contain a database; Skipping initialization
[35mpostgres_1 |[0m
[35mpostgres_1 |[0m 2023-04-06 15:07:06.993 UTC [1] LOG: starting PostgreSQL 14.7 (Debian 14.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
[35mpostgres_1 |[0m 2023-04-06 15:07:06.993 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 25432
[35mpostgres_1 |[0m 2023-04-06 15:07:06.993 UTC [1] LOG: listening on IPv6 address "::", port 25432
[35mpostgres_1 |[0m 2023-04-06 15:07:06.994 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.25432"
[35mpostgres_1 |[0m 2023-04-06 15:07:06.998 UTC [26] LOG: database system was interrupted; last known up at 2023-04-06 15:07:03 UTC
[35mpostgres_1 |[0m 2023-04-06 15:07:07.039 UTC [26] LOG: database system was not properly shut down; automatic recovery in progress
[35mpostgres_1 |[0m 2023-04-06 15:07:07.042 UTC [26] LOG: redo starts at 0/16FF730
[35mpostgres_1 |[0m 2023-04-06 15:07:07.154 UTC [26] LOG: invalid record length at 0/2E23090: wanted 24, got 0
[35mpostgres_1 |[0m 2023-04-06 15:07:07.154 UTC [26] LOG: redo done at 0/2E22F68 system usage: CPU: user: 0.06 s, system: 0.04 s, elapsed: 0.11 s
[35mpostgres_1 |[0m 2023-04-06 15:07:07.280 UTC [1] LOG: database system is ready to accept connections
[35mpostgres_1 |[0m 2023-04-06 15:08:15.648 UTC [96] ERROR: duplicate key value violates unique constraint "dag_pkey"
[35mpostgres_1 |[0m 2023-04-06 15:08:15.648 UTC [96] DETAIL: Key (dag_id)=(SINAN_DIFT) already exists.
@luabida, can you check that please?
I see, thank you for spotting it out
@xmnlab by any chance, do you why is CI accusing switzerland
schema doesn't exist but the public.owid_covid
does? https://github.com/thegraphnetwork/EpiGraphHub/actions/runs/4682606854/jobs/8296668536#step:14:4309 I'm getting out of ideas here, the schema creation happens even before the owid_covid table is created and it still says there is no schema switzerland
.. https://github.com/thegraphnetwork/EpiGraphHub/blob/2d218052494b759d1e4c1dc2a31c579dc8008a95/containers/postgresql/sql/dev/02-epigraphhub.sql#L59
@luabida as your code is not about anything that would change the potgresql server or the dags, what I can suggest you for now is to move back containers/postgresql/sql/dev/02-epigraphhub.sql and we can merge this PR. and we can take a look into that later
@xmnlab selenium tests are passing.. ready to review & merge
Tests include:
fix #179