Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1512562 - "foreman-rake foreman_tasks:export_tasks" fails with "missing run_prettify.js" error [NEEDINFO]
Summary: "foreman-rake foreman_tasks:export_tasks" fails with "missing run_prettify.js...
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Tasks Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: Unspecified
Assignee: Adam Ruzicka
QA Contact: Renzo Nuccitelli
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-13 14:20 UTC by Radovan Drazny
Modified: 2019-04-01 20:27 UTC (History)
6 users (show)

Fixed In Version: rubygem-foreman-tasks-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
bbuckingham: needinfo? (mmccune)

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 21655 None None None 2017-11-14 11:03:26 UTC
Red Hat Bugzilla 1462739 None CLOSED /foreman_tasks/dynflow/vendor/google-code-prettify/run_prettify.js points to google 2019-03-24 04:11:34 UTC

Internal Links: 1462739

Description Radovan Drazny 2017-11-13 14:20:06 UTC
Description of problem:
According to it is possible to export Satellite 6 tasks using the following command: 

    $ foreman-rake foreman_tasks:export_tasks

Running it on Satellite 6.3 ends with a Ruby traceback.

Version-Release number of selected component (if applicable):
Satellite 6.3 Snap 24

How reproducible:

Steps to Reproduce:
1. Have some tasks on Sat 6.3 server 
2. Run "foreman-rake foreman_tasks:export_tasks task_search=all" as described in

Actual results:

$ foreman-rake foreman_tasks:export_tasks task_search=all
Gathering 147697 tasks.
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/web/assets/vendor/google-code-prettify/run_prettify.js
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:217:in `block in copy_assets'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:214:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:214:in `copy_assets'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:251:in `block (3 levels) in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6/lib/foreman_tasks/tasks/export_tasks.rake:250:in `block (2 levels) in <top (required)>'
Tasks: TOP => foreman_tasks:export_tasks
(See full trace by running task with --trace)

Expected results:
Tasks are exported successfully.

Additional info:
The missing dependency can be found at Copying content of to manually created /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/web/assets/vendor/google-code-prettify directory resolves the problem.

Comment 5 Adam Ruzicka 2017-11-14 11:03:24 UTC
Created redmine issue from this bug

Comment 6 Adam Ruzicka 2017-11-14 11:07:29 UTC
Linked BZ removed the prettify js from dynflow. foreman-tasks tried to include the removed js from dynflow into the task export.

Comment 7 2017-11-14 13:13:38 UTC
Upstream bug assigned to

Comment 8 2017-11-14 13:13:40 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue has been resolved.

Comment 10 Evgeni Golov 2017-11-18 10:36:37 UTC
back to modified, we had to untag this last minute

Comment 11 Evgeni Golov 2017-11-21 15:10:09 UTC
% brew tag-build satellite-6.3.0-rhel-7-candidate tfm-rubygem-foreman-tasks-
Created task 14595303
Watching tasks (this may be safely interrupted)...
14595303 tagBuild (noarch): free
14595303 tagBuild (noarch): free -> open (
14595303 tagBuild (noarch): open ( -> closed
  0 free  0 open  1 done  0 failed

14595303 tagBuild (noarch) completed successfully

Comment 12 Renzo Nuccitelli 2018-01-04 12:34:22 UTC
Worked on Satellite snap 30:

# foreman-rake foreman_tasks:export_tasks
Gathering 4 tasks.
tar cvzf /tmp/task-export-1515069228.tar.gz /tmp/task-export20180104-8178-17j9rzd > /dev/null
tar: Removing leading `/' from member names
Created /tmp/task-export-1515069228.tar.gz

Comment 13 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> >

Note You need to log in before you can comment on or make changes to this bug.