Conversation
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2220856753 Status: Passed Job summariesrspec: [ee]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12476009009/artifacts/tmp/coverage/index.html rspec: [ce]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12476009007/artifacts/tmp/coverage/index.html rubocop724 files inspected, no offenses detected |
bcd4797 to
2524e50
Compare
2524e50 to
bead536
Compare
| argument :type, Types::GlobalIdType[::FlowType], required: true, | ||
| description: 'The identifier of the flow type' | ||
|
|
||
| argument :disabled_reason, String, |
There was a problem hiding this comment.
I wouldn't have exposed this to the user because the reason would for example be used when a flow gets disabled because the namespace reached its execution quota and we don't want the user to re-enable the flow themself by just removing the disabled_reason.
There was a problem hiding this comment.
I thought thats a user string to disable the flow, maybe we should add translations there for different messages, like quota and other stuff
There was a problem hiding this comment.
In the database this would most likely be an enum column like we have with DataTypeRule.variant. For now I would say that the user is not able to change it and it is a system defined value. For example quota_exceeded, invalid_flow or things like that
There was a problem hiding this comment.
This should be removed, because the user should not set a disabled reason themself as Niklas explained.
| argument :type, Types::GlobalIdType[::FlowType], required: true, | ||
| description: 'The identifier of the flow type' | ||
|
|
||
| argument :disabled_reason, String, |
There was a problem hiding this comment.
This should be removed, because the user should not set a disabled reason themself as Niklas explained.
| flows = [] | ||
| runtime.project_assignments.compatible.each do |assignment| | ||
| assignment.namespace_project.flows.each do |flow| | ||
| assignment.namespace_project.flows.enabled.each do |flow| |
There was a problem hiding this comment.
The disabled_reason should be passed to the runtime, so we can't filter disabled flows out
There was a problem hiding this comment.
This is done via .enabled, no?
| end | ||
|
|
||
| def to_grpc | ||
| Tucana::Shared::ValidationFlow.new( |
There was a problem hiding this comment.
We need to add disabled_reason here
|
|
||
| class AddDisabledReasontoFlows < Code0::ZeroTrack::Database::Migration[1.0] | ||
| def change | ||
| add_column :flows, :disabled_reason, :text, null: true, default: nil |
There was a problem hiding this comment.
Given that this should be an enum on the model, this should be changed to an integer
close #781