Project

General

Profile

Bug #34862

Rails 6.1 upgrade raising errors on server startup

Added by Partha Aji about 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tooling
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Based of
https://community.theforeman.org/t/upgrading-rails-to-6-1-and-plugins/27558/3

  • Checkout https://github.com/theforeman/foreman/pull/9117
  • Checkout latest master
  • bundle update rails
  • Assuming 6.1 got installed, start the server
    Error along the lines of
         1: from /home/vagrant/katello/app/controllers/katello/api/v2/repositories_controller.rb:10:in `<class:RepositoriesController>'
    /home/vagrant/katello/app/controllers/katello/api/v2/repositories_controller.rb:10:in `concat': can't modify frozen Array: ["id", "name", "created_at", "updated_at", "major", "minor", "gpg_key_id", "content_id", "arch", "label", "url", "unprotected", "content_type", "product_id", "checksum_type", "pulp_scratchpad_checksum_type", "docker_upstream_name", "download_policy", "verify_ssl_on_sync", "upstream_username", "upstream_password", "deb_releases", "deb_components", "deb_architectures", "ssl_ca_cert_id", "ssl_client_cert_id", "ssl_client_key_id", "ignorable_content", "include_tags", "description", "ansible_collection_requirements", "http_proxy_policy", "http_proxy_id", "download_concurrency", "os_versions", "ansible_collection_auth_url", "ansible_collection_auth_token", "retain_package_versions_count", "generic_remote_options", "upstream_authentication_token", "mirroring_policy", "exclude_tags", "docker_tags_whitelist"] (FrozenError)
    

Associated revisions

Revision 7fa2de58 (diff)
Added by Partha Aji about 2 months ago

Fixes #34862 - Rails 6.1 updates (#10087)

In rails 6.1 the following line in repository controller was causing a
'Frozen' error.

RootRepository.attribute_names.concat(....) + generic_repo_wrap_params

In 6.1 looks like RootRepository.attribute_names is frozen so tweaked
this method a little. Also rremoved the unused ignore_global_proxy
attribute from the wrap params

Revision 89af56bd (diff)
Added by Partha Aji about 1 month ago

Fixes #34862 - Rails 6.1 unit tests (#10125)

History

#1 Updated by The Foreman Bot about 2 months ago

  • Assignee set to Partha Aji
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/10087 added

#2 Updated by Chris Roberts about 2 months ago

  • Target version set to Katello 4.5.0
  • Category set to Tooling

#3 Updated by Chris Roberts about 2 months ago

  • Triaged changed from No to Yes

#4 Updated by The Foreman Bot about 2 months ago

  • Fixed in Releases Katello 4.5.0 added

#5 Updated by Partha Aji about 2 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by The Foreman Bot about 1 month ago

  • Pull request https://github.com/Katello/katello/pull/10125 added

Also available in: Atom PDF