Skip to content

Conversation

@Knerio
Copy link
Member

@Knerio Knerio commented Nov 9, 2025

close #474
close #424

@Knerio Knerio self-assigned this Nov 9, 2025
@github-actions
Copy link

github-actions bot commented Nov 9, 2025

GitLab Pipeline Action

General information

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

Status: Passed
Duration: 3 minutes

Job summaries

rspec: [ee]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12164028726/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2170706240/test_report
Finished in 18.84 seconds (files took 11.03 seconds to load)
1206 examples, 0 failures
Line Coverage: 91.24% (4091 / 4484)
[TEST PROF INFO] Time spent in factories: 00:10.680 (42.31% of total time)

rspec: [ce]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12164028724/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2170706240/test_report
Finished in 18.85 seconds (files took 11.63 seconds to load)
1159 examples, 0 failures
Line Coverage: 90.62% (3923 / 4329)
[TEST PROF INFO] Time spent in factories: 00:10.584 (42.16% of total time)

rubocop

682 files inspected, no offenses detected

@Knerio
Copy link
Member Author

Knerio commented Nov 10, 2025

Somehow the jobs are causing a postgres connection leak but idk why, maybe @Taucher2003 can take a look

@Knerio Knerio force-pushed the 474-primary-runtime-conflicts branch from 51e3d08 to 96deec5 Compare November 12, 2025 13:41
@Knerio
Copy link
Member Author

Knerio commented Nov 13, 2025

@copilot Please take a look in the pipeline, it fails because the postgres connections are leaking because of the jobs, do you have an idea/solution why that happens

Copy link
Contributor

Copilot AI commented Nov 13, 2025

@Knerio I've opened a new pull request, #683, to work on those changes. Once the pull request is ready, I'll request review from you.

@Knerio Knerio force-pushed the 474-primary-runtime-conflicts branch from 8dd0e4b to 3b977fe Compare November 20, 2025 19:21
@Knerio Knerio requested review from Copilot and removed request for Copilot November 20, 2025 19:21
Copilot finished reviewing on behalf of Knerio November 20, 2025 19:23
Copy link
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 runtime compatibility checking to validate that secondary runtimes are compatible with a project's primary runtime. It adds a compatible boolean field to track compatibility status and automatically updates it when runtime definitions change.

  • Adds CheckRuntimeCompatibilityService to verify that runtimes have matching data types, flow types, and function definitions with compatible versions
  • Implements UpdateRuntimeCompatibilityJob to asynchronously update compatibility status when runtime definitions change
  • Updates FlowHandler to only send flows from compatible runtime assignments, removing the TODO comment

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
app/services/runtimes/check_runtime_compatibility_service.rb New service that validates runtime compatibility by comparing versions and definitions between primary and secondary runtimes
app/jobs/update_runtime_compatibility_job.rb New background job that executes compatibility checks and updates assignment records
app/models/namespace_project_runtime_assignment.rb Adds compatible scope for filtering compatible assignments
db/migrate/20251109141754_add_is_compatible_to_primary_runtime.rb Migration to add compatible boolean column with default false
db/structure.sql Database schema updated with new compatible column
app/services/runtimes/data_types/update_service.rb Triggers compatibility job when data types are updated
app/services/runtimes/flow_types/update_service.rb Triggers compatibility job when flow types are updated
app/services/runtimes/runtime_function_definitions/update_service.rb Triggers compatibility job when function definitions are updated
app/services/namespaces/projects/assign_runtimes_service.rb Triggers compatibility job when runtimes are assigned to projects
app/services/error_code.rb Adds three new error codes for compatibility validation failures
docs/graphql/enum/errorcodeenum.md Documents the new error codes in GraphQL enum documentation
app/grpc/flow_handler.rb Filters flows by compatible assignments and removes TODO comment
config/environments/test.rb Configures test adapter for ActiveJob to prevent connection leaks
spec/services/runtimes/check_runtime_compatibility_service_spec.rb Test coverage for the compatibility service
spec/jobs/update_runtime_compatibility_job_spec.rb Test coverage for the compatibility job
db/schema_migrations/20251109141754 Migration checksum file
Comments suppressed due to low confidence (1)

docs/graphql/enum/errorcodeenum.md:30

  • Duplicate error codes exist with similar meanings. Both NO_PRIMARY_RUNTIME (line 30) and MISSING_PRIMARY_RUNTIME (line 28) describe the absence of a primary runtime on a project. These should be consolidated into a single error code for consistency, or their descriptions should be updated to clarify the distinction if they represent different scenarios.
| `INVALID_FLOW_SETTING` | The flow setting is invalid because of active model errors |
| `INVALID_LOGIN_DATA` | Invalid login data provided |
| `INVALID_NAMESPACE_LICENSE` | The namespace license is invalid because of active model errors |

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot finished reviewing on behalf of Knerio November 20, 2025 19:24
@Knerio Knerio force-pushed the 474-primary-runtime-conflicts branch from d928502 to d9fcace Compare November 20, 2025 20:07
@Taucher2003 Taucher2003 merged commit c335893 into main Nov 20, 2025
1 check passed
@Taucher2003 Taucher2003 deleted the 474-primary-runtime-conflicts branch November 20, 2025 20:25
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.

Primary runtime conflicts Pass relevant flows to runtime

3 participants