GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
582 stars 91 forks source link

ckanext-dcat latest changes not compatible with catalog #4806

Open rshewitt opened 1 month ago

rshewitt commented 1 month ago

commit hash results in a non-zero return when running prerun.py caused by an import error with ckanext.scheming

... from ckanext.dcat.validators import is_year, is_year_month, is_date\n  File "/usr/local/lib/python3.10/site-packages/ckanext/dcat/validators.py", line 12, in <module>\n    from ckanext.scheming.validation import scheming_validator\nModuleNotFoundError: No module named \'ckanext.scheming\'\n'
2024-07-08 13:14:31 Traceback (most recent call last):
2024-07-08 13:14:31   File "/srv/app/prerun.py", line 208, in <module>
2024-07-08 13:14:31     init_db()
2024-07-08 13:14:31   File "/srv/app/prerun.py", line 112, in init_db
2024-07-08 13:14:31     raise e
2024-07-08 13:14:31   File "/srv/app/prerun.py", line 101, in init_db
2024-07-08 13:14:31     subprocess.check_output(db_command, stderr=subprocess.STDOUT)
2024-07-08 13:14:31   File "/usr/local/lib/python3.10/subprocess.py", line 421, in check_output
2024-07-08 13:14:31     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
2024-07-08 13:14:31   File "/usr/local/lib/python3.10/subprocess.py", line 526, in run
2024-07-08 13:14:31     raise CalledProcessError(retcode, process.args,
2024-07-08 13:14:31 subprocess.CalledProcessError: Command '['ckan', '-c', '/srv/app/ckan.ini', 'db', 'init']' returned non-zero exit status 1.

change comparison between the current working commit and the latest causing the error.

How to reproduce

  1. point ckanext-dcat version to 1ef40546ce8656cb2b7b8d5a23f26bf64523acfa in ckan/requirements.txt
  2. run make build then make up

Expected behavior

prerun.py runs successfully

Actual behavior

prerun.py errors out

Sketch

[Notes or a checklist reflecting our understanding of the selected approach]

btylerburton commented 1 month ago

could just be missing the new dependency.

jbrown-xentity commented 1 month ago

ckanext scheming seems to be the missing problem. Should investigate dcat dependencies and see what has changed. Unknown what integrating ckanext-scheming will do to catalog, would need testing and validation.

FuhuXia commented 1 month ago

let us pin to the latest release v1.7.0 for now.