Follow-up from "API to enable and disable error tracking settings"
The following discussions from !24220 (merged) should be addressed:
-
@splattael started a discussion: If
allow_blankis missing we'll get aActiveRecord::NotNullViolation:`` ActiveRecord::NotNullViolation (PG::NotNullViolation: ERROR: null value in column "enabled" violates not-null constraint DETAIL: Failing row contains (21, null, http://127.0.0.1:9000/api/0/projects/sentry/gitlab/, 9CHYU82EK26F2MobAWU3FYS0AhV/dxOFeNHYREjm3w3K6KDxJJH6W4EVluto D95..., KvvOqG4Bwb48C944 , gitlab, Sentry)
See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24220#note_282818056 This indicates that we should validate `enabled` in the `ErrorTracking::ProjectErrorTrackingSetting`. See [`GranfaIntegration`](https://gitlab.com/gitlab-org/gitlab/-/blob/5f6d1b6fb3801a743e4da0b7795a4e237e392ea6/app/models/grafana_integration.rb#L19). We can fix this in a follow-up MR :+1: -
@splattael started a discussion: In order to make use of
subjectwe have to define it in e.g !24220 (diffs) so we mixing bothmake_request/make_patch_requestandsubject. This we could unify by- Rename
make_patch_request(active:)tomatch_request(no params) - Introduce
let(:params) { ... }to thePATCHspecs and useparamsin newly renamedmake_request - Replace the usage of
subjectwithmake_request
Again, nothing critical and perfect for a follow-up
👍 - Rename
-
@splattael started a discussion: We could use
let_it_behere