Repository navigation
Closed
Labels
priority: mediumMedium prioritytype: bugSomething isn't workingtype: deliveryRelated to packaging, deployment etc.workload: hoursLikely takes hours to resolve
Description
Why?
The vendored GA4GH Service Registry spec cloud_registry/api/20201108.e0358db.openapi.yaml references two schemas remotely (lines 157 and 175):
$ref: 'https://raw.githubusercontent.com/ga4gh-discovery/ga4gh-service-info/v1.0.0/service-info.yaml#/components/schemas/Service'
$ref: 'https://raw.githubusercontent.com/ga4gh-discovery/ga4gh-service-info/v1.0.0/service-info.yaml#/components/schemas/ServiceType'These are resolved when the app is built, so the app, and every test that builds it, needs network access to raw.githubusercontent.com at startup. Verified: without network access, Foca(...).create_app() fails with jsonschema.exceptions._RefResolutionError. This breaks startup in air-gapped clusters, behind restrictive egress policies, during GitHub outages or rate limiting, and in sandboxed CI or development environments. The repository already contains the same service-info spec locally (cloud_registry/api/20201108.11d2c12.service-info.yaml).
How?
- Point both
$refs to the local service-info spec (relative file reference), or bundle the referenced schemas into the spec. Keep the change minimal and documented, since it is a vendored file (note the upstream version in a comment). - Check that no other remote references remain (e.g. with a test that loads all specs with network access disabled).
- Add a test that builds the app with sockets blocked (e.g.
pytest-socket) to prevent regressions.
Acceptance criteria
- The app starts and all tests pass without network access.
- The resolved
ServiceandServiceTypeschemas are unchanged.
Metadata
Metadata
Assignees
Labels
priority: mediumMedium prioritytype: bugSomething isn't workingtype: deliveryRelated to packaging, deployment etc.workload: hoursLikely takes hours to resolve
Activity
test: add app test harness, fix ID retry (#90)