module configs#989
Conversation
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2562065163 Status: Passed Job summariesrspec: [cloud]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14604618173/artifacts/tmp/coverage/index.html rspec: [ee]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14604618172/artifacts/tmp/coverage/index.html rspec: [ce]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14604618171/artifacts/tmp/coverage/index.html docs:previewDocumentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/14604680769/artifacts/out/index.html rubocop847 files inspected, no offenses detected |
There was a problem hiding this comment.
Pull request overview
This PR implements mutable, per-project/per-runtime module configuration storage by introducing a ModuleConfiguration model linked to NamespaceProjectRuntimeAssignment, and exposes those saved configurations through GraphQL (query + mutation) while also pushing them to runtimes via gRPC updates.
Changes:
- Add
module_configurationspersistence (model, associations, migration, validations) and a service to replace the saved configuration set for a runtime assignment. - Extend GraphQL schema to expose
runtimeAssignments { moduleConfigurations }and add a mutation to update module configurations. - Update runtime update propagation (
FlowHandler.update_runtime) to stream grouped module configuration payloads.
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/services/namespaces/projects/runtime_assignments/update_module_configurations_service_spec.rb | Adds service specs for persisting/replacing module configurations and auditing/runtime update behavior. |
| spec/requests/graphql/query/namespace_project_runtime_assignments_query_spec.rb | Adds query spec asserting runtime assignments include saved module configurations. |
| spec/requests/graphql/mutation/namespace/projects/runtime_assignments/update_module_configurations_mutation_spec.rb | Adds mutation spec for updating module configurations and permission errors. |
| spec/models/namespace_project_runtime_assignment_spec.rb | Updates association expectations to include module_configurations. |
| spec/models/module_configuration_spec.rb | Adds model specs for associations, scoped uniqueness, runtime/definition validation, and gRPC serialization. |
| spec/graphql/types/namespace_project_type_spec.rb | Updates type field expectations to runtimeAssignments. |
| spec/graphql/types/namespace_project_runtime_assignment_type_spec.rb | Adds type spec for runtime assignment GraphQL exposure. |
| spec/graphql/types/module_configuration_type_spec.rb | Adds type spec for module configuration GraphQL exposure. |
| spec/factories/module_configurations.rb | Adds a factory for ModuleConfiguration. |
| docs/graphql/scalar/namespaceprojectruntimeassignmentid.md | Adds docs for the new global ID scalar. |
| docs/graphql/scalar/moduleconfigurationid.md | Adds docs for the new global ID scalar. |
| docs/graphql/object/namespaceprojectruntimeassignmentedge.md | Adds docs for runtime assignment connection edge. |
| docs/graphql/object/namespaceprojectruntimeassignmentconnection.md | Adds docs for runtime assignment connection. |
| docs/graphql/object/namespaceprojectruntimeassignment.md | Adds docs for runtime assignment object including module configurations. |
| docs/graphql/object/namespaceproject.md | Updates docs to expose runtimeAssignments instead of runtimes. |
| docs/graphql/object/moduleconfigurationedge.md | Adds docs for module configuration connection edge. |
| docs/graphql/object/moduleconfigurationconnection.md | Adds docs for module configuration connection. |
| docs/graphql/object/moduleconfiguration.md | Adds docs for module configuration object. |
| docs/graphql/mutation/namespacesprojectsruntimeassignmentsupdatemoduleconfigurations.md | Adds docs for the new mutation. |
| docs/graphql/input_object/moduleconfigurationinput.md | Adds docs for the new input object type. |
| docs/graphql/enum/errorcodeenum.md | Documents the new INVALID_MODULE_CONFIGURATION error code. |
| db/structure.sql | Updates schema dump (includes module_configurations plus additional unrelated DDL changes). |
| db/schema_migrations/20260525100000 | Adds checksum entry for the new migration. |
| db/migrate/20260525100000_create_module_configurations.rb | Creates module_configurations table with indexes and FKs. |
| app/services/namespaces/projects/runtime_assignments/update_module_configurations_service.rb | New transactional service to upsert/delete module configurations, audit, and trigger runtime update. |
| app/services/error_code.rb | Registers invalid_module_configuration error code. |
| app/policies/namespace_project_runtime_assignment_policy.rb | Adds policy for reading/updating runtime assignments. |
| app/policies/module_configuration_policy.rb | Adds policy for reading/updating module configurations. |
| app/models/runtime.rb | Adds module_configuration_definitions association through runtime_modules. |
| app/models/namespace_project_runtime_assignment.rb | Adds has_many :module_configurations with dependent destroy. |
| app/models/module_configuration.rb | Adds new model with scoped uniqueness, runtime/definition validation, and to_grpc. |
| app/models/module_configuration_definition.rb | Adds reverse has_many :module_configurations. |
| app/models/audit_event.rb | Adds new audit event type project_module_configurations_updated. |
| app/grpc/flow_handler.rb | Extends runtime update streaming to include grouped module configuration payloads. |
| app/graphql/types/namespace_project_type.rb | Replaces runtimes field with runtime_assignments connection field. |
| app/graphql/types/namespace_project_runtime_assignment_type.rb | Adds GraphQL type exposing compatible/runtime/moduleConfigurations. |
| app/graphql/types/mutation_type.rb | Mounts the new update-module-configurations mutation. |
| app/graphql/types/module_configuration_type.rb | Adds GraphQL type exposing definition + value. |
| app/graphql/types/input/module_configuration_input_type.rb | Adds GraphQL input object for module configuration updates. |
| app/graphql/mutations/namespaces/projects/runtime_assignments/update_module_configurations.rb | Adds mutation resolving the service and returning the updated assignment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Niklas van Schrick <mc.taucher2003@gmail.com> Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
Resolves: #983