Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #28291 - Error in sync status after upgrade #8439

Merged
merged 1 commit into from Nov 19, 2019
Merged

Conversation

sjha4
Copy link
Member

@sjha4 sjha4 commented Nov 18, 2019

This action was changed in 3.14 and so was the presenter. For new syncs, the task has the input as repo_id. However, prior to 3.14, the task has input of pulp_id. Therefore, the presenter for old actions needs to look at pulp_id since repo_id wasn't available before that.

To reproduce:

  1. Sync a repo on 3.13.
  2. Upgrade to 3.14.
  3. Go to content>sync status page.

@theforeman-bot
Copy link

Issues: #28291

@@ -66,7 +66,8 @@ def run_progress_weight
end

def presenter
repo = ::Katello::Repository.find(input['repo_id'])
repo = ::Katello::Repository.find(input['repo_id']) if input['repo_id']
repo = ::Katello::Repository.where(:pulp_id => input['pulp_id']).first if (!repo && input['pulp_id'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpic: you could use repo ||= and avoid the !repo check

I would also probably add a comment to explain that older sync tasks could use the pulp_id (otherwise it might get removed in the future. Otherwise, looks good!

@jlsherrill jlsherrill self-assigned this Nov 19, 2019
@sjha4 sjha4 merged commit 9c90664 into Katello:master Nov 19, 2019
jturel pushed a commit to jturel/katello that referenced this pull request Nov 20, 2019
jturel pushed a commit that referenced this pull request Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants