Project

General

Profile

Actions

Bug #28138

closed

Content View publish does not return a meaningful result in the task output

Added by Evgeni Golov over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When you call /katello/api/content_views/:id/publish, you get a ForemanTask, that you can poll until it's done and then analyze the result (e.g. because you now want to promote the freshly generated version to a LCE).

In 3.12.3, the result looks like this:

{'action': 'Publish content view Test Content View; organization Test Organization',
 'cli_example': None,
 'ended_at': '2019-10-25 13:16:47 UTC',
 'humanized': {'action': 'Publish',
                'errors': [],
                'input': [['conte  nt_view',
                            {'link': '/content_views/3/versions',
                             'text': 'content view Test Content View'}],
                           ['organization',
                            {'link': '/organizations/3/edit',
                             'text': 'organization Test Organization'}]],
                'output': ''},
 'id': 'a0b0cd56-3274-4026-bd8e-db6885593566',
 'input': {'content_view': {'id': 3,
                              'label': 'Test_Content_View',
                              'name': 'Test Content View'},
            'content_view_id': 3,
            'content_view_version_id': 3,
            'current_location_id': None,
            'current_organization_id': None,
            'current_request_id': None,
            'current_timezone': 'UTC',
            'current_user_i  d': 4,
            'environment_id': 2,
            'history_id': 1,
            'organization': {'id': 3,
                              'label': 'Test_Organization',
                              'name': 'Test Organization'},
            'services_checked': ['candlepin',
                                  'candlepin_auth',
                                  'pulp',
                                  'pulp_auth'],
            'user_id': 4},
 'label': 'Actions::Katello::ContentView::Publish',
 'output': {'composite_auto_publish_task_id': [],
             'composite_version_auto_published': [],
             'composite_view_publish_failed': [],
             'content_view_id': 3,
             'content_view_version_id': 3},
 'pending': False,
 'progress': 1.0,
 'result': 'success',
 'started_at': '2019-10-25 13:16:39 UTC',
 'state': 'stopped',
 'username': 'admin'}

However, on 3.13.1 it looks like this:

{'action': 'Publish content view Test Content View; organization Test Organization',
 'cli_example': None,
 'ended_at': '2019-10-25 12:33:05 UTC',
 'humanized': {'action': 'Publish',
                'errors': [],
                'input': [['content_vi  ew',
                            {'link': '/content_views/3/versions',
                             'text': 'content view Test Content View'}],
                           ['organization',
                            {'link': '/organizations/3/edit',
                             'text': 'organization Test Organization'}]],
                'output': ''},
 'id': '47e4cfd6-ed86-4957-af6a-ea74b4205b62',
 'input': {'auto_publish_composite_ids': [],
            'content_view': {'id': 3,
                              'label': 'Test_Content_View',
                              'name': 'Test Content View'},
            'content_view_id': 3,
            'content_view_version_id': 5,
            'content_view_version_name': 'Test Content View 1.0',
            'current_location_id': None,
            'current_organization_id': None,
            'current_request_id': None,
            'current_timezone': 'UTC',
            'current_user_id': 4,
            'environment_id': 2,
            'history_id': 7,
            'organization': {'id': 3,
                              'label': 'Test_Organization',
                              'name': 'Test Organization'},
            'services_checked': ['candlepin',
                                  'candlepin_auth',
                                  'pulp',
                                  'pulp_auth'],
            'user_id': 4},
 'label': 'Actions::Katello::ContentView::Publish',
 'output': {},
 'pending': False,
 'progress': 1.0,
 'result': 'success',
 'started_at': '2019-10-25 12:32:57 UTC',
 'state': 'stopped',
 'username': 'admin'}

See how the output section is empty?

Technically, I could look at the input as it also contains the content_view_version_id I care about, but it kinda feels weird to look at the task input rather output.

Actions #1

Updated by James Jeffers over 4 years ago

  • Target version set to Katello 3.13.2
  • Triaged changed from No to Yes
Actions #2

Updated by Evgeni Golov over 4 years ago

  • Bugzilla link set to 1765610
Actions #3

Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Jonathon Turel
  • Pull request https://github.com/Katello/katello/pull/8401 added
Actions #4

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases Katello 3.15.0 added
Actions #5

Updated by Jonathon Turel over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF