Skip to content

Add URL health view and expose health in data source sync/API#598

Merged
maxachis merged 4 commits intodevfrom
issue-341-url-health
Mar 18, 2026
Merged

Add URL health view and expose health in data source sync/API#598
maxachis merged 4 commits intodevfrom
issue-341-url-health

Conversation

@maxachis
Copy link
Collaborator

@maxachis maxachis commented Feb 27, 2026

#341

Summary

  • add a derived url_health_view (SQL view + ORM model + enum) to separate URL health from labeling status
  • use health-derived fields in data-source sync add/update payload generation (url_status + archive URL)
  • expose structured url_health on data source GET responses
  • expand data-source update sync prerequisites so health-related source changes trigger updates
  • update integration tests for readonly data source GET and data-source sync add/update payload assertions

Testing

  • docker compose up -d (from local_database/)
  • POSTGRES_USER=test_source_collector_user POSTGRES_PASSWORD=HanviliciousHamiltonHilltops POSTGRES_DB=source_collector_test_db POSTGRES_HOST=127.0.0.1 POSTGRES_PORT=5432 UV_CACHE_DIR=/tmp/uv-cache uv run pytest tests/automated/integration/readonly/api/data_sources/test_get.py tests/automated/integration/tasks/scheduled/impl/sync_to_ds/data_source/test_add.py tests/automated/integration/tasks/scheduled/impl/sync_to_ds/data_source/update/test_update_url.py -q
  • result: 3 passed

Copy link
Contributor

@josh-chamberlain josh-chamberlain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice! getting this back on API requests is wonderful...seeing it in the UI would be neat: Police-Data-Accessibility-Project/pdap.io#421

Resolved conflict in process.py: kept url_health field from this branch
alongside access_types from dev.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gitguardian
Copy link

gitguardian bot commented Mar 18, 2026

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
15086721 Triggered Generic Password 38333d2 .github/workflows/benchmark.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

maxachis and others added 2 commits March 18, 2026 09:50
Resolved conflict in process.py: kept url_health field from this branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The merge from dev introduced a separate migration head (f831e447b1cb)
that wasn't connected to the url_health migration (7a6c2e1b9d44),
causing "Multiple head revisions" errors in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maxachis maxachis merged commit ab56a54 into dev Mar 18, 2026
3 of 4 checks passed
@maxachis maxachis deleted the issue-341-url-health branch March 18, 2026 13:57
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.

2 participants