SUSE / Portus

Authorization service and frontend for Docker registry (v2)
http://port.us.org/
Apache License 2.0
3k stars 471 forks source link

NoMethodError (API::Entities::Repositories missing attribute `description' on #<Repository:0xXXX) #2236

Closed jloehel closed 4 years ago

jloehel commented 4 years ago

Description

I have a running docker compose stack with Portus 2.5 + one modification:

RUN chmod +x /init && \ 

... which is missing in the official release from docker hub. (#2200 ). Repositories are not displayed correctly.

Steps to reproduce

  1. Push a new image to registry.my.com/foobar
  2. Click on the <registry.my.com/foobar> link in the panel repositories
  3. Error: If you are the application owner check the logs for more information.

Logs:

Started GET "/repositories/1" for 31.16.250.125 at 2019-10-07 11:45:20 +0000,
Processing by RepositoriesController#show as HTML,
  Parameters: {"id"=>"1"},
Completed 500 Internal Server Error in 20ms (ActiveRecord: 3.9ms),
NoMethodError (API::Entities::Repositories missing attribute `description' on #<Repository:0x0000560716067c28>):

Deployment information

Deployment method: Modified docker compose stack

Configuration: [schema] Selected the schema for mysql [Mailer config] Host: portus.test.lan [Mailer config] Protocol: https:// Evaluated configuration:

---
email:
  from: portus@example.com
  name: Portus
  reply_to: ''
  smtp:
    enabled: false
    address: smtp.example.com
    port: 587
    domain: example.com
    ssl_tls: ''
    enable_starttls_auto: false
    openssl_verify_mode: none
    ca_path: ''
    ca_file: ''
    user_name: ''
    password: "****"
    authentication: login
gravatar:
  enabled: true
delete:
  enabled: true
  contributors: false
  garbage_collector:
    enabled: false
    older_than: 30
    keep_latest: 5
    tag: ''
ldap:
  enabled: false
  hostname: ldap_hostname
  port: 389
  timeout: 5
  encryption:
    method: ''
    options:
      ca_file: ''
      ssl_version: TLSv1_2
  base: ''
  admin_base: ''
  group_base: ''
  filter: ''
  uid: uid
  authentication:
    enabled: false
    bind_dn: ''
    password: "****"
  group_sync:
    enabled: true
    default_role: viewer
  guess_email:
    enabled: false
    attr: ''
oauth:
  local_login:
    enabled: true
  google_oauth2:
    enabled: false
    id: ''
    secret: ''
    domain: ''
    options:
      hd: ''
  open_id:
    enabled: false
    identifier: ''
    domain: ''
  openid_connect:
    enabled: false
    issuer: ''
    identifier: ''
    secret: ''
  github:
    enabled: false
    client_id: ''
    client_secret: ''
    organization: ''
    team: ''
    domain: ''
  gitlab:
    enabled: false
    application_id: ''
    secret: ''
    group: ''
    domain: ''
    server: ''
  bitbucket:
    enabled: false
    key: ''
    secret: ''
    domain: ''
    options:
      team: ''
first_user_admin:
  enabled: true
signup:
  enabled: "'false'"
check_ssl_usage:
  enabled: true
registry:
  jwt_expiration_time:
    value: 15
  catalog_page:
    value: 100
  timeout:
    value: 2
  read_timeout:
    value: 120
machine_fqdn:
  value: portus.loehel.de
display_name:
  enabled: false
user_permission:
  change_visibility:
    enabled: true
  create_team:
    enabled: true
  manage_team:
    enabled: true
  create_namespace:
    enabled: true
  manage_namespace:
    enabled: true
  create_webhook:
    enabled: true
  manage_webhook:
    enabled: true
  push_images:
    policy: allow-teams
security:
  clair:
    server: ''
    health_port: 6061
    timeout: 900
  zypper:
    server: ''
  dummy:
    server: ''
anonymous_browsing:
  enabled: true
background:
  registry:
    enabled: true
  sync:
    enabled: true
    strategy: initial
pagination:
  per_page: 10
  before_after: 2

Portus version: 2.5.0-dev@53bd63e299f47f1761f55ba2bc53b9cb804c1616

stale[bot] commented 4 years ago

Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

eloigabal commented 2 years ago

I just was able to correct this error by login in to the mariaDB database and adding the column description in it.

alter table repositories add column description varchar(15);

I think this column should be added in the database creation by the application, but anyone can use it as a work arround.