Add concurrency-limited CosmoGenerator (semaphore limit=1, 60s timeout)
to prevent unbounded concurrent wgc process spawning. Add debouncer
(500ms) to coalesce rapid schema updates per org+ref. Fix double
subgraph fetch in Supergraph resolver and goroutine leak in
SchemaUpdates subscription.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update git remote to git.unbound.se
- Add Gitea workflows: ci.yaml, pre-commit.yaml, release.yaml, goreleaser.yaml
- Delete .gitlab-ci.yml
- Update Go module path to gitea.unbound.se/unboundsoftware/schemas
- Update all imports to new module path
- Update Docker registry to oci.unbound.se
- Update .goreleaser.yml for Gitea releases with internal cluster URL
- Remove GitLab CI linter from pre-commit config
- Use shared release workflow with tag_only for versioning
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduce `AddUserToOrganization`, `RemoveAPIKey`, and
`RemoveOrganization` commands to enhance organization
management. Implement validation for user addition and
API key removal. Update GraphQL schema to support new
mutations and add caching for the new events, ensuring
that organizations and their relationships are accurately
represented in the cache.
Adds a new hashed key storage mechanism for API keys in the cache.
Replaces direct mapping to API keys with composite keys based on
organizationId and name. Implements searching of API keys using
hash comparisons for improved security. Updates related tests to
ensure correct functionality and validate the hashing. Also,
adds support for a new dependency `golang.org/x/crypto`.
Introduce the CommandExecutor interface to abstract command execution,
allowing for easier mocking in tests. Implement DefaultCommandExecutor
to use the os/exec package for executing commands. Update the
GenerateCosmoRouterConfig function to utilize the new
GenerateCosmoRouterConfigWithExecutor function that accepts a command
executor parameter. Add a MockCommandExecutor for simulating command
execution in unit tests with realistic behavior based on input YAML
files. This enhances test coverage and simplifies error handling.
Update version check to validate it is a non-empty string. Improve
assertions for the subscription configuration by ensuring the presence
of required fields and correct types. Adapt checks for routing URLs
and decentralize subscription validation for more robust testing.
These changes ensure better verification of configuration
integrity and correctness in test scenarios.
Implements the `latestSchema` query to fetch the latest schema
updates for an organization. This change enhances the GraphQL API by
allowing clients to retrieve the most recent schema version and its
associated subgraphs. The resolver performs necessary access checks,
logs relevant information, and generates the Cosmo router configuration
from fetched subgraph SDLs, returning structured schema update details.
Refactor API key processing to improve clarity and reduce code
duplication. Introduce detailed logging for schema updates and
initializations, capturing relevant context information. Use
background context for async operations to avoid blocking.
Implement organization lookup logic in the WebSocket init
function for consistent API key handling across connections.
Creates a new `GenerateCosmoRouterConfig` function to build and
serialize a Cosmo Router configuration from subgraphs. Implements
PubSub mechanism for managing schema updates, allowing
subscription to updates. Adds Subscription resolver and updates
existing structures to accommodate new functionalities. This
enhances the system's capabilities for dynamic updates and
configuration management.
Add a context with timeout to handle graceful shutdown of the HTTP
server. Update error handling during the server's close to include
context-aware shutdown. Ensure that the server properly logs only
non-closed errors when listening.
Introduce types for managing fielded, enum, union, and scalar shared types.
Implement functionality for comparing values and creating field sets.
Enhance schema extensions by integrating new visitors for enum types.