Re: Commit message review opt-in

2022-03-03 Thread Eric Zoerner
I would like to opt-in. GitHub user name is ezoerner, and yes include draft PRs


From: Owen Nichols 
Date: Friday, February 25, 2022 at 15:44
To: geode 
Subject: Commit message review opt-in
If you received an automated-looking PR review comment from onichols-pivotal in 
the past few weeks without consent, I apologize and have withdrawn it.

If you would like to continue receiving these automated reviews, you may opt-in 
by emailing me your github username (also let me know if you want your Draft 
PRs included or not).

Geode’s guidelines for commit messages should be interpreted as suggestions, 
not rules.  All Geode committers are welcomed with "we like to work on trust, 
not unnecessary restrictions".  I hope this change to opt-in better reflects 
that spirit.


Re: @TestOnly or @VisibleForTesting

2021-11-04 Thread Eric Zoerner
My opinion is that @VisibleForTesting is a code smell and either indicates that 
there is refactoring needed or there are tests that are unnecessary. If there 
is functionality in a private method that needs to be tested independently, 
then that code should be extracted and placed in a separate class that has a 
wider visibility that can be tested on its own.

The same could probably be said for @TestOnly unless there are actually static 
analysis tools that need it for some reason.

From: Kirk Lund 
Date: Thursday, November 4, 2021 at 15:13
To: dev@geode.apache.org 
Subject: Re: @TestOnly or @VisibleForTesting
As everyone thinks about how we want to use these annotations, please keep
this in mind that both *@VisibleForTesting* and *@TestOnly* can be used on
Types (Class/Interface/Enum), Constructors, Methods and Fields. (not just
Methods)

On Thu, Nov 4, 2021 at 3:09 PM Kirk Lund  wrote:

> Hey all,
>
> We're introducing a mess to the codebase. It's a small problem, but
> several small problems become a big problem and one of my missions is to
> clean up and improve the codebase.
>
> I recently started seeing lots of pull requests with usage of @TestOnly.
> Sometimes it's used instead of @VisibleForTesting, while sometimes I see
> both annotations added to the same method.
>
> Before we start using @TestOnly, I think we need some guidelines for when
> to use @TestOnly versus @VisibleForTesting. Or if we're going to replace
> @VisibleForTesting with @TestOnly, then we either need a PR for the
> replacement or, at a minimum, deprecation annotation and javadocs added to
> VisibleForTesting.java.
>
> The annotations appear similar but the javadocs describe slightly
> different meanings for them...
>
> *@VisibleForTesting* was created in Geode several years ago to mean that
> the method is either only for testing or the visibility of it was widened
> (example: a private method might be widened to be package-private,
> protected or public). The method might be used by product code, but it also
> has widened scope specifically to allow tests to call it. The javadocs say:
>
> "Annotates a program element that exists, or is more widely visible than
> otherwise necessary, only for use in test code.
>
> Introduced while mobbing with Michael Feathers. Name and javadoc borrowed
> from Guava and AssertJ (both are Apache License 2.0)."
>
> *@TestOnly* started appearing when we added org.jetbrains.annotations
> dependency earlier this year. It seems to indicate a method that is ONLY
> used for tests (never called by product). The javadocs say:
>
> "A member or type annotated with TestOnly claims that it should be used
> from testing code only.
>
> Apart from documentation purposes this annotation is intended to be used
> by static analysis tools to validate against element contract violations.
>
> This annotation means that the annotated element exposes internal data and
> breaks encapsulation of the containing class; the annotation won't prevent
> its use from production code, developers even won't see warnings if their
> IDE doesn't support the annotation. It's better to provide proper API which
> can be used in production as well as in tests."
>
> So... when do we use one over the other? I don't think both annotations
> should be on the same method. Also, some sort of guidelines are needed if
> we're going to start using @TestOnly.
>


Request JIRA contributor permissions

2021-09-01 Thread Eric Zoerner
I am a new developer on the Geode project and need permissions to assign 
tickets to myself and move them into the current iteration.

Thanks,
Eric