Skip to content

Comments

Add config declarations for harvest extension#575

Open
thorge wants to merge 2 commits intockan:masterfrom
thorge:add-config-declarations
Open

Add config declarations for harvest extension#575
thorge wants to merge 2 commits intockan:masterfrom
thorge:add-config-declarations

Conversation

@thorge
Copy link

@thorge thorge commented Jan 30, 2026

This PR adds config declarations for the CKAN Harvest extension, following the recommended IConfigDeclaration pattern. All relevant configuration options are now explicitly declared, improving validation, normalization, and auto-documentation support.

  • The ckan.harvest.timeout option should ideally be declared with declare_int. However, the current implementation in harvest_jobs_run() in update.py checks the value with if timeout:, and expects None or False as default. Using declare_int would require adjustments to the timeout handling logic to safely support integer defaults.

Fixes #564

@thorge
Copy link
Author

thorge commented Feb 2, 2026

I changed the default value of ckan.harvest.mq.password to None to avoid breaking passwordless Redis connections. When no password is provided, the extension expects the value for Redis to be None, whereas for RabbitMQ it assumes a default password of guest. The current implementation conflates these differing assumptions, so this part of the code may need rework to correctly support a common default across both Redis and RabbitMQ.

Possible solutions include splitting the configuration variables per backend, or introducing more explicit conditional handling based on a shared default value. Should we address this as part of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In CKAN 2.11 warnings about missing configuration

2 participants