Skip to content
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

git submodules broken over SSH #31

Closed
stevendgonzales opened this issue May 16, 2015 · 5 comments
Closed

git submodules broken over SSH #31

stevendgonzales opened this issue May 16, 2015 · 5 comments

Comments

@stevendgonzales
Copy link

For a repo with submodules, I am getting the below error. Any advice?

2015-05-16 06:11:44,640  WARN [84@MessageListener for MaterialUpdateListener] GitHubPRBuildPlugin:67 - get latest revisions since:
java.lang.RuntimeException: Exception Occurred: [git, config, --get-regexp, ^submodule\..+\.url] - /var/lib/go-server/pipelines/flyweight/3d83eae3-92a0-4b48-83b5-8a72e7d44e8d
    at com.tw.go.plugin.cmd.Console.runOrBomb(Console.java:33)
    at com.tw.go.plugin.git.GitCmdHelper.runAndGetOutput(GitCmdHelper.java:386)
    at com.tw.go.plugin.git.GitCmdHelper.submoduleUrls(GitCmdHelper.java:233)
    at com.tw.go.plugin.git.GitCmdHelper.cleanAllUnversionedFiles(GitCmdHelper.java:211)
    at com.tw.go.plugin.GitHelper.fetchAndReset(GitHelper.java:100)
    at com.tw.go.plugin.GitHelper.fetchAndResetToHead(GitHelper.java:95)
    at com.tw.go.plugin.GitHelper.cloneOrFetch(GitHelper.java:41)
    at in.ashwanthkumar.gocd.github.GitHubPRBuildPlugin.handleLatestRevisionSince(GitHubPRBuildPlugin.java:185)
    at in.ashwanthkumar.gocd.github.GitHubPRBuildPlugin.handle(GitHubPRBuildPlugin.java:83)
    at com.thoughtworks.go.plugin.infra.DefaultPluginManager$1.execute(DefaultPluginManager.java:172)
    at com.thoughtworks.go.plugin.infra.DefaultPluginManager$1.execute(DefaultPluginManager.java:167)
    at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:315)
    at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.doOn(FelixGoPluginOSGiFramework.java:245)
    at com.thoughtworks.go.plugin.infra.DefaultPluginManager.submitTo(DefaultPluginManager.java:167)
    at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:33)
    at com.thoughtworks.go.plugin.access.scm.SCMExtension.latestModificationSince(SCMExtension.java:154)
    at com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller.modificationsSince(PluggableSCMMaterialPoller.java:77)
    at com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller.modificationsSince(PluggableSCMMaterialPoller.java:46)
    at com.thoughtworks.go.server.service.MaterialService.modificationsSince(MaterialService.java:110)
    at com.thoughtworks.go.server.materials.ScmMaterialUpdater.insertLatestOrNewModifications(ScmMaterialUpdater.java:52)
    at com.thoughtworks.go.server.materials.PluggableSCMMaterialUpdater.insertLatestOrNewModifications(PluggableSCMMaterialUpdater.java:61)
    at com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.insertLatestOrNewModifications(MaterialDatabaseUpdater.java:155)
    at com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.updateMaterialWithNewRevisions(MaterialDatabaseUpdater.java:147)
    at com.thoughtworks.go.server.materials.MaterialDatabaseUpdater$2.doInTransaction(MaterialDatabaseUpdater.java:110)
    at com.thoughtworks.go.server.transaction.TransactionCallback.doWithExceptionHandling(TransactionCallback.java:24)
    at com.thoughtworks.go.server.transaction.TransactionTemplate$3.doInTransaction(TransactionTemplate.java:53)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    at com.thoughtworks.go.server.transaction.TransactionTemplate.executeWithExceptionHandling(TransactionTemplate.java:49)
    at com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.updateMaterial(MaterialDatabaseUpdater.java:107)
    at com.thoughtworks.go.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:48)
    at com.thoughtworks.go.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:29)
    at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:65)
    at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:50)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
    at com.tw.go.plugin.cmd.Console.runOrBomb(Console.java:25)
@stevendgonzales
Copy link
Author

It appears this does not work because the command git config --get-regexp ^submodule\\..+\\.url does not work because git submodule update --init as been called.

If I manually run git submodule update --init in the flyweight directory then git config --get-regexp ^submodule\\..+\\.url succeeds, and I then receive a different error:

015-05-17 05:36:13,658  WARN [93@MessageListener for MaterialUpdateListener] GitHubPRBuildPlugin:67 - get latest revisions since:
java.lang.NullPointerException
    at in.ashwanthkumar.gocd.github.GitHubPRBuildPlugin.handleLatestRevisionSince(GitHubPRBuildPlugin.java:199)
    at in.ashwanthkumar.gocd.github.GitHubPRBuildPlugin.handle(GitHubPRBuildPlugin.java:83)
    at com.thoughtworks.go.plugin.infra.DefaultPluginManager$1.execute(DefaultPluginManager.java:172)
    at com.thoughtworks.go.plugin.infra.DefaultPluginManager$1.execute(DefaultPluginManager.java:167)
    at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:315)
    at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.doOn(FelixGoPluginOSGiFramework.java:245)
    at com.thoughtworks.go.plugin.infra.DefaultPluginManager.submitTo(DefaultPluginManager.java:167)
    at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:33)
    at com.thoughtworks.go.plugin.access.scm.SCMExtension.latestModificationSince(SCMExtension.java:154)
    at com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller.modificationsSince(PluggableSCMMaterialPoller.java:77)
    at com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller.modificationsSince(PluggableSCMMaterialPoller.java:46)
    at com.thoughtworks.go.server.service.MaterialService.modificationsSince(MaterialService.java:110)
    at com.thoughtworks.go.server.materials.ScmMaterialUpdater.insertLatestOrNewModifications(ScmMaterialUpdater.java:52)
    at com.thoughtworks.go.server.materials.PluggableSCMMaterialUpdater.insertLatestOrNewModifications(PluggableSCMMaterialUpdater.java:61)
    at com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.insertLatestOrNewModifications(MaterialDatabaseUpdater.java:155)
    at com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.updateMaterialWithNewRevisions(MaterialDatabaseUpdater.java:147)
    at com.thoughtworks.go.server.materials.MaterialDatabaseUpdater$2.doInTransaction(MaterialDatabaseUpdater.java:110)
    at com.thoughtworks.go.server.transaction.TransactionCallback.doWithExceptionHandling(TransactionCallback.java:24)
    at com.thoughtworks.go.server.transaction.TransactionTemplate$3.doInTransaction(TransactionTemplate.java:53)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    at com.thoughtworks.go.server.transaction.TransactionTemplate.executeWithExceptionHandling(TransactionTemplate.java:49)
    at com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.updateMaterial(MaterialDatabaseUpdater.java:107)
    at com.thoughtworks.go.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:48)
    at com.thoughtworks.go.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:29)
    at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:65)
    at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:50)
    at java.lang.Thread.run(Thread.java:745)

@stevendgonzales
Copy link
Author

@srinivasupadhya It looks like submodule checkouts may have been broken in commit 895d9a2
as it was working prior at 9a594cd

@stevendgonzales stevendgonzales changed the title Exception Occurred: [git, config, --get-regexp, ^submodule\..+\.url] git submodules broken May 17, 2015
@stevendgonzales
Copy link
Author

trying to track down root cause, as it appears to come from https://github.com/srinivasupadhya/git-cmd/blob/master/src/com/tw/go/plugin/GitHelper.java

@stevendgonzales
Copy link
Author

First exception is related to com.tw.go.plugin.GitHelper.fetchAndReset(GitHelper.java:100) in the git-cmd repo. I have opened an issue and suggested a possible fix that I can implement here: srinivasupadhya/git-cmd#1

@stevendgonzales stevendgonzales changed the title git submodules broken git submodules broken over SSH May 17, 2015
@srinivasupadhya
Copy link
Collaborator

fixed in git-cmd. Will make new release with update soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants