You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by David Smiley <da...@gmail.com> on 2023/09/06 16:43:47 UTC
Build: checkWorkingCopyClean -- is there value?
Our build, inherited from Lucene, contains a custom validation check
"checkWorkingCopyClean" which can be disabled with
"validation.git.failOnModified=false" in your gradle.properties. I always
set this; the concept of failOnModifies seems dubious to me; it annoys me.
Can an advocate of this setting speak up and tell me why it's useful?
~ David
Re: Build: checkWorkingCopyClean -- is there value?
Posted by Dawid Weiss <da...@gmail.com>.
> I think Dawid argued that the check is good to notify the
> committer that there may be uncommitted changes, but I doubt this helps.
> A warning would be fine.
>
Reviving the dead (beetlejuice, beetlejuice, ...) but here's an example
where validation.git.failOnModified helped me
figure out that google java formatter is broken on JDK 23 -
https://github.com/google/google-java-format/issues/1153
This happened on an automated CI build under the new JDK.
I can understand why people can get frustrated by this option (and it's
fine to move it to CI only)
but I just wanted to point out that the design of this check was to make
sure "precommit" actually verifies
that no local changes are present (so that you're "precommit-testing" an
actual commit to be made). If you're git-savvy and
prepare your commit by adding any changed files using git add, they're
staged/cached (waiting for the actual git commit)
and then the gradle check wouldn't fail, expecting you to commit
them, eventually.
It only fails on truly locally modified or unknown files.
The fact people are complaining is probably the best evidence it was not
clear and perhaps not needed.
Dawid
Re: Build: checkWorkingCopyClean -- is there value?
Posted by Eric Pugh <ep...@opensourceconnections.com>.
It’s bit me plenty of times as well…. I like the idea of it not being enabled by default.
> On Sep 6, 2023, at 4:49 PM, Shawn Heisey <ap...@elyograg.org> wrote:
>
> On 9/6/23 13:21, Uwe Schindler wrote:
>> The idea is that jenkins runs it after the builds to figure out if something changed in the working copy. At ANT times this was implemented exactly like this, we failed build on Jenkins when the working copy changed. This was especially important before we used SecurityManager to prevent tests writing outside their temporary dirs. We had tests touching files in working copy.
>
> That makes sense, and for Jenkins it sounds like a very good idea. I think that Jenkins should probably explicitly request that check ... having it enabled by default for everyone is not the best idea IMHO.
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | My Free/Busy <http://tinyurl.com/eric-cal>
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.
Re: Build: checkWorkingCopyClean -- is there value?
Posted by David Smiley <da...@gmail.com>.
https://github.com/apache/solr/pull/2196
~ David
On Wed, Sep 6, 2023 at 11:17 PM David Smiley <da...@gmail.com>
wrote:
> Honestly, I would prefer to do away with it entirely. Dubious logic that
> has been made to only output a warning will continue to be a part of the
> code weight of our sprawling build. It will need to be maintained[1]. It
> needs to do it's calculations on every check/precommit. I don't even want
> to be "warned" about the fact that I am modifying files. *Of course*
> there are modified files; I am actually work on this codebase!
>
> [1] even making it have a computed default is an example of this
> maintenance cost!
>
> ~ David
>
>
> On Wed, Sep 6, 2023 at 8:46 PM Michael Gibney <mi...@michaelgibney.net>
> wrote:
>
>> Something like this could work?:
>>
>>
>> https://github.com/apache/solr/blob/eaaabbfa33456639613a7a6aecc37cd2d89e5dfa/gradle/globals.gradle#L168-L171
>>
>> On Wed, Sep 6, 2023 at 5:26 PM David Smiley <da...@gmail.com>
>> wrote:
>> >
>> > Is there a property or something used to detect that the build is being
>> run
>> > in a CI or CI-like env?
>> > ~ David
>> >
>> >
>> > On Wed, Sep 6, 2023 at 4:50 PM Shawn Heisey <ap...@elyograg.org>
>> wrote:
>> >
>> > > On 9/6/23 13:21, Uwe Schindler wrote:
>> > > > The idea is that jenkins runs it after the builds to figure out if
>> > > > something changed in the working copy. At ANT times this was
>> implemented
>> > > > exactly like this, we failed build on Jenkins when the working copy
>> > > > changed. This was especially important before we used
>> SecurityManager to
>> > > > prevent tests writing outside their temporary dirs. We had tests
>> > > > touching files in working copy.
>> > >
>> > > That makes sense, and for Jenkins it sounds like a very good idea. I
>> > > think that Jenkins should probably explicitly request that check ...
>> > > having it enabled by default for everyone is not the best idea IMHO.
>> > >
>> > > Thanks,
>> > > Shawn
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
>> > > For additional commands, e-mail: dev-help@solr.apache.org
>> > >
>> > >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
>> For additional commands, e-mail: dev-help@solr.apache.org
>>
>>
Re: Build: checkWorkingCopyClean -- is there value?
Posted by David Smiley <da...@gmail.com>.
Honestly, I would prefer to do away with it entirely. Dubious logic that
has been made to only output a warning will continue to be a part of the
code weight of our sprawling build. It will need to be maintained[1]. It
needs to do it's calculations on every check/precommit. I don't even want
to be "warned" about the fact that I am modifying files. *Of course* there
are modified files; I am actually work on this codebase!
[1] even making it have a computed default is an example of this
maintenance cost!
~ David
On Wed, Sep 6, 2023 at 8:46 PM Michael Gibney <mi...@michaelgibney.net>
wrote:
> Something like this could work?:
>
>
> https://github.com/apache/solr/blob/eaaabbfa33456639613a7a6aecc37cd2d89e5dfa/gradle/globals.gradle#L168-L171
>
> On Wed, Sep 6, 2023 at 5:26 PM David Smiley <da...@gmail.com>
> wrote:
> >
> > Is there a property or something used to detect that the build is being
> run
> > in a CI or CI-like env?
> > ~ David
> >
> >
> > On Wed, Sep 6, 2023 at 4:50 PM Shawn Heisey <ap...@elyograg.org> wrote:
> >
> > > On 9/6/23 13:21, Uwe Schindler wrote:
> > > > The idea is that jenkins runs it after the builds to figure out if
> > > > something changed in the working copy. At ANT times this was
> implemented
> > > > exactly like this, we failed build on Jenkins when the working copy
> > > > changed. This was especially important before we used
> SecurityManager to
> > > > prevent tests writing outside their temporary dirs. We had tests
> > > > touching files in working copy.
> > >
> > > That makes sense, and for Jenkins it sounds like a very good idea. I
> > > think that Jenkins should probably explicitly request that check ...
> > > having it enabled by default for everyone is not the best idea IMHO.
> > >
> > > Thanks,
> > > Shawn
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > For additional commands, e-mail: dev-help@solr.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>
Re: Build: checkWorkingCopyClean -- is there value?
Posted by Michael Gibney <mi...@michaelgibney.net>.
Something like this could work?:
https://github.com/apache/solr/blob/eaaabbfa33456639613a7a6aecc37cd2d89e5dfa/gradle/globals.gradle#L168-L171
On Wed, Sep 6, 2023 at 5:26 PM David Smiley <da...@gmail.com> wrote:
>
> Is there a property or something used to detect that the build is being run
> in a CI or CI-like env?
> ~ David
>
>
> On Wed, Sep 6, 2023 at 4:50 PM Shawn Heisey <ap...@elyograg.org> wrote:
>
> > On 9/6/23 13:21, Uwe Schindler wrote:
> > > The idea is that jenkins runs it after the builds to figure out if
> > > something changed in the working copy. At ANT times this was implemented
> > > exactly like this, we failed build on Jenkins when the working copy
> > > changed. This was especially important before we used SecurityManager to
> > > prevent tests writing outside their temporary dirs. We had tests
> > > touching files in working copy.
> >
> > That makes sense, and for Jenkins it sounds like a very good idea. I
> > think that Jenkins should probably explicitly request that check ...
> > having it enabled by default for everyone is not the best idea IMHO.
> >
> > Thanks,
> > Shawn
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > For additional commands, e-mail: dev-help@solr.apache.org
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Build: checkWorkingCopyClean -- is there value?
Posted by David Smiley <da...@gmail.com>.
Is there a property or something used to detect that the build is being run
in a CI or CI-like env?
~ David
On Wed, Sep 6, 2023 at 4:50 PM Shawn Heisey <ap...@elyograg.org> wrote:
> On 9/6/23 13:21, Uwe Schindler wrote:
> > The idea is that jenkins runs it after the builds to figure out if
> > something changed in the working copy. At ANT times this was implemented
> > exactly like this, we failed build on Jenkins when the working copy
> > changed. This was especially important before we used SecurityManager to
> > prevent tests writing outside their temporary dirs. We had tests
> > touching files in working copy.
>
> That makes sense, and for Jenkins it sounds like a very good idea. I
> think that Jenkins should probably explicitly request that check ...
> having it enabled by default for everyone is not the best idea IMHO.
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>
Re: Build: checkWorkingCopyClean -- is there value?
Posted by Shawn Heisey <ap...@elyograg.org>.
On 9/6/23 13:21, Uwe Schindler wrote:
> The idea is that jenkins runs it after the builds to figure out if
> something changed in the working copy. At ANT times this was implemented
> exactly like this, we failed build on Jenkins when the working copy
> changed. This was especially important before we used SecurityManager to
> prevent tests writing outside their temporary dirs. We had tests
> touching files in working copy.
That makes sense, and for Jenkins it sounds like a very good idea. I
think that Jenkins should probably explicitly request that check ...
having it enabled by default for everyone is not the best idea IMHO.
Thanks,
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Build: checkWorkingCopyClean -- is there value?
Posted by Jason Gerlowski <ge...@gmail.com>.
+1 to flipping the default for 'failOnModified'.
On Wed, Sep 6, 2023 at 3:21 PM Uwe Schindler <uw...@thetaphi.de> wrote:
>
> The idea is that jenkins runs it after the builds to figure out if
> something changed in the working copy. At ANT times this was implemented
> exactly like this, we failed build on Jenkins when the working copy
> changed. This was especially important before we used SecurityManager to
> prevent tests writing outside their temporary dirs. We had tests
> touching files in working copy.
>
> We had a discussion about this task with Dawid Weiss when changing to
> Gradle, but I don't remeber the outcome. To me the default should be
> false. I think Dawid argued that the check is good to notify the
> committer that there may be uncommitted changes, but I doubt this helps.
> A warning would be fine.
>
> Uwe
>
> Am 06.09.2023 um 18:43 schrieb David Smiley:
> > Our build, inherited from Lucene, contains a custom validation check
> > "checkWorkingCopyClean" which can be disabled with
> > "validation.git.failOnModified=false" in your gradle.properties. I always
> > set this; the concept of failOnModifies seems dubious to me; it annoys me.
> > Can an advocate of this setting speak up and tell me why it's useful?
> >
> > ~ David
> >
> --
> Uwe Schindler
> Achterdiek 19, D-28357 Bremen
> https://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Build: checkWorkingCopyClean -- is there value?
Posted by Uwe Schindler <uw...@thetaphi.de>.
The idea is that jenkins runs it after the builds to figure out if
something changed in the working copy. At ANT times this was implemented
exactly like this, we failed build on Jenkins when the working copy
changed. This was especially important before we used SecurityManager to
prevent tests writing outside their temporary dirs. We had tests
touching files in working copy.
We had a discussion about this task with Dawid Weiss when changing to
Gradle, but I don't remeber the outcome. To me the default should be
false. I think Dawid argued that the check is good to notify the
committer that there may be uncommitted changes, but I doubt this helps.
A warning would be fine.
Uwe
Am 06.09.2023 um 18:43 schrieb David Smiley:
> Our build, inherited from Lucene, contains a custom validation check
> "checkWorkingCopyClean" which can be disabled with
> "validation.git.failOnModified=false" in your gradle.properties. I always
> set this; the concept of failOnModifies seems dubious to me; it annoys me.
> Can an advocate of this setting speak up and tell me why it's useful?
>
> ~ David
>
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: uwe@thetaphi.de
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Build: checkWorkingCopyClean -- is there value?
Posted by Shawn Heisey <ap...@elyograg.org>.
On 9/6/23 10:43, David Smiley wrote:
> Our build, inherited from Lucene, contains a custom validation check
> "checkWorkingCopyClean" which can be disabled with
> "validation.git.failOnModified=false" in your gradle.properties. I always
> set this; the concept of failOnModifies seems dubious to me; it annoys me.
> Can an advocate of this setting speak up and tell me why it's useful?
I get hit by that pretty much every time I run the check target. I
don't think it fills any useful role ... 99 percent of the time the
check target is executed, I am pretty sure that the checkout won't be
clean. I wouldn't mind a warning logged at the end of the run that says
the working tree isn't clean, but I really hate that it makes the check
fail.
Thanks,
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org