Deprecate Runner REST API maintainer_note with maintenance_note
What does this MR do and why?
Describe in detail what your merge request does and why.
This MR deprecates the maintainer_note
REST API argument introduced in !77767 (merged) (%14.7) and introduces a replacement called maintenance_note
, to avoid confusion with the maintainer role. The table column remains the same for the time being, with an alias added to the model.
- If the REST API is called with
maintainer_note
, it is converted tomaintenance_note
. - If the REST API is called with
maintenance_note
andmaintainer_note
, themaintainer_note
value is discarded.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
Using gitlab-runner!3268 (merged), I've built 2 versions of gitlab-runner, one sending the maintenance_note
attribute and the other sending maintainer_note
. Both work correctly when inspecting the table row:
gitlab-runner sending maintenance_note attribute
gitlab-runner register -config ~/.gitlab-runner/config.gdk.toml \
--executor "shell" \
--url "http://gdk.test:3000/" \
--access-level="not_protected" \
--non-interactive \
--maintenance-note="Test maintenance_note" \
--registration-token="$TOKEN"
Runtime platform arch=amd64 os=darwin pid=31039 revision=2926d9ba version=14.8.0~beta.2.g2926d9ba
WARNING: Running in user-mode.
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...
Registering runner... succeeded runner=Mcit2TT6
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
> Ci::Runner.last.maintenance_note
Ci::Runner Load (0.7ms) SELECT "ci_runners".* FROM "ci_runners" ORDER BY "ci_runners"."id" DESC LIMIT 1 /*application:console,db_config_name:main,line:(pry):15:in `__pry__'*/
=> "Test maintenance_note"
gitlab-runner sending maintainer_note attribute
gitlab-runner register -config ~/.gitlab-runner/config.gdk.toml \
--executor "shell" \
--url "http://gdk.test:3000/" \
--access-level="not_protected" \
--non-interactive \
--maintenance-note="Test maintainer_note" \
--registration-token="$TOKEN"
Runtime platform arch=amd64 os=darwin pid=33640 revision=2926d9ba version=14.8.0~beta.2.g2926d9ba
WARNING: Running in user-mode.
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...
Registering runner... succeeded runner=Mcit2TT6
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
> Ci::Runner.last.maintenance_note
Ci::Runner Load (0.7ms) SELECT "ci_runners".* FROM "ci_runners" ORDER BY "ci_runners"."id" DESC LIMIT 1 /*application:console,db_config_name:main,line:(pry):16:in `__pry__'*/
=> "Test maintainer_note"
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #350730 (closed)