-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
>=1.4.0 freezes in life-lock when trying to edit configuration #101
Comments
@jgsuess the debug log with git commands should not come from jgitver (using jgit) but probably from your maven-scm configuration. Do you have a simplified reproducer case? |
No, not at this time. However, our while we have scm defined, none of our plugins do SCM operations. Checkouts are executed by the CI system. Could this by JGIt? Has there been a version change in JGitver that uses a new JGit. |
but AFAIK jgit is a full java implementation of git Thus commands like How did you took the log? is it only the result of |
there is for sure one of the plugins that has a dependency on some maven-scm projects. don't you extract git metadatas using another plugin like build-number or something like that? |
The log is just using maven debug (-X) on the shell. Mind you the behaviour
disappears as soon as I revert to 1.3.0, with no other changes. This means
a dependency of jgitver or jgitver itself must bring the change. Also, it
might well be that jgit uses git to read configuration, if it is present.
This could well be a jgit bug, if the version of jgit has changed. I will
see if I can produce a minimal example. We would really iike the new branch
features... That is a big step ahead.
…On Thu, 8 Nov 2018 at 01:21 Matthieu Brouillard ***@***.***> wrote:
there is for sure one of the plugins that has a dependency on some
maven-scm projects.
Can you remove the SCM section to see what plugin is failing?
don't you extract git metadatas using another plugin like build-number or
something like that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvxkcnV0S5uyR9ATWgpcxsK7Lnumut7ks5usvp3gaJpZM4YRx0H>
.
|
OK I reproduced the log, but not the outage
I'll investigate now. |
indeed it is coming from jgit but as far as I can understand the jgit sources it is an intended behavior and it is not supposed to be blocking because the EDITOR is changed before calling.
the sources are the good ones, I stopped on the part that lookup the git exe. |
@jgsuess did you succeed in reproducing the issue? I reproduce the log Don't you have a modified version of the |
also
|
finally there were no changes in jgit version between 1.3.0 and 1.4.x. the change appeared between 1.2.1 & 1.3.0 ; but jgit actual version was already there in 1.3.0 |
The issue may be triggered by a side-effect of jgit use in 1.4.0.
GIT_EDITOR=echo git config --system --edit
The problem is that git config --system --edit probably does not return
what jgit expects.
nano will return a bunch of ncurses sequences while painting its screen.
I assume that jgit wants to do some stream editing, vi style, but it does
not see the response it expects.
Its control for the remote editor is broken.
Can you get a stack to see where jgitver calls jgit and what jgit method is
affected.
This is clearly a jgit bug.
…On Thu, 8 Nov 2018 at 20:18 Matthieu Brouillard ***@***.***> wrote:
finally there were no changes in jgit version between 1.3.0 and 1.4.x.
the change appeared between 1.2.1 & 1.3.0 ; but jgit actual version was
already there in 1.3.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvxkRNnziuvmtegKm8LpPfOG4eGyQvnks5utAUDgaJpZM4YRx0H>
.
|
@jgsuess I have searched and put all what you ask above in the discussion.
exactly, you can look at jgit code here : https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/v4.9.1.201712030800-r/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java#649 please provide more information on your setup on the CI box that is failing:
I am willing to help you but I need more info ; I still have no reproducer where the call is blocking. |
@jgsuess any news? without further help/info on your system setup I don't know what to do more for you. |
I have the same bug on my windows desktop. On a simple project
Versions info
In powershell: $Env:GIT_EDITOR = 'echo';
git config --system --edit; Outputs In cmd set GIT_EDITOR=echo;
git config --system --edit Outputs the same I suppose there is something wrong as jgit works with environment variables. |
@genuss @jgsuess honestly I do not know how to go on. I also have the same warning on windows
but it does not block anything ; it just works for me
|
Just made some debugging on jgitver 0.8.6 and it has something to do with jgitver/jgitver#63 So this issue has nothing to do with git or jgit. |
ok thus it does not occur on small repos but on your big ones ; right? |
in fact the issue comes from jgitver/jgitver#49 jgitver now tries to better handle merged branches. |
Exactly, I was just typing that our repos aren't very large but have many branches which are merged one into another witout rebases. |
Sorry @McFoggy for leading you on a spin... Would it be possible to have a watchdog that checks on the fan-out? Than you would get a warning after time, rather than setting bounds in advance? |
I have several things in mind to resolve that. 1. allow to set a maxDepth from the maven pluginAs I already did it for the gradle one, I am going to deliver a version of the maven plugin that allows you to define a 2. introduce a real search policyThis would allow, depending on: the projects, the branching policy to be able for example not to lookup merged branches, to define max depth search, .... 3. add a resolution cacheFor big repositories, that have lot of merges with no rebase policy, tags on merged branches (release branches) we could end in having to navigate thru all parents ; like it is today and is failing ! I will do (1) probably today so that you can at least bypass the issue by defining a max depth search. @djarosz @jgsuess @genuss please raise you hand or comment on those ; I am of course interested in your feedback. |
I have a question. I don't quite understand the need of traversing git tree, why do we actually need this? Is it not just sufficient to get the branches the current head is on? And a little comment: third option should be our the last resort:) |
I think you meant the commits of the branch your are on.
I am really open to hear for ideas on how to go ahead. |
also we have to make some awareness that using jgitver there should be tags somehow in order to make it work. for spark for example
on the master branch there is not tag at all. In the same way we are not compatible with projects that do a short lived branch (non merged into master) to do the release ; like you can find for example if you migrate a project using maven-release with SVN into git. |
for the moment, please update to
|
I see now what was the core issue in my projects. The tag names were not just |
@genuss you can also configure the regexp for the tags if you do not use a standard pattern |
as stated in this comment I just released jgitver-0.9.0 & jgitver-maven-plugin-1.4.5. Can you confirm please? PS: you should be able to remove |
@McFoggy looks great! Just tested with one of my projects. The initial configuration was: <configuration xmlns="http://jgitver.github.io/maven/configuration/1.0.0-beta"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.0.0-beta https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_0_0-beta.xsd ">
<regexVersionTag>(?:[\w-]+-)?([0-9.]+(?:-RC[0-9]+)?)</regexVersionTag>
<maxSearchDepth>10</maxSearchDepth>
</configuration> Version computed for ~2.7 sec. When I removed |
great ! stay tuned, I am going to release quite soon jgitver/jgitver#70 and will offer more policies depending on your project size, branching model, tagging policy, ... |
Yup. This works for us now. Thanks for the great work. Tricky one!
… On 9 Jan 2019, at 19:12, Matthieu Brouillard ***@***.***> wrote:
great !
stay tuned, I am going to release quite soon jgitver/jgitver#70 and will offer more policies depending on your project size, branching model, tagging policy, ...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Can you please add some documention for the new parameter? What is limited by this parameter? The number of commits, the number of merges? I want to set this limit not too high to speed up the process, on the other hand it stops to work if i set the limit below "5", as the plugin then starts to use "0.0.0" as fallback version... Or is there a way to make maven fail if the plugin returns "0.0.0"? |
sure I'd like to but I also have to find some time to. My advise on jgitver-maven-plugin >= 1.4.5, remove the Moreover, I'll try to release this week-end both jgitver-0.10.0 & jgitver-maven-plugin-1.5.0 which will bring jgitver/jgitver#70 live. |
@McFoggy : Thanks a lot! I can confirm that 1.4.5 is working for me (without maxSearchDepth) |
version: >=1.4.0
usage context:
Problem description:
(Java seems to be polling). Below is a maven debug log of the situation.
Checking the commands I find that the output for the version command is retrieved correctly, but that
git config --system --edit
starts mynano
editor. I am not sure if this is intended.The text was updated successfully, but these errors were encountered: