-
Notifications
You must be signed in to change notification settings - Fork 156
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
Bug in QnByArchitect.understand(...) #1105
Comments
@alex-palevsky I think this issue is pretty urgent. |
@alex-palevsky @original-brownbear I made PR #1106 for this issue. |
@alex-palevsky ping |
@amihaiemil I'm aware of the PR/Issue, will review shortly. Sorry many things going on right now, but this is on the radar for today for me :) |
@original-brownbear sure, thanks : ) |
@amihaiemil I think this is the intended behaviour but I may be misunderstanding the issue. From what I understand you criticise the face that this happens:
I think if its commanders only in step two this is not a bug right ? At least I did always take this for the intended behaviour. Or do you see an issue with this ? |
@original-brownbear If you test the method in isolation (see unit test), then it can be anyone in step 2, not just commanders. I dont know the whole code yet, maybe there's a layer on top of it which only lets commanders talk to rultor. But even if it lets just commanders, it looks a bit inconsistent to me, since the same commander, with the same command needs approval on other issues that are not authored by the architect. We can test this easily if you make a small pr, i would say "merge" and see how it acts. |
@original-brownbear as you can see, in PR #1107 I told rultor to merge and he asked you to confirm it, which means the method here was called with my Profile; If you were the PRs author it would have merged, exactly like the unit test. |
@original-brownbear it's also not called somewhere else in the code. Simply search the repo for the string "QnByArchitect.denied" (the key of the message from phrases_en_US.properties )and you will see it's only used in the method in cause. |
@original-brownbear from my point of view this bug is confirmed :) |
@amihaiemil yea you're right. Also this at least extends to the |
@alex-palevsky valid bug. |
@original-brownbear Can this also be assigned to me since I made a PR with the fix? (I'm not sure if I can be both author and resolver) |
@original-brownbear added "bug" tag to this issue |
@alex-palevsky assign me here please. |
@amihaiemil I set the milestone to 2.0 since there is nothing set yet |
@amihaiemil thanks for tis bug, I topped your account for 15 mins, transaction |
@alex-palevsky assign me here please. |
@amihaiemil thanks |
@original-brownbear can I have this assigned to me? |
@amihaiemil let me find out, you're not on the Rultor team so I need to ask first :) see below in a sec. |
@yegor256 can I assign @amihaiemil here, despite him not being on the team? Seems he did some work towards fixing this already. |
@yegor256 can you have a look here? Thanks |
@yegor256 ping |
@yegor256 ping |
@original-brownbear yes, you can, but keep in mind that it's a bad (very bad) practice to have the same person as a bug reporter and a bug fixer |
@yegor256 yup, well see below anyhow. |
@amihaiemil sorry not really as a result of @yegor256 's comment above alone, but more the fact that the PR does not fully resolve the issue ( and introduce a new one, will put the effort of explaining why that is so later ) + CR has not been assigned yet I'd rather postpone this one in favour of more pressing EC2 ones. |
@alex-palevsky this is postponed. |
@original-brownbear sure, no worries |
@original-brownbear thanks, I added "postponed" label |
@original-brownbear got it, someone else will be assigned soon |
In method QnByArchitect.understand(...), the decision wether rultor understands the request or asks the architect to confirm is based on
boolean legal
which is determined like this:where
logins
(btw, I would name itarchitects
), contains the architects' logins.This means that if an architect makes a PR (maybe he wants to have it in history of merges and not make the commit directly on master) or any other kind of issue, I can go and give commands to rultor and it will process them.
This is because the conditions above translate to false, false, true - there are architects declared for the project; the comment author is not an architect, but the issue author is an architect.
I tested this with the following unit test, which fails:
Notice that Jeff is both issue author and project architect and amihaiemil gives the command to rultor.
Fix:
remove the condition
After the bug is fixed it would also be nice to add this unit test to
QnByArchitectTest
The text was updated successfully, but these errors were encountered: