这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Oct 17, 2018

It's the g-branch start to the horror that got merged earlier today for https://bugzilla.redhat.com/show_bug.cgi?id=1618530

It's an attempt to 1) delete the system retirer that was previously in place, 2) add the requester info to the raise_retirement_event, and 3) remove User.current_user references from all places in retirement except through the UI, as well as 4) fixing the listed bug.

@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 17, 2018

@miq-bot add_label bug, blocker

@miq-bot miq-bot changed the title [WIP] Add requester info to raise_retirement_event [GAPRINDASHVILI] [WIP] Add requester info to raise_retirement_event Oct 17, 2018
@miq-bot miq-bot added the wip label Oct 17, 2018
@d-m-u d-m-u force-pushed the fixing_retirement_user_on_gap branch from 35bd150 to e6fd1f2 Compare October 17, 2018 19:04
@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 18, 2018

@miq-bot assign @gmcculloug

@gmcculloug
Copy link
Member

@d-m-u fyi, PRs to release branches should be assigned to @simaishi. I have no power here. 😉

@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 18, 2018

but MOOOOARRRR EMAILS
sorry. yes.

@kbrock
Copy link
Member

kbrock commented Oct 22, 2018

This is looking good - the test failures make sense.

Are you still working on this?
Or did this PR in master make this PR irrelevant?

@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 22, 2018

Still working on this.

@d-m-u d-m-u force-pushed the fixing_retirement_user_on_gap branch 2 times, most recently from 2164d1a to 13f228a Compare October 23, 2018 21:39
@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 23, 2018

@miq-bot assign @gmcculloug
@miq-bot add_reviewer @tinaafitz
@miq-bot add_reviewer @bdunne
@miq-bot add_reviewer @kbrock

sorry about this, people, i swear we're almost done retiring.

@miq-bot miq-bot assigned gmcculloug and unassigned simaishi Oct 23, 2018
@d-m-u d-m-u force-pushed the fixing_retirement_user_on_gap branch from 13f228a to a569caf Compare October 23, 2018 21:53
@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 23, 2018

@miq-bot remove_label wip

@d-m-u d-m-u changed the title [GAPRINDASHVILI] [WIP] Add requester info to raise_retirement_event [GAPRINDASHVILI] Add requester info to raise_retirement_event Oct 23, 2018
@miq-bot miq-bot removed the wip label Oct 23, 2018
@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 23, 2018

@miq-bot assign @simaishi
whooops sorry

@miq-bot miq-bot assigned simaishi and unassigned gmcculloug Oct 23, 2018
@d-m-u d-m-u force-pushed the fixing_retirement_user_on_gap branch 3 times, most recently from eed6785 to f60eaf4 Compare October 24, 2018 12:54
@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 25, 2018

@tinaafitz could you please take a look at this? i have fruit snacks...

@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 29, 2018

@kbrock, any chance I could get you to re-review please?

@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 30, 2018

@bdunne sorry but could I please get you to take another look at this, as well?

end

def q_user_info(q_options, requester)
if requester.present?
Copy link
Member

Choose a reason for hiding this comment

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

Do you need the present? check? It should be nil or a User object, right?


def q_user_info(q_options, requester)
if requester.present?
if requester.kind_of?(String)
Copy link
Member

Choose a reason for hiding this comment

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

Does this ever get called with a string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup! It can!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@d-m-u d-m-u force-pushed the fixing_retirement_user_on_gap branch 2 times, most recently from 88cb976 to 9aa105e Compare October 30, 2018 15:06
Copy link
Member

@kbrock kbrock left a comment

Choose a reason for hiding this comment

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

I found one change (the "admin" one) and 2 nits.

Since this is a backport, do we really want to be making any minor changes to this? It will just cause issues when we are backporting other code in the future.

I feel as if we should make those changes to master and only tweak the backport if there are actual bugs. So maybe ignore all my suggestions?

event_hash[retirement_base_model_name.underscore.to_sym] = self
event_hash[:host] = host if self.respond_to?(:host)
def system_context_requester
if try(:evm_owner_id)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if try(:evm_owner_id)
if evm_owner_id

requester = User.find_by(:userid => requester)
end
q_options[:user_id] = requester.id
q_options[:group_id] = requester.current_group.id if requester.current_group
Copy link
Member

Choose a reason for hiding this comment

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

Heh - this makes me reference the code every time I see it - It is not necessary since the very next line is looking up the current_group and all, but I feel like this is better form. (sorry, think you probably introduced this from my suggestion before)

Suggested change
q_options[:group_id] = requester.current_group.id if requester.current_group
q_options[:group_id] = requester.current_group_id if requester.current_group_id

@d-m-u
Copy link
Contributor Author

d-m-u commented Nov 1, 2018

"I feel as if we should make those changes to master and only tweak the backport if there are actual bugs." I feel this way too, so anyone who's tagged on this who'd like to approve it, I'd be pretty grateful, cause I'd like to be able to close this bug sometime this century.

Copy link
Member

@tinaafitz tinaafitz left a comment

Choose a reason for hiding this comment

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

@d-m-u Looks good.

@tinaafitz
Copy link
Member

@mkanoor Please review.

@miq-bot
Copy link
Member

miq-bot commented Nov 2, 2018

Checked commit https://github.com/d-m-u/manageiq/commit/051cb5f19eab9e1659a664dbcbbb705f053fae6c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
4 files checked, 0 offenses detected
Everything looks fine. 👍

Copy link
Member

@kbrock kbrock left a comment

Choose a reason for hiding this comment

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

This looks good.

We are coming up with a number of valid nit-picks.

BUT, we should be making those suggestions on master not on a back port.
Introducing something here and not on master will make future merging difficult.

@simaishi simaishi merged commit fc23f2c into ManageIQ:gaprindashvili Nov 5, 2018
@simaishi simaishi added this to the Sprint 98 Ending Nov 5, 2018 milestone Nov 5, 2018
@d-m-u d-m-u deleted the fixing_retirement_user_on_gap branch February 1, 2019 20:48
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.

8 participants