Commit 0a89152f authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'pedropombeiro/348299/increase-maintainer_note-text-limit' into 'master'

Increase text limit of maintainer_note field

See merge request gitlab-org/gitlab!81137
parents 564e2731 9e754ee5
......@@ -200,7 +200,7 @@ module Ci
validates :config, json_schema: { filename: 'ci_runner_config' }
validates :maintenance_note, length: { maximum: 255 }
validates :maintenance_note, length: { maximum: 1024 }
alias_attribute :maintenance_note, :maintainer_note
......
# frozen_string_literal: true
class ChangeMaintainerNoteLimitInCiRunner < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
def up
add_text_limit :ci_runners, :maintainer_note, 1024, constraint_name: check_constraint_name(:ci_runners, :maintainer_note, 'max_length_1MB')
remove_text_limit :ci_runners, :maintainer_note, constraint_name: check_constraint_name(:ci_runners, :maintainer_note, 'max_length')
end
def down
# no-op: Danger of failing if there are records with length(maintainer_note) > 255
end
end
7aa2cf28363e914ad83c61d45321f701a68111122c75abeb54430c4035d56677
\ No newline at end of file
......@@ -12400,7 +12400,7 @@ CREATE TABLE ci_runners (
executor_type smallint,
maintainer_note text,
token_expires_at timestamp with time zone,
CONSTRAINT check_56f5ea8804 CHECK ((char_length(maintainer_note) <= 255))
CONSTRAINT check_ce275cee06 CHECK ((char_length(maintainer_note) <= 1024))
);
CREATE SEQUENCE ci_runners_id_seq
......@@ -660,7 +660,7 @@ POST /runners
| `access_level` | string | no | The access_level of the runner; `not_protected` or `ref_protected` |
| `maximum_timeout` | integer | no | Maximum timeout set when this runner handles the job |
| `maintainer_note` | string | no | [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/350730), see `maintenance_note` |
| `maintenance_note` | string | no | Free-form maintenance notes for the runner (255 characters) |
| `maintenance_note` | string | no | Free-form maintenance notes for the runner (1024 characters) |
```shell
curl --request POST "https://gitlab.example.com/api/v4/runners" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment