[NoORM] A simpler README.md?
by Yoann Rodiere
Hi everyone,
TL;DR: I would like to strip down the README in Hibernate Search to
redirect users to the website, which is better suited for presenting
available versions, and helping users to get started. See what I mean in this
PR <https://github.com/hibernate/hibernate-search/pull/1692>. Any
objections?
Currently, the README.md in NoORM projects duplicates a bit of information
from our website and documentation:
- The version number and date of the latest release:
https://github.com/hibernate/hibernate-search#hibernate-search vs.
http://hibernate.org/search/releases/
- A description of the project:
https://github.com/hibernate/hibernate-search#description vs.
http://hibernate.org/search/
- The requirements:
https://github.com/hibernate/hibernate-search#requirements vs.
http://hibernate.org/search/releases/#compatibility-matrix or
http://hibernate.org/search/releases/5.10/#compatibility
- Installation instructions:
https://github.com/hibernate/hibernate-search#maven +
https://github.com/hibernate/hibernate-search#sourceforge-bundle vs.
http://hibernate.org/search/releases/5.10/#get-it or
http://hibernate.org/search/documentation/getting-started/
Some of this information is updated manually when we don'r forget about it,
and some of it (the latest release) is updated automatically when we
perform a release on master.
As a result, from time to time the information is not in sync. Right now,
in Search, the version displayed in the README is 5.10.0.Final, whereas the
latest release is 5.10.1.Final and the master branch hosts the
5.11.0-SNAPSHOT code. This is because the release scripts do not update
master when we release from another branch, and we have to do it manually
(that's expected: doing otherwise would be too complex).
Also, the information is partial:
- the README currently completely hides the fact that other Hibernate
Search versions are still maintained and can work well with older versions
of Hibernate ORM.
- whenever the latest release is an alpha/beta/CR, we usually display
installation instructions for the latest development version, and
completely hide information about the latest stable version.
What's worse, keeping the documentation on branch master the README on
branch master may prove confusing: the README refers to the latest release,
but the rest of the code may have been updated since the latest release,
sometimes significantly so. We will have trouble dealing with this when we
merge Hibernate Search 6, in particular.
We may not agree on what is the best solution, but let's at least agree
this is not ideal, especially when it comes to informing users about the
stable version they want to use.
We could put in more effort, try our very best to keep everything in sync
and as complete as possible/necessary. Add more documentation about the
release process. Try our best to do less mistakes. We could. But obviously,
nobody is perfect, and so never will this README.
Other projects, such as Spring Boot (
https://github.com/spring-projects/spring-boot) or, more relevantly,
Hibernate ORM (https://github.com/hwithibernate/hibernate-orm
<https://github.com/hibernate/hibernate-orm>), simply do not refer to the
latest version in their README, and redirect to their website for all
version-specific information. The README focuses on presenting the project,
redirecting users to the website, and giving contributor-friendly
information.
I find this solution both elegant and powerful. Presenting the project is
always necessary, but guiding users to the right version and giving getting
started instructions is something complex, and something we already do on
our website. So why not redirect people there? All links stay valid and
relevant as long as the website is up and kept updated, and the impact of
maintainers forgetting to update the README is far smaller. One less thing
to worry about for maintainers, and better guidance for prospective users.
A simple link to the getting started guide could be enough for most users,
but we can go a step further and offer additional links. I just sent a pull
request to show how I see it implemented in Search; please let me know what
you think.
The PR: https://github.com/hibernate/hibernate-search/pull/1692
Preview of the README as seen from the GitHub web view:
https://github.com/yrodiere/hibernate-search/blob/ae4d347fa4c647a3c5ddb6f...
Cheers,
--
Yoann Rodiere
yoann(a)hibernate.org / yrodiere(a)redhat.com
Software Engineer
Hibernate NoORM team
6 years, 6 months
Re: [hibernate-dev] Breaking JBossStandAloneJtaPlatform backwards compatibility
by Sanne Grinovero
On 4 June 2018 at 12:23, Tom Jenkinson <tom.jenkinson(a)redhat.com> wrote:
>
>
> On 28 May 2018 at 12:23, Sanne Grinovero <sanne(a)hibernate.org> wrote:
>>
>> On 28 May 2018 at 00:05, Steve Ebersole <steve(a)hibernate.org> wrote:
>> > JBossStandalone is meant for use of JBoss Transactions outside of
>> > WildFly.
>> > Why are we using it inside WildFly. Inside WildFly, jipijapa ought to
>> > be
>> > defining that however it needs through a custom JtaPlatform and probably
>> > the
>> > JtaPlatformInitiator.
>>
>> I don't know the reasons, as I just started looking at WildFly Swarm
>> (now named Thorntail) and I'm merely reporting I see such exceptions.
>>
>> It's indeed surprising that this JTA Platform is being picked; I
>> chatted with Scott on another chat wondering why this system
>> apparently is not using JipiJapa - which would configure it correctly.
>> I guess it's not clear to me if Thorntail is to be considered "in" or
>> "outside" WildFly but I'm keeping this conversation for the Thorntail
>> team.
>>
>> All I observe is that 5.3.0.Final worked fine in Thorntail while
>> 5.3.1.Final will not work unless I figure out how to reconfigure it or
>> which other dependencies need switching - neither seems trivial and
>> that's unexpected from a micro update.
>> Same for the Narayana quickstarts and demo projects - maybe their
>> configuration could use some updates but I'm not sure, I'll leave that
>> to Tom and Gytis to decide.
>
>
> I just wanted to check, do we need any changes in the Narayana quickstart to
> deal with this? It reads as though since 5.3.2 we don't need to add a new
> dependency?
> https://github.com/jbosstm/quickstart/blob/master/jca-and-hibernate/src/t...
Hi Tom,
I'm not sure either, let's test it after 5.3.2.Final is released -
likely we won't need to make any changes to the quickstarts.
@All:
For Hibernate Search, Thorntail, and Infinispan I already did the
upgrade and they come with custom JTA platform providers to dodge the
incompatibility.
The same trick wasn't possible with OGM as we test interactions with
the transaction system in many more subtle ways; I decided it wasn't
worth the effort of introducing all the scaffolding as we can just
wait for ORM 5.3.2 instead.
Thanks,
Sanne
>
>>
>>
>> Thanks,
>> Sanne
>>
>> >
>> >
>> > On Sun, May 27, 2018, 3:58 PM Sanne Grinovero <sanne(a)hibernate.org>
>> > wrote:
>> >>
>> >> On 27 May 2018 at 15:29, Scott Marlow <smarlow(a)redhat.com> wrote:
>> >> >
>> >> >
>> >> > On Sun, May 27, 2018 at 8:17 AM, Sanne Grinovero
>> >> > <sanne(a)hibernate.org>
>> >> > wrote:
>> >> >>
>> >> >> On 27 May 2018 at 00:30, Scott Marlow <smarlow(a)redhat.com> wrote:
>> >> >> > Next idea, we should first look for the WFTC classes, if not
>> >> >> > found,
>> >> >> > then
>> >> >> > look for Arjuna classes.
>> >> >>
>> >> >> +1 that would be nice and I see other implementations e.g.
>> >> >> JBossAppServerJtaPlatform have a precedent of attempting multiple
>> >> >> strategies to maintain backward compatibility.
>> >> >>
>> >> >> Created:
>> >> >> - https://hibernate.atlassian.net/browse/HHH-12640
>> >> >
>> >> >
>> >> > https://github.com/hibernate/hibernate-orm/pull/2314
>> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> Regarding the use of the old Arjuna name: you might be right that it
>> >> >> shouldn't be used, but it's still very common:
>> >> >>
>> >> >> even the Narayana quickstarts using Hibernate are broken by this
>> >> >> change, and so is any application running on WildFly Swarm or
>> >> >> Thorntail.
>> >> >>
>> >> >> I suppose something should be improved on their side as well, yet we
>> >> >> should give people time (by making it compatible like you suggested)
>> >> >> and help at least with some documented guidance - the fallback
>> >> >> strategy could log a warning to motivate people to update but IMO we
>> >> >> should start bugging people with such messages only when the other
>> >> >> runtimes and examples ship with the new defaults.
>> >> >>
>> >> >> Hibernate Search also has integration tests with Narayana
>> >> >> (standalone
>> >> >> JTA) and it's not clear to me now which dependencies I should be
>> >> >> changing; I suppose I'll figure it out soon as I need to release it
>> >> >> too :)
>> >> >>
>> >> >> The user experience after this error is quite bad: applications now
>> >> >> simply fail to start with a confusing
>> >> >> "javax.persistence.PersistenceException: No Persistence provider for
>> >> >> EntityManager named XYZ found", we give no better error and no clue
>> >> >> about needing to look into the used transactions implementation.
>> >> >>
>> >> >> Created:
>> >> >> - https://hibernate.atlassian.net/browse/HHH-12639
>> >> >>
>> >> >> Thanks,
>> >> >> Sanne
>> >> >>
>> >> >>
>> >> >> >
>> >> >> > On Sat, May 26, 2018, 7:12 PM Scott Marlow <smarlow(a)redhat.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> On Sat, May 26, 2018, 6:05 PM Scott Marlow <smarlow(a)redhat.com>
>> >> >> >> wrote:
>> >> >> >>>
>> >> >> >>> Or, maybe we should just remove the JBOSS_TM_CLASS_NAME +
>> >> >> >>> JBOSS_UT_CLASS_NAME class references and instead JNDI lookup
>> >> >> >>> using
>> >> >> >>> the
>> >> >> >>> standard JBoss TM/UT JNDI names.
>> >> >> >>
>> >> >> >>
>> >> >> >> This wouldn't work for standard alone mode, as there wouldn't be
>> >> >> >> any
>> >> >> >> jndi
>> >> >> >> services. Guess, we are stuck with using class name references.
>> >> >> >>
>> >> >> >>>
>> >> >> >>> On Sat, May 26, 2018 at 5:05 PM, Scott Marlow
>> >> >> >>> <smarlow(a)redhat.com>
>> >> >> >>> wrote:
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> On Sat, May 26, 2018 at 9:04 AM, Sanne Grinovero
>> >> >> >>>> <sanne(a)hibernate.org>
>> >> >> >>>> wrote:
>> >> >> >>>>>
>> >> >> >>>>> Hi Scott,
>> >> >> >>>>>
>> >> >> >>>>> I see you changed JBossStandAloneJtaPlatform to use a new API
>> >> >> >>>>> in
>> >> >> >>>>> WildFly;
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> More that in WildFly 13, applications shouldn't use the Arjuna
>> >> >> >>>> TM
>> >> >> >>>> classes directly anymore. The WildFly Transaction Client wraps
>> >> >> >>>> the
>> >> >> >>>> Arjuna
>> >> >> >>>> TM and maintains correct TX status.
>> >> >> >>>>
>> >> >> >>>>>
>> >> >> >>>>> this breaks all existing applications using a generic "JBoss -
>> >> >> >>>>> standalone" platform which isn't using the very latest
>> >> >> >>>>> WildFly.
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> Hmm, thinking more about this, also broken, are any ORM 5.1.x
>> >> >> >>>> applications that depend on JBossStandAloneJtaPlatform to
>> >> >> >>>> choose
>> >> >> >>>> the
>> >> >> >>>> WildFly
>> >> >> >>>> TM. JPA container managed applications won't have this
>> >> >> >>>> problem.
>> >> >> >>>>
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>> I see that in many cases this type is auto-detected - and
>> >> >> >>>>> while
>> >> >> >>>>> JBossStandAloneJtaPlatform causes an exception this is
>> >> >> >>>>> swallowed
>> >> >> >>>>> by
>> >> >> >>>>> the HibernatePersistenceProvider as any exception is only
>> >> >> >>>>> mentioned
>> >> >> >>>>> at
>> >> >> >>>>> debug level (line 61).
>> >> >
>> >> >
>> >> > This sounds correct, as all persistence providers are given a chance,
>> >> > to
>> >> > try
>> >> > deploying a persistence provider when
>> >> > Persistence.createEntityManagerFactory() (or other calls, like
>> >> > generateSchema()) are made.
>> >>
>> >> I'm aware of how the selection is meant to work, but shouldn't we be
>> >> able to differentiate between the typical scenario "this configuration
>> >> is not meant for me" vs the scenario of an unintended failure because
>> >> of an internal exception?
>> >>
>> >> Especially as in this case you claim it's the user's fault that an
>> >> exception happens, as the user is having an out of date, incompatible
>> >> library on the classpath. Clearly, we shouldn't swallow the error as
>> >> it makes it massively difficult to suggest some upgrades need to be
>> >> explored.
>> >>
>> >> IMO it would be very reasonable to change the exception log from debug
>> >> to warn/error but indeed I'm asking here as I understand the TCK /
>> >> spec intent might disagree with this. I doubt the TCK tests for
>> >> absence of error messaged being logged though?
>> >>
>> >> Thanks,
>> >> Sanne
>> >>
>> >>
>> >>
>> >> >
>> >> >>
>> >> >> >>>>>
>> >> >> >>>>> So two questions:
>> >> >> >>>>> - could this be reverted and you introduce some new-gen
>> >> >> >>>>> WildflyStandAloneJtaPlatform instead?
>> >> >
>> >> >
>> >> > Yes, good idea https://github.com/hibernate/hibernate-orm/pull/2314
>> >> >
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> Not sure, since the WildFly Transaction Client (WFTC) module is
>> >> >> >>>> also
>> >> >> >>>> in
>> >> >> >>>> earlier WF releases. I'm not exactly sure of when the WFTC TM
>> >> >> >>>> replaces
>> >> >> >>>> Arjuna TM. David, is that new for WF13?
>> >> >> >>>>
>> >> >> >>>> We can get more correct in ORM 5.3.x to align with WF 13, but
>> >> >> >>>> not
>> >> >> >>>> sure
>> >> >> >>>> about ORM 5.1 JBossStandAloneJtaPlatform still referencing
>> >> >> >>>> Arjuna
>> >> >> >>>> TM
>> >> >> >>>> directly. Seems like that is also a problem.
>> >> >> >>>>
>> >> >> >>>>>
>> >> >> >>>>> - bootstrap exceptions: may I change those to error level?
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> No idea.
>> >> >> >>>>
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>> Thanks,
>> >> >> >>>>> Sanne
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>
>> >> >> >
>> >> >
>> >> >
>> >> _______________________________________________
>> >> hibernate-dev mailing list
>> >> hibernate-dev(a)lists.jboss.org
>> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
>
6 years, 6 months
Health check status API
by Sanne Grinovero
It was suggested to me that Hibernate ORM could help people developing
microservices on Kubernetes / Openshift by making "health checks"
easier.
In short, how to expose to some management API that we're being able
to connect to the database and do our usual things.
This could be done by connection pools as well but I suspect there
could be benefits in exposing this information in a unified way at an
higher level API; also on top of using ad-hoc specific connection
APIs, or Dialect specific instructions, I guess we could monitor
timeout exceptions, etc.. happening on the application sessions.
Wrote some notes on:
- https://hibernate.atlassian.net/browse/HHH-12655
Probably best to explore this in ORM first, but then Search and OGM
could expose/implement it too for their respective services?
Or maybe people would prefer to just run a query?
Thanks,
Sanne
6 years, 6 months