Fixing kwargs deprecation warnings for 2.7
What does this MR do?
Contributes to #257438 (closed)
Fix kwargs warnings for:
Gitlab::UrlBlocker.validate!
Gitlab::UrlBlocker.blocked_url?
Screenshots (strongly suggested)
Before
→ be rspec spec/controllers/import/bulk_imports_controller_spec.rb spec/controllers/import/fogbugz_controller_spec.rb spec/controllers/import/gitea_controller_spec.rb spec/services/import/bitbucket_server_service_spec.rb spec/services/import/github_service_spec.rb
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/acts-as-taggable-on-6.5.0/lib/acts_as_taggable_on/tagging.rb:9: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/associations.rb:1657: warning: The called method `belongs_to' is defined here
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/marginalia-1.9.0/lib/marginalia.rb:94: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/postgresql_adapter.rb:648: warning: The called method `execute_and_clear_without_marginalia' is defined here
/Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/app/workers/concerns/worker_context.rb:8: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/lib/gitlab/application_context.rb:33: warning: The called method `initialize' is defined here
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/devise-4.7.3/lib/devise/test/controller_helpers.rb:35: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rails-controller-testing-1.0.5/lib/rails/controller/testing/template_assertions.rb:60: warning: The called method `process' is defined here
...................../Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/state_machines-activerecord-0.6.0/lib/state_machines/integrations/active_record.rb:511: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/suppressor.rb:43: warning: The called method `save' is defined here
WARNING: Active Record does not support composite primary key.
project_authorizations has composite primary key. Composite primary key is ignored.
......./Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/app/controllers/import/gitea_controller.rb:73: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/lib/gitlab/url_blocker.rb:22: warning: The called method `validate!' is defined here
............./Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/app/services/import/github_service.rb:71: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/lib/gitlab/url_blocker.rb:68: warning: The called method `blocked_url?' is defined here
........................../Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/app/services/import/bitbucket_server_service.rb:82: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/lib/gitlab/url_blocker.rb:68: warning: The called method `blocked_url?' is defined here
............
Finished in 41.64 seconds (files took 54.77 seconds to load)
79 examples, 0 failures
After
→ be rspec spec/controllers/import/bulk_imports_controller_spec.rb spec/controllers/import/fogbugz_controller_spec.rb spec/controllers/import/gitea_controller_spec.rb spec/services/import/bitbucket_server_service_spec.rb spec/services/import/github_service_spec.rb
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/acts-as-taggable-on-6.5.0/lib/acts_as_taggable_on/tagging.rb:9: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/associations.rb:1657: warning: The called method `belongs_to' is defined here
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/marginalia-1.9.0/lib/marginalia.rb:94: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/postgresql_adapter.rb:648: warning: The called method `execute_and_clear_without_marginalia' is defined here
/Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/app/workers/concerns/worker_context.rb:8: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/Developer/GitLab/gitlab-development-kit/gitlab/lib/gitlab/application_context.rb:33: warning: The called method `initialize' is defined here
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/devise-4.7.3/lib/devise/test/controller_helpers.rb:35: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rails-controller-testing-1.0.5/lib/rails/controller/testing/template_assertions.rb:60: warning: The called method `process' is defined here
...................../Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/state_machines-activerecord-0.6.0/lib/state_machines/integrations/active_record.rb:511: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/ck3g/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.3/lib/active_record/suppressor.rb:43: warning: The called method `save' is defined here
WARNING: Active Record does not support composite primary key.
project_authorizations has composite primary key. Composite primary key is ignored.
..........................................................
Finished in 46.76 seconds (files took 47.98 seconds to load)
79 examples, 0 failures
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Merge request reports
Activity
changed milestone to %13.7
added backend deprecation grouprespond maintenancerefactor ruby labels
2 Warnings Please add a throughput label to this merge request. You've made some app changes, but didn't add any tests.
That's OK as long as you're refactoring existing code,
but please consider adding any of the tooling, ~"tooling::pipelines", ~"tooling::workflow", documentation, QA labels.1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, run the following:
bin/changelog -m 49457 "Fixing kwargs deprecation warnings for 2.7"
If you want to create a changelog entry for GitLab EE, run the following instead:
bin/changelog --ee -m 49457 "Fixing kwargs deprecation warnings for 2.7"
If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited, or the chosen person is unavailable.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Category Reviewer Maintainer backend Tetiana Chupryna ( @brytannia
) (UTC+2, 1 hour ahead of@ck3g
)James Fargher ( @proglottis
) (UTC+13, 12 hours ahead of@ck3g
)If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by 🤖 GitLab Bot 🤖- Resolved by James Fargher
Hey @dskim_gitlab could you please review this one?
assigned to @dskim_gitlab
- Resolved by James Fargher
assigned to @proglottis and unassigned @dskim_gitlab
enabled an automatic merge when the pipeline for 8921e786 succeeds
mentioned in commit 43667b2f
added workflowstaging label
added workflowcanary label and removed workflowstaging label
mentioned in issue gitlab-com/www-gitlab-com#6581 (closed)
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
added workflowproduction label and removed workflowcanary label