Project

General

Profile

Bug #28156

db seed failure: ArgumentError: Malformed version number string >= 3.1.0

Added by Ohad Levy 12 months ago. Updated 12 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
No
Bugzilla link:

Description

ake aborted!
ArgumentError: Malformed version number string >= 3.1.0
/home/foreman/git/foreman/lib/seed_helper.rb:172:in `block in test_template_requirements'
/home/foreman/git/foreman/lib/seed_helper.rb:166:in `each'
/home/foreman/git/foreman/lib/seed_helper.rb:166:in `test_template_requirements'
/home/foreman/git/foreman/lib/seed_helper.rb:119:in `import_raw_template'
/home/foreman/git/foreman/lib/seed_helper.rb:138:in `block in import_templates'
/home/foreman/git/foreman/lib/seed_helper.rb:137:in `each'
/home/foreman/git/foreman/lib/seed_helper.rb:137:in `import_templates'
/home/foreman/git/foreman/db/seeds.d/090-report_templates.rb:3:in `block in <top (required)>'
/home/foreman/gems/gems/audited-4.9.0/lib/audited/auditor.rb:376:in `without_auditing'
/home/foreman/git/foreman/db/seeds.d/090-report_templates.rb:2:in `<top (required)>'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `load'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `block in load'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `load'
/home/foreman/git/foreman/db/seeds.rb:36:in `block (2 levels) in <top (required)>'
/home/foreman/git/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'
/home/foreman/git/foreman/app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
/home/foreman/git/foreman/db/seeds.rb:35:in `block in <top (required)>'
/home/foreman/git/foreman/db/seeds.rb:29:in `each'
/home/foreman/git/foreman/db/seeds.rb:29:in `<top (required)>'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `load'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `block in load'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `load'
/home/foreman/gems/gems/railties-5.2.1/lib/rails/engine.rb:551:in `load_seed'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/tasks/database_tasks.rb:281:in `load_seed'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/railties/databases.rake:194:in `block (2 levels) in <top (required)>'
/home/foreman/gems/gems/rake-13.0.0/exe/rake:27:in `<top (required)>'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `load'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:28:in `run'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/cli.rb:465:in `exec'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/cli.rb:27:in `dispatch'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/cli.rb:18:in `start'
/home/foreman/gems/gems/bundler-2.0.2/exe/bundle:30:in `block in <top (required)>'
/home/foreman/gems/gems/bundler-2.0.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/foreman/gems/gems/bundler-2.0.2/exe/bundle:22:in `<top (required)>'
/opt/rh/rh-ruby24/root/usr/bin/bundle:22:in `load'
/opt/rh/rh-ruby24/root/usr/bin/bundle:22:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

Associated revisions

Revision 34f4357d (diff)
Added by Marek Hulán 12 months ago

Fixes #28156 - properly specify requirements

Only version number can be specified, they always mean minimum version.
Also default value of yes or no needs to be wrapped in quotes so it's
considered a String by YAML. Otherwise it auto converts it to true/false
which then fails validation of the default being one of defined options
(yes/no).

History

#1 Updated by Marek Hulán 12 months ago

  • Priority changed from Normal to High

Ok, this is caused by ansible_inventory.erb, we need to remove the '>= ' from version. As a workaround, drop this line from metadata.

#2 Updated by Marek Hulán 12 months ago

  • Fixed in Releases 1.24.0 added

#3 Updated by The Foreman Bot 12 months ago

  • Assignee set to Marek Hulán
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/community-templates/pull/655 added

#4 Updated by Tomer Brisker 12 months ago

  • Target version set to 1.24.0
  • Fixed in Releases deleted (1.24.0)

#5 Updated by The Foreman Bot 12 months ago

  • Fixed in Releases 2.0.0 added

#6 Updated by The Foreman Bot 12 months ago

  • Pull request https://github.com/theforeman/community-templates/pull/656 added

#7 Updated by Marek Hulán 12 months ago

  • Status changed from Ready For Testing to Closed

#8 Updated by Marek Hulán 12 months ago

  • Fixed in Releases 1.24.0 added
  • Fixed in Releases deleted (2.0.0)

#9 Updated by Tomer Brisker 12 months ago

  • Category set to Templates

Also available in: Atom PDF