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

Pass credentials from ansible playbook automate methods to runner #18983

Merged
merged 1 commit into from
Jul 18, 2019

Conversation

carbonin
Copy link
Member

cc @NickLaMuro @Fryguy

This bit of code to translate the credentials is now in 4 places 😭 if any of you want to help me work out a way to DRY that up I'd be grateful. That can also come in a follow-up too ...

Here's all the places for the record:

@carbonin
Copy link
Member Author

Just to be clear, I think we can merge this as is. I don't want to block this on account of deduplicating the credential key munging.

credential_id = launch_options.delete("#{cred_type}_id".to_sym)
next if credential_id.blank?

launch_options[cred_type] = Authentication.find(credential_id).native_ref
Copy link
Member

Choose a reason for hiding this comment

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

Should we rescue ActiveRecord::RecordNotFound?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's necessary. At least it wasn't the first 3 times this method was written 😆

@carbonin carbonin force-pushed the pass_credentials_from_automate branch from 9eaf557 to 99ff901 Compare July 17, 2019 22:20
@miq-bot
Copy link
Member

miq-bot commented Jul 17, 2019

Checked commit carbonin@99ff901 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. 👍

@bdunne bdunne merged commit 42d0d42 into ManageIQ:master Jul 18, 2019
@bdunne bdunne self-assigned this Jul 18, 2019
@bdunne bdunne added this to the Sprint 116 Ending Jul 22, 2019 milestone Jul 18, 2019
@carbonin carbonin deleted the pass_credentials_from_automate branch August 16, 2019 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants