git plugin: "No valid HEAD. Skipping the resetting"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

git plugin: "No valid HEAD. Skipping the resetting"

Martin Jost

Hello,

 

we're using Jenkins 2.204.1

and the git relevant plugins

git 3.12.1 (Can't update due to a missing dependency) Git client plugin 3.1.1 GIT server Plugin 1.9 GitHub API Plugin 1.106 GitHub Branch Source Plugin 2.5.8 GitHub plugin 1.29.5

 

 

When we use the git plugin to check out and have the "Delete workspace before build starts", I see "No valid HEAD. Skipping the resetting" (see below in context in console log)

 

------------------------------------------------------------- console log ---------------------------------------------------------------------------

 ....

 [WS-CLEANUP] Deleting project workspace...

 [WS-CLEANUP] Deferred wipeout is used...

 [WS-CLEANUP] Done

 using credential 50da578b-178c-4cba-b103-91c74f6522ed

 Cloning the remote Git repository

 Honoring refspec on initial clone

 Cloning repository git@gitlab....git

  > git init /var/fpwork/.../home/workspace/.... # timeout=3D10

 Fetching upstream changes from git@gitlabe1....

  > git --version # timeout=3D10

 > git fetch --tags --force --progress --

> [hidden email]

/remotes/origin/* # timeout=3D10


 > git config remote.origin.url git@gitlabe1.... # timeout=3D10

 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*=

 # timeout=3D10

 > git config remote.origin.url [hidden email] timeout=3D10

Cleaning workspace

> git rev-parse --verify HEAD # timeout=3D10

No valid HEAD. Skipping the resetting

 > git clean -fdx # timeout=3D10

Fetching upstream changes from git@gitlabe1.

 

> git fetch --tags --force --progress -- git@gitlabe1....

> +refs/heads/*:ref=

s/remotes/origin/* # timeout=3D10

 

 > git rev-parse refs/remotes/origin/master^{commit} # timeout=3D10

  > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=3D10

 Checking out Revision d3663c4fd59eb8f49214d0cf24a2a3d82c6a8a9b (refs/remote=

s/origin/master)

  > git config core.sparsecheckout # timeout=3D10

  > git checkout -f d3663c4fd59eb8f49214d0cf24a2a3d82c6a8a9b # timeout=3D10

 Commit message: "FF ...."

  > git rev-list --no-walk a635794e50b91d56377e692033ad56ce6d1682ea # timeou=

t=3D10

....

------------------------------------------------------------- console log ---------------------------------------------------------------------------

 

When I take the git commands I see in the log and execute them on a console, I see that I end up with no branch checked out. So "asking" for HEAD is surely doomed to fail.

If the workspace isn't wiped,  I see no error message - the next run starts with the existing workspace on a branch.

 

Is this a git plugin bug ? (I couldn't find a note on that in the release notes after 3.12.1.) Is it worth reporting as a bug ? I see no bad effects as far as I can tell, but the message is annoying.

 

Thanks

 

Martin

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3df6ea37-3031-4545-82e0-480f70cc134d%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: git plugin: "No valid HEAD. Skipping the resetting"

Mark Waite-2


On Tue, Feb 11, 2020 at 10:33 AM Martin Jost <[hidden email]> wrote:

Hello,

 

we're using Jenkins 2.204.1

and the git relevant plugins

git 3.12.1 (Can't update due to a missing dependency) Git client plugin 3.1.1 GIT server Plugin 1.9 GitHub API Plugin 1.106 GitHub Branch Source Plugin 2.5.8 GitHub plugin 1.29.5


That's a very interesting combination of git plugin and git client plugin.  You're testing a combination that I've never tested.  It should work, but git client plugin 3.1.1 is tested with git plugin 4.1.1, not with git plugin 3.12.1.  Your configuration should work, but it is not a configuration that I test, nor is it a configuration that I expect anyone else is testing either.
 

 

When we use the git plugin to check out and have the "Delete workspace before build starts", I see "No valid HEAD. Skipping the resetting" (see below in context in console log)

 

When I take the git commands I see in the log and execute them on a console, I see that I end up with no branch checked out. So "asking" for HEAD is surely doomed to fail.

If the workspace isn't wiped,  I see no error message - the next run starts with the existing workspace on a branch.

 

Is this a git plugin bug ? (I couldn't find a note on that in the release notes after 3.12.1.) Is it worth reporting as a bug ? I see no bad effects as far as I can tell, but the message is annoying.


No, it is a message logged by the git client plugin when a call to reset() throws an exception.

If it is annoying enough, you're welcome to submit a pull request proposing how you would avoid calling reset in cases where it will throw an exception.  Be sure that you include automated tests which show the problem before your change so that it is clear the tests pass with your change.

 

Thanks

 

Martin

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3df6ea37-3031-4545-82e0-480f70cc134d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGeb46prjD9xEcpaKAWtXbom4%3DYgtcvx%3D3Bct%3DSjuRZtg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: git plugin: "No valid HEAD. Skipping the resetting"

Martin Jost
Hello Mark,

> "If it is annoying enough, you're welcome to submit a pull request proposing how you would avoid calling reset in cases where it will throw an exception.  Be sure that you include automated tests which show the problem before your change so that it is clear the tests pass with your change."

sorry Mark, I'm not up to that.
And I learned that we somehow need to get around our blocker for updating the plugins.

Thanks for looking into this and the info

Martin


Am Dienstag, 11. Februar 2020 18:42:28 UTC+1 schrieb Mark Waite:


On Tue, Feb 11, 2020 at 10:33 AM Martin Jost <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="0hTQiwBeGQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mj1414...@...> wrote:

Hello,

 

we're using Jenkins 2.204.1

and the git relevant plugins

git 3.12.1 (Can't update due to a missing dependency) Git client plugin 3.1.1 GIT server Plugin 1.9 GitHub API Plugin 1.106 GitHub Branch Source Plugin 2.5.8 GitHub plugin 1.29.5


That's a very interesting combination of git plugin and git client plugin.  You're testing a combination that I've never tested.  It should work, but git client plugin 3.1.1 is tested with git plugin 4.1.1, not with git plugin 3.12.1.  Your configuration should work, but it is not a configuration that I test, nor is it a configuration that I expect anyone else is testing either.
 

 

When we use the git plugin to check out and have the "Delete workspace before build starts", I see "No valid HEAD. Skipping the resetting" (see below in context in console log)

 

When I take the git commands I see in the log and execute them on a console, I see that I end up with no branch checked out. So "asking" for HEAD is surely doomed to fail.

If the workspace isn't wiped,  I see no error message - the next run starts with the existing workspace on a branch.

 

Is this a git plugin bug ? (I couldn't find a note on that in the release notes after 3.12.1.) Is it worth reporting as a bug ? I see no bad effects as far as I can tell, but the message is annoying.


No, it is a message logged by the git client plugin when a call to reset() throws an exception.

If it is annoying enough, you're welcome to submit a pull request proposing how you would avoid calling reset in cases where it will throw an exception.  Be sure that you include automated tests which show the problem before your change so that it is clear the tests pass with your change.

 

Thanks

 

Martin

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="0hTQiwBeGQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/3df6ea37-3031-4545-82e0-480f70cc134d%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/3df6ea37-3031-4545-82e0-480f70cc134d%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/3df6ea37-3031-4545-82e0-480f70cc134d%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/3df6ea37-3031-4545-82e0-480f70cc134d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3cd67680-b413-4697-9932-b2c037eeadbe%40googlegroups.com.