You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metadata export: unset PUBLIC_API_URL falls back to a non-resolving host (dead download links) #238
What: If PUBLIC_API_URL / PUBLIC_SITE_URL aren't set, settings.py:308-309 and metadata_export/adapter.py:24-28 fall back to https://api.civicdataspace.in, a host that doesn't resolve. Neither variable is set on dev. Why it matters: Every resource download_url in the DCAT/Croissant/DC exports is a dead link, and landing pages point at the prod site even for dev datasets. Prod will have the same problem once #211 is promoted. Evidence: In dev's DCAT export for dataset 5cd8ca93…, download_url points to api.civicdataspace.in/api/download/resource/8e2e…, which returns 000 (no response). The same path on dev.api returns 200. Fix: Not fixed yet. Change the fallback in both files to https://api.datakeep.civicdays.in. Dev's .env also needs PUBLIC_API_URL=https://dev.api.civicdataspace.in and PUBLIC_SITE_URL=https://dev.civicdataspace.in. Failing at startup instead was ruled out: the deploy runs migrations before the new containers start, so a missing variable would leave the old image running on the new schema.
Fix: Code part merged into dev in #244. The fallback is now https://api.datakeep.civicdays.in in DataSpace/settings.py and api/services/metadata_export/adapter.py. Also changed in .env.example, which had the same dead host. Dev deploys automatically. Still to do:@saqibmanan, please add to dev's .env: PUBLIC_API_URL=https://dev.api.civicdataspace.in and PUBLIC_SITE_URL=https://dev.civicdataspace.in. This is server config, so it couldn't go in the PR. Check after deploy: In dev's DCAT export, download_url should point to dev.api.civicdataspace.in/api/download/resource/… and return 200.
Activity
fix(api): point PUBLIC_API_URL fallback at the live prod API
anantjain341 commentedon Oct 12, 2026
Fix: Code part merged into
devin #244. The fallback is nowhttps://api.datakeep.civicdays.ininDataSpace/settings.pyandapi/services/metadata_export/adapter.py. Also changed in.env.example, which had the same dead host. Dev deploys automatically.Still to do: @saqibmanan, please add to dev's
.env:PUBLIC_API_URL=https://dev.api.civicdataspace.inandPUBLIC_SITE_URL=https://dev.civicdataspace.in. This is server config, so it couldn't go in the PR.Check after deploy: In dev's DCAT export,
download_urlshould point todev.api.civicdataspace.in/api/download/resource/…and return 200.Moving to Ready to test.