-
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
#917 Rultor should not ask architect to confirm merge on a closed PR #1048
Conversation
@dskalenko Thanks, I will find someone to review this PR soon |
@carlosmiranda could you review this pull request |
@dskalenko looks pretty good, thanks! |
@rultor merge |
@carlosmiranda Thanks for your request. @original-brownbear Please confirm this. |
@dskalenko it seems to me like this is way too big a change for a very small issue, but maybe I'm missing something :) To me it looks like we have exactly one use case of
|
* @since 2.0 | ||
* @checkstyle MultipleStringLiteralsCheck (500 lines) | ||
*/ | ||
public final class QnIfOpenTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dskalenko these all make sense, but do we actually have a test reproducing the issue anywhere in the new code?
I mean we should have one, where a non-architect asks to merge right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@original-brownbear
we don't have test reproducing the issue, and I agree with you, that would be nice to have it. And it should be like integration test for all chain (with using Agents.java) to correctly cover this case. But I guess that integration test it's not the scope of this issue , and if we want to have it we should create new ticket. Correct me if I am wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dskalenko a test for a bug is never out of the scope of the issue, see here: http://www.yegor256.com/2015/06/22/valid-reasons-to-reject-bug-fix.html#it-doesn-39-t-reproduce-the-issue .
@original-brownbear |
@dskalenko please see my remark about the test in the above first. Look the issue here is this: The ticket asks for You created A huge change-set refactoring the recognition of whether or not a PR is open and tests for that. If you thought that this was too much work for this one issue, you should have started from the test not the fix. I simply cannot merge a fix that has not proper tests and deploy it to production. At any rate, the logic you created appears sound so don't worry :) |
@original-brownbear |
@dskalenko any news here ? |
…osed PR add IT case
@original-brownbear |
@dskalenko now we're at about 1.2k lines changed after I specifically said this :(
Please read that paragraph carefully. After you did, please tell me, do you see any way to reduce the scope of this change? Is all the refactoring you did actually necessary to resolve this issue ? |
Thanks a lot, I have read it a lot of times and I see the point :)
and
Basically I have changed not a lot of logic, most of my changes are tests which in my opinion keep the code safe. If you think any of them are redundant I can simply remove it, but I want to point out that I've created IT case which really test something. (I didn't find anything similar before)
I don't want to waste your and my time, please provide concrete actions for me to do |
Small preamble :) At any rate I'm on it reviewing it now. |
* @return TRUE if issue not pull request | ||
* @throws IOException If there is any I/O problem | ||
*/ | ||
private static boolean isNotPull(final Issue.Smart issue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dskalenko what's the point of adding this method if we already have the method isPull
on the issue ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@original-brownbear
I was trying to avoid PMD warning suppress
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dskalenko what warning ? Can you please give the specific warning you're not getting by using this but getting when directly using the issue methods ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@original-brownbear
sorry didn't specify
Avoid if (x != y) ..; else ..; (ConfusingTernary)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dskalenko just flip the if and else then.
if(x!=y) {foo} else {bar} => if(x==y){bar} else {foo}
@Test | ||
public void processesMerge() throws Exception { | ||
final AgentsITCase.MockGithub github = | ||
// @checkstyle MultipleStringLiterals (500 line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dskalenko this suppression is wrong, please don't use it and rather use local variables/constants properly.
Also why 500 lines ?
@dskalenko please see a number of comments. |
@original-brownbear
always return HTTP_OK, but I need HTTP_NO_CONTENT according to QnFollow logic. |
@dskalenko why do you need to change the agents behaviour in the first place ? Honestly if a fix this small requires an additional few hundred lines of tests this leaves exactly two possible explanations:
The later is evidently the case here, given that you needed to adjust code around handling a The String you don't want to show is only used in |
@original-brownbear
Please let me know how we should proceed |
@dskalenko the issue is extremely simple here, and I've been trying my best to bring this across ever since looking into this (also it's explained in detail in the link I posted).
So, to bring this to a conclusion one way or another. This fix simply violates our procedures and I quote from the linked article again:
Procedure you may discuss in https://github.com/teamed/xdsd, but here is not the place. Given that this really is a very standard situation this discussion ends here. You are free to either:
|
@carlosmiranda 10 mins added to @original-brownbear account (our architect), payment ID is |
Rultor should not ask architect to confirm merge on a closed PR #917