Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 395 forks source link

draft pack-repo add fails after upgrading OSX Git client to 2.16.1 #522

Closed rawlingsj closed 6 years ago

rawlingsj commented 6 years ago

When using git 2.15.1 I'm able to add pack repos just fine, after upgrading to git 2.16.1 I get the following error:

Error: Unable to update checked out version: exit status 128

draft version:

Client: &version.Version{SemVer:"v0.9.0", GitCommit:"6a6b387d84cc7530b45bfff704bd1d71e36082ed", GitTreeState:"clean"}

I'm not sure if this is a draft issue or not but figured I'd raise and track here as I'm sure others will be affected.

This is a full log of the steps to recreate:

➜   git version
git version 2.15.1

➜   draft pack-repo remove github.com/Azure/draft
Are you sure you want to do this? (y/N): y
removed pack repository github.com/Azure/draft

➜   draft pack-repo list
Error: no pack repositories to show
Error: exit status 1

➜   draft pack-repo add https://github.com/Azure/draft
Installing pack repo from https://github.com/Azure/draft
Installed pack repository github.com/Azure/draft

➜   brew upgrade git
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (caskroom/cask, homebrew/core, jenkins-x/jx).
==> New Formulae
ballerina                                coreos-ct                                qtkeychain                               shogun
==> Updated Formulae
jenkins-x/jx/jx ✔   chibi-scheme        harfbuzz            ledit               metricbeat          pyinvoke            svgo                zimg
abnfgen             conan               heartbeat           librealsense        packetbeat          python-markdown     terragrunt
apm-server          dbus-glib           heroku              libtrng             passenger           rabbitmq            udpxy
auditbeat           dwarfutils          html-xml-utils      log4cplus           picard-tools        rakudo-star         vagrant-completion
augeas              elasticsearch       i2p                 logentries          plantuml            rtags               vala
bit                 elixir              jhipster            logstash            presto              rustup-init         xrootd
carthage            filebeat            kibana              makensis            prips               sccache             zanata-client

==> Upgrading 1 outdated package, with result:
git 2.16.1
==> Upgrading git
==> Downloading https://homebrew.bintray.com/bottles/git-2.16.1.sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/6b/6b2d4930aabf8502bfe3fc654599deb8ee189a8ba3812a2ce04ee419365b9611?__gda__=exp=1517396029~hmac=bf6d4c41268134d3cea7
######################################################################## 100.0%
==> Pouring git-2.16.1.sierra.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git
==> Summary
🍺  /usr/local/Cellar/git/2.16.1: 1,495 files, 34.5MB

➜   draft pack-repo add https://github.com/Azure/draft
Installing pack repo from https://github.com/Azure/draft
Error: Unable to update checked out version: exit status 128
Error: exit status 1
bacongobbler commented 6 years ago

cc @bucksteamy

balkian commented 6 years ago

I've had the same issue on Arch Linux. As a workaround, I've manually cloned the repo to $HOME/.draft/packs/github.com/Azure/draft.

$ draft version
Client: &version.Version{SemVer:"v0.10.0", GitCommit:"b0d3922d152f05d3ccc58b7391fbec7986e1b39f", GitTreeState:"clean"}
$ git version
git version 2.16.1
bacongobbler commented 6 years ago

I can confirm this on ubuntu as well. I'll see if I can figure this one out.

bacongobbler commented 6 years ago

fwiw this appears to work:

$ draft pack-repo add https://github.com/Azure/draft --version v0.10.0
bacongobbler commented 6 years ago

I submitted a patch upstream here. Once that's accepted, we can then update Masterminds/vcs in draft and draft-pack-repo to close this one out. For the time being, anyone on git 2.16+ should use the described workarounds:

rawlingsj commented 6 years ago

That's great - thanks for the updates and workaround.

i386 commented 6 years ago

Also bit by this. Nice to see a workaround 👍

Noah-Heil commented 6 years ago

Just ran into this issue. Thank you so much! 🙇