-
Notifications
You must be signed in to change notification settings - Fork 0
Check primary runtime conflicts #659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2170706240 Status: Passed Job summariesrspec: [ee]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12164028726/artifacts/tmp/coverage/index.html rspec: [ce]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12164028724/artifacts/tmp/coverage/index.html rubocop682 files inspected, no offenses detected |
|
Somehow the jobs are causing a postgres connection leak but idk why, maybe @Taucher2003 can take a look |
51e3d08 to
96deec5
Compare
|
@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 |
8dd0e4b to
3b977fe
Compare
There was a problem hiding this 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
CheckRuntimeCompatibilityServiceto verify that runtimes have matching data types, flow types, and function definitions with compatible versions - Implements
UpdateRuntimeCompatibilityJobto asynchronously update compatibility status when runtime definitions change - Updates
FlowHandlerto 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) andMISSING_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.
Co-authored-by: Knerio <96529060+Knerio@users.noreply.github.com>
d928502 to
d9fcace
Compare
close #474
close #424