Skip to content

module configs#989

Merged
raphael-goetz merged 5 commits into
mainfrom
#983-mutatable-configs
May 29, 2026
Merged

module configs#989
raphael-goetz merged 5 commits into
mainfrom
#983-mutatable-configs

Conversation

@raphael-goetz
Copy link
Copy Markdown
Member

Resolves: #983

@raphael-goetz raphael-goetz marked this pull request as ready for review May 25, 2026 14:11
Copilot AI review requested due to automatic review settings May 25, 2026 14:11
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 25, 2026

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2562065163

Status: Passed
Duration: 5 minutes

Job summaries

rspec: [cloud]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14604618173/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2562065163/test_report
Finished in 24.83 seconds (files took 11.99 seconds to load)
1495 examples, 0 failures
Line Coverage: 93.02% (5121 / 5505)
[TEST PROF INFO] Time spent in factories: 00:15.170 (47.69% of total time)

rspec: [ee]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14604618172/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2562065163/test_report
Finished in 23.83 seconds (files took 12.4 seconds to load)
1459 examples, 0 failures
Line Coverage: 93.24% (4968 / 5328)
[TEST PROF INFO] Time spent in factories: 00:14.795 (48.62% of total time)

rspec: [ce]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14604618171/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2562065163/test_report
Finished in 23.82 seconds (files took 8.69 seconds to load)
1409 examples, 0 failures
Line Coverage: 92.76% (4792 / 5166)
[TEST PROF INFO] Time spent in factories: 00:14.489 (50.22% of total time)

docs:preview

Documentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/14604680769/artifacts/out/index.html

rubocop

847 files inspected, no offenses detected

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_configurations persistence (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.

Comment thread db/structure.sql Outdated
Comment thread app/graphql/types/namespace_project_type.rb
Comment thread spec/models/module_configuration_spec.rb
Comment thread db/structure.sql Outdated
Comment thread db/structure.sql
Comment thread app/policies/module_configuration_policy.rb Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.

Comment thread app/graphql/types/namespace_project_type.rb
@nicosammito nicosammito requested a review from Taucher2003 May 27, 2026 06:46
Comment thread app/models/namespace_project_runtime_assignment.rb Outdated
Comment thread app/policies/module_configuration_policy.rb Outdated
Comment thread app/policies/namespace_project_runtime_assignment_policy.rb Outdated
raphael-goetz and others added 2 commits May 28, 2026 20:32
Co-authored-by: Niklas van Schrick <mc.taucher2003@gmail.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
@raphael-goetz raphael-goetz merged commit c92abdf into main May 29, 2026
1 check passed
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.

Mutatable Module Configurations

3 participants