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

459 views
Skip to first unread message

Martin Jost

unread,
Feb 11, 2020, 12:33:19 PM2/11/20
to Jenkins Users

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 --

> git@gitlabe1....+refs/heads/*:refs=

/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 git@gitlabe1....# 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

Mark Waite

unread,
Feb 11, 2020, 12:42:28 PM2/11/20
to Jenkins Users
On Tue, Feb 11, 2020 at 10:33 AM Martin Jost <mj1414...@gmail.com> 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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3df6ea37-3031-4545-82e0-480f70cc134d%40googlegroups.com.

Martin Jost

unread,
Feb 12, 2020, 9:43:55 AM2/12/20
to Jenkins Users
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
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

Martin Jost

unread,
Feb 19, 2020, 10:36:16 AM2/19/20
to jenkins...@googlegroups.com
Hello,

I've just ran a test on a trial system with updated plugins.
  • GIT 4.1.1
  • GIT Client 3.1.1

there I didn't see the error message.
So we need to find a way to update it seems...

Martin

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/laeSsj2QRpk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3cd67680-b413-4697-9932-b2c037eeadbe%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages