You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2020/02/20 13:52:38 UTC

[all] How PRs could be better

Hi All:

I wonder if any of you have an ideas regarding the following.

When looking at _some_ PRs (that are green on GitHub, build with tests and
other checks passing, able merge OK), I like to apply only the test changes
locally and verify that the main code fails. Then I continue my
evaluation.  Obviously if a new or modified test passes, the test or main
change is no good. So yes, a new test for new main code would not even
compile and that's OK.

It think it would be great if GH could be made to do this two step for us:
- The tests should fail if only the test changes are applied, if not the PR
is red.
- If the tests fail, then GH can evaluate the whole PR.

How the tests fail and where I'll leave aside for now.

Thoughts?

Gary

Re: [all] How PRs could be better

Posted by Amey Jadiye <am...@gmail.com>.
We might need to develop a plugin to achieve this, and yes as Jochen
mentioned this is just a scenario for bug fixes, not for new
functionality and enhancements.

1. Plugin must-have functionality like sure-fire to execute the test cases.
2. Plugin must have the functionality to use git, so it can access (HEAD-1)
version of src/main/java
3. Plugin should have the functionality to compile [HEAD-1] src and
/src/test/java
4. Call this plugin:check in defaultGoals in pom.xml so GH will mark PR red
for problems.

Regards,
Amey

On Thu, Feb 20, 2020 at 7:23 PM Gary Gregory <ga...@gmail.com> wrote:

> Hi All:
>
> I wonder if any of you have an ideas regarding the following.
>
> When looking at _some_ PRs (that are green on GitHub, build with tests and
> other checks passing, able merge OK), I like to apply only the test changes
> locally and verify that the main code fails. Then I continue my
> evaluation.  Obviously if a new or modified test passes, the test or main
> change is no good. So yes, a new test for new main code would not even
> compile and that's OK.
>
> It think it would be great if GH could be made to do this two step for us:
> - The tests should fail if only the test changes are applied, if not the PR
> is red.
> - If the tests fail, then GH can evaluate the whole PR.
>
> How the tests fail and where I'll leave aside for now.
>
> Thoughts?
>
> Gary
>


-- 

---------------------------------------------------------------------

To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org

For additional commands, e-mail: dev-help@commons.apache.org

Re: [all] How PRs could be better

Posted by Matt Sicker <bo...@gmail.com>.
Let's just say if you can manage to generically solve this problem,
you should be nominated for the programming equivalent of a Nobel.

On Thu, 20 Feb 2020 at 10:36, Xu Jin <xe...@gmail.com> wrote:
>
> It is hard for github to detect what code is test...
> Not all players follows the rule to puting tests into /test/java...
> If you really want this feature maybe we shall write a maven plugin for loading tests from other version of a same project.
>
> ________________________________
> 发件人: Gary Gregory <ga...@gmail.com>
> 发送时间: 2020年2月20日 21:52
> 收件人: Commons Developers List <de...@commons.apache.org>
> 主题: [all] How PRs could be better
>
> Hi All:
>
> I wonder if any of you have an ideas regarding the following.
>
> When looking at _some_ PRs (that are green on GitHub, build with tests and
> other checks passing, able merge OK), I like to apply only the test changes
> locally and verify that the main code fails. Then I continue my
> evaluation.  Obviously if a new or modified test passes, the test or main
> change is no good. So yes, a new test for new main code would not even
> compile and that's OK.
>
> It think it would be great if GH could be made to do this two step for us:
> - The tests should fail if only the test changes are applied, if not the PR
> is red.
> - If the tests fail, then GH can evaluate the whole PR.
>
> How the tests fail and where I'll leave aside for now.
>
> Thoughts?
>
> Gary



-- 
Matt Sicker <bo...@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


回复: [all] How PRs could be better

Posted by Xu Jin <xe...@gmail.com>.
It is hard for github to detect what code is test...
Not all players follows the rule to puting tests into /test/java...
If you really want this feature maybe we shall write a maven plugin for loading tests from other version of a same project.

________________________________
发件人: Gary Gregory <ga...@gmail.com>
发送时间: 2020年2月20日 21:52
收件人: Commons Developers List <de...@commons.apache.org>
主题: [all] How PRs could be better

Hi All:

I wonder if any of you have an ideas regarding the following.

When looking at _some_ PRs (that are green on GitHub, build with tests and
other checks passing, able merge OK), I like to apply only the test changes
locally and verify that the main code fails. Then I continue my
evaluation.  Obviously if a new or modified test passes, the test or main
change is no good. So yes, a new test for new main code would not even
compile and that's OK.

It think it would be great if GH could be made to do this two step for us:
- The tests should fail if only the test changes are applied, if not the PR
is red.
- If the tests fail, then GH can evaluate the whole PR.

How the tests fail and where I'll leave aside for now.

Thoughts?

Gary

Re: [all] How PRs could be better

Posted by Jochen Wiedmann <jo...@gmail.com>.
I understand your intention, *if* the PR is a bug fix. But, what about the
others?


On Thu, Feb 20, 2020, 14:53 Gary Gregory <ga...@gmail.com> wrote:

> Hi All:
>
> I wonder if any of you have an ideas regarding the following.
>
> When looking at _some_ PRs (that are green on GitHub, build with tests and
> other checks passing, able merge OK), I like to apply only the test changes
> locally and verify that the main code fails. Then I continue my
> evaluation.  Obviously if a new or modified test passes, the test or main
> change is no good. So yes, a new test for new main code would not even
> compile and that's OK.
>
> It think it would be great if GH could be made to do this two step for us:
> - The tests should fail if only the test changes are applied, if not the PR
> is red.
> - If the tests fail, then GH can evaluate the whole PR.
>
> How the tests fail and where I'll leave aside for now.
>
> Thoughts?
>
> Gary
>