Install an Endpoint with no local catalog - #215
Merged
Conversation
added 6 commits
August 3, 2026 14:16
LOCAL_CATALOG_BACKEND=none is a deployment that stores nothing locally: no MongoDB, no CKAN. It authenticates users, searches the global catalog and reports to the Federation, which is what most Endpoints are asked to do, and it needs nothing installed. Until now the setting only accepted 'ckan' or 'mongodb', so there was no way to say it. Turning the local catalog off with CKAN_LOCAL_ENABLED=False and leaving a backend named did not work either: the readiness probe kept checking the backend for every value except 'ckan', reported it down and answered 503 for a deployment running exactly as configured. - catalog_settings gains has_local_catalog, and asking for a repository without one now explains that rather than reporting an unsupported backend. - /ready reports the local catalog as disabled whenever it cannot be reached through the API — with no backend, or with the master switch off on any backend, since that unmounts the routes and rejects server=local. - /status reports the backend disconnected without attempting a connection. - The metrics task no longer asks for a repository it does not have. Catalog counts share a try/except with the whole payload, so the exception left the payload empty and skipped the POST: an Endpoint with no catalog would have silently stopped reporting to the Federation. - The routes that write to a local catalog are only mounted when a backend provides one.
…o it The lightest Endpoint there is: nothing installed, nothing stored locally, every optional integration off. It was not on offer — the local catalog question had four answers and all four configured a catalog, so a MongoDB was started even when nothing would ever be written to it. It is now the first choice at the prompt and the default for --backend, since it is the quickest Endpoint to stand up and a catalog can be added later by running the installer again. It renders LOCAL_CATALOG_BACKEND=none with CKAN_LOCAL_ENABLED=False, and blanks the CKAN and MongoDB settings so nothing points at a service that was not installed.
A new docs/sequence-diagrams/ folder, one process per file, with the first one: installing an Endpoint with no Federation registration and no local catalog, every answer left at its default. It follows the run from the first prompt to the Endpoint answering /health, and shows the .env it produces — including two defaults worth knowing, IS_PUBLIC=True (an Endpoint that never registered still reports metrics) and the development TEST_TOKEN.
mcp 2.0.0 changed the signature of its low-level Server, which fastapi-mcp 0.4.0 still calls positionally. FastApiMCP(app) runs at import time, so an unconstrained resolution produced a container that does not start, and CI failed on every branch. Existing images were unaffected: their dependencies were resolved when they were built.
Collaborator
Author
|
Also closes #216: CI was failing on every branch, this one included, because |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #214.
The lightest Endpoint there is — nothing installed, nothing stored locally, every optional integration off — could not be chosen. The installer's local-catalog question had four answers and all four configured a catalog, and no combination of environment variables produced a working Endpoint without one.
What this adds
LOCAL_CATALOG_BACKEND=noneis now a deployment that stores nothing locally: no MongoDB, no CKAN. It authenticates users, searches the platform's global catalog, serves its UI and reports to the Federation.The installer offers it as the first answer and as the default for
--backend:It renders
LOCAL_CATALOG_BACKEND=nonewithCKAN_LOCAL_ENABLED=Falseand blanksCKAN_URL,CKAN_API_KEYandMONGODB_CONNECTION_STRING, so nothing is left pointing at a service that was not installed. Running the installer again with--backend mongodbor--backend ckanadds a catalog later.Why the API needed changing too
Switching the local catalog off was not enough on its own:
disabledonly for the CKAN backend. With any other backend it probed the catalog even thoughCKAN_LOCAL_ENABLED=Falsehad already unmounted the local catalog routes and made/search?server=localanswer 400 — so an Endpoint configured deliberately without a usable catalog answered HTTP 503 and looked broken to any orchestrator.tryas the rest of the metrics payload. Asking for a repository that does not exist left the payload empty and skipped the POST, so the Endpoint would have stopped reporting to the Federation altogether rather than reporting without dataset counts.Verified
black --check .andflake8clean./healthand/readyanswered 200 withlocal_catalog: {status: disabled, backend: none}, the UI served,/search?server=globalanswered 200,/search?server=localanswered 400 with "Local CKAN is disabled and cannot be used", the registration/update/delete/resource routes were absent from the OpenAPI schema, and metrics posted to the Federation successfully.Backwards compatibility
ckanandmongodbbehave exactly as before. Two changes affect existing setups:CKAN_LOCAL_ENABLED=Falseand a MongoDB backend was answering 503 on/readyand now answers 200 with the catalog reporteddisabled.--backendused to get MongoDB and now get no catalog; add--backend mongodbto keep the previous result.