scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 60 forks source link

Ruby Error on Deploy #71

Closed serieseight closed 10 years ago

serieseight commented 10 years ago

Hi im having this issue on the first initial deploy it deploys most stuff then pops this error.

/Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/rugged-0.19.0/lib/rugged/repository.rb:68:in lookup': Object not found - failed to find pack entry (784829738c93fac91d89be8d49f8b92ab1b263d3) (Rugged::OdbError) from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/rugged-0.19.0/lib/rugged/repository.rb:68:inlookup' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/tree.rb:15:in block in data' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/tree.rb:13:ineach' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/tree.rb:13:in data' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/changeset.rb:27:inblock in each' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/diff.rb:58:in block in each' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/diff.rb:57:ineach' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/diff.rb:57:in each' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/changeset.rb:20:ineach' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/deployer.rb:9:in deploy_changeset!' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/command/deploy.rb:55:indeploy_changeset!' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/command/deploy.rb:30:in execute!' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/lib/dandelion/cli.rb:66:inexecute!' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/gems/dandelion-0.4.0/bin/dandelion:8:in <top (required)>' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/bin/dandelion:23:inload' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/bin/dandelion:23:in <main>' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:ineval' from /Users/mariovassiliades/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `

'

scttnlsn commented 10 years ago

Could you post the output of git show 784829738c93fac91d89be8d49f8b92ab1b263d3? Are there any submodules in your project?

serieseight commented 10 years ago

I see thie issue @scttnlsn not sure how to fix it tho :/

fatal: bad object 784829738c93fac91d89be8d49f8b92ab1b263d3

scttnlsn commented 10 years ago

@serieseight What is the issue that you see? Could you post the output of git fsck?

serieseight commented 10 years ago

@scttnlsn Checking object directories: 100% (256/256), done.

serieseight commented 10 years ago

I am using Statamic CMS which uses YAML could there be a conflict?

scttnlsn commented 10 years ago

@serieseight I highly doubt it. What's the path of the file that you're trying to deploy right before Dandelion crashes?

serieseight commented 10 years ago

@scttnlsn Writing file: _content/sitemap.md

scttnlsn commented 10 years ago

I'm a little stumped here. Here's a process you could follow to try and debug this:

require 'rugged'

repo = Rugged::Repository.new('.')
tree = repo.lookup(repo.head.target).tree

puts tree['_content']
content = repo.lookup(tree['_content'][:oid])

puts content['sitemap.md']
sitemap = repo.lookup(content['sitemap.md'][:oid])

puts sitemap

Paste any output and/or errors back here.

serieseight commented 10 years ago

Does this mean anything to you?

marios-mbp:explore.dev mariovassiliades$ irb 1.9.3-p484 :001 > require 'rugged' => true 1.9.3-p484 :002 > 1.9.3-p484 :003 > repo = Rugged::Repository.new('.') => #<Rugged::Repository:70306765023600 {path: "/Users/mariovassiliades/server/explore.dev/.git/"}> 1.9.3-p484 :004 > tree = repo.lookup(repo.head.target).tree => #<Rugged::Tree:70306765039720 {oid: f758174fcb300732095ed0bced9fd2a4cbd12fba}> <".gitignore" 139597f9cb07c5d48bed18984ec4747f4b4f3438> <".htaccess" 125a4a20b4ade7f1f26963209277e814e377a081> <"_add-ons" 4fd96a3d635b800bdb7fd0268321c14c8eb5ed32> <"_app" ac69151f64c3e638819b698725d955008e85a987> <"_config" 90549ee6c4a424ac4ea76e76ed965ec8a2909bd4> <"_content" aa739e7af3e9b1a1f87d43fbe3f84f61fee1d899> <"_themes" ccacc174f5e018fdf2b68c2a9c65ee6629649cc7> <"admin.php" aaf5ed241d7a654c8c3cfb6371783e4fd0a6db6d> <"admin" 7cee43aff8516720435ef65728c02cf8a7a6e4b2> <"assets" 19448eefa179daf65ff9c96016bf3d76081355af> <"index.php" 1d3e88d6b00b4120574b1105df52fab0af3d6df3>

1.9.3-p484 :005 > 1.9.3-p484 :006 > puts tree['_content'] {:name=>"_content", :oid=>"aa739e7af3e9b1a1f87d43fbe3f84f61fee1d899", :filemode=>16384, :type=>:tree} => nil 1.9.3-p484 :007 > content = repo.lookup(tree['_content'][:oid]) => #<Rugged::Tree:70306765082460 {oid: aa739e7af3e9b1a1f87d43fbe3f84f61fee1d899}> <"01-about-us" 65a983c91c0c62efae8893660a51ec245414cd1f> <"02-advertise-with-us" a0ab0c90b31abbff104c94c569ee8dc5b9c8588f> <"03-terms-of-use" a03c1eb3b1c98f3280440a0159fb673fc2e6c8f7> <"04-privacy-policy" ba56b9138e7fefe48d2308f49a218559f01e1240> <"05-feedback" c3f6ab06f764fe4f244408dfe09d14c22b1db85e> <"06-contact" a41b9deb34d2470fb88615f6092c09b6861d12c7> <"07-member" bb637eec39820fcc4e595625a1edbeeec2cc18c8> <"404.md" 84d82799b91feffe2ce30c609d975489247b5fa8> <"feed.md" aff9c1c8ec8eb9e91a254fd8cfbb99639e5d6ad0> <"page.md" 065ad71a46215eaf76e7abe76bc05719bd5779df> <"sitemap.md" 60738c308f09a05081e7ce2b71d8d847d54f7326>

1.9.3-p484 :008 > 1.9.3-p484 :009 > puts content['sitemap.md'] {:name=>"sitemap.md", :oid=>"60738c308f09a05081e7ce2b71d8d847d54f7326", :filemode=>33261, :type=>:blob} => nil 1.9.3-p484 :010 > sitemap = repo.lookup(content['sitemap.md'][:oid]) => #Rugged::Blob:0x007fe324020d00 1.9.3-p484 :011 > 1.9.3-p484 :012 > puts sitemap

Rugged::Blob:0x007fe324020d00

=> nil 1.9.3-p484 :013 >

scttnlsn commented 10 years ago

@serieseight So weird. That looks like everything worked as expected but the OID for _content/sitemap.md is 60738c308f09a05081e7ce2b71d8d847d54f7326 (not 784829738c93fac91d89be8d49f8b92ab1b263d3). I'm confused where that OID is coming from.

Are you deploying the HEAD revision of the repository (that's the default)? i.e. not specifying dandelion deploy <some revision>

serieseight commented 10 years ago

sorry for all the hassel @scttnlsn I also updated dandelion is this maybe the issue? i got this message after update

Updating installed gems Updating dandelion Fetching: rugged-0.19.0.gem (100%) Building native extensions. This could take a while... Successfully installed rugged-0.19.0 Fetching: dandelion-0.4.0.gem (100%) ! The 'dandelion' gem is installed but you may need to install additional ! gems depending on the adapters you intend to use. ! ! Running 'dandelion status' in your project directory will indicate which ! additional gems need to be installed. Successfully installed dandelion-0.4.0 unable to convert "\xCA" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/25/7cc5642cb1a054f08cc83f2d943e56fd3ebe99, skipping unable to convert "\xB0" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/34/e64fe350f3ea80c989cdac7a99c2adb8574fca, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/3d/9b743acb4a84dd99002d2c6f3fcf1a47e9f06b, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/4e/44973d41d33bf5342037f56497efe0a9604d25, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6, skipping unable to convert "\xF7" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/6c/a0f54491390579ce9438ec89c64c6b3499683a, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/8a/e33865a630c5d141c8a498f0c0166ff240b433, skipping unable to convert "\xB0" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/90/2dce0535b19f0c15ac8407fc4468256ad672d7, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/c3/9af82404cc4267b1ba5f4b4437a511e0776abb, skipping unable to convert "\xB0" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/c8/85b3f693ed6e2926971ef75680f41b318072ae, skipping unable to convert "\xF7" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/d8/7cbcba0e2ede0752bdafc5938da35546803ba5, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/e2/89ff1e2729839759dbd6fe99b6e35880910c7c, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391, skipping unable to convert "\xF7" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/ea/41dba10b54a794284e0be009a11f0ff3716a28, skipping unable to convert "\xD9" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/ee/314a31b622b027c10981acaed7903a3607dbd4, skipping unable to convert "\xB0" from ASCII-8BIT to UTF-8 for spec/fixtures/repo.git/objects/f6/66b137794d56880bab05e8fd256713a8fccf92, skipping Installing ri documentation for dandelion-0.4.0 Installing darkfish documentation for dandelion-0.4.0 unable to convert "\x85" from ASCII-8BIT to UTF-8 for test/fixtures/alternate/objects/14/6ae76773c91e3b1d00cf7a338ec55ae58297e2, skipping unable to convert "\xAD" from ASCII-8BIT to UTF-8 for test/fixtures/alternate/objects/14/9c32d47e99d0a3572ff1e70a2e0051bbf347a9, skipping unable to convert "\xED" from ASCII-8BIT to UTF-8 for test/fixtures/alternate/objects/14/fb3108588f9421bf764041e5e3ac305eb6277f, skipping unable to convert "\xE5" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/index, skipping unable to convert "\x8C" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/0c/37a5391bbff43c37f0d0371823a5509eed5b1d, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/13/85f264afb75a56a5bec74243be9b367ba4ca08, skipping unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/18/1037049a54a1eb5fab404658a3a250b44335d7, skipping unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/18/10dff58d8a660512d4832e740f692884338ccd, skipping unable to convert "\x95" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/2d/2eff63372b08adf0a9eb84109ccf7d19e2f3a2, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/36/060c58702ed4c2a40832c51758d5344201d89a, skipping unable to convert "\xA5" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/44/1034f860c1d5d90e4188d11ae0d325176869a8, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/45/b983be36b73c0788dc9cbcb76cbb80fc7bb057, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/4a/202b346bb0fb0db7eff3cffeb3c70babbd2045, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/5b/5b025afb0b4c913b4c338a42934a3863bf3644, skipping unable to convert "\xB3" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/60/d415052a33de2150bf68757f6461df4f563ae4, skipping unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/61/9f9935957e010c419cb9d15621916ddfcc0b96, skipping unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/68/8a8f4ef7496901d15322972f96e212a9e466cc, skipping unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/75/057dd4114e74cca1d750d0aee1647c903cb60a, skipping unable to convert "\xED" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/77/71329dfa3002caf8c61a0ceb62a31d09023f37, skipping unable to convert "\xB3" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/81/4889a078c031f61ed08ab5fa863aea9314344d, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/84/96071c1b46c854b31185ea97743be6a8774479, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/94/eca2de348d5f672faf56b0decafa5937e3235e, skipping unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/9b/7384fe1676186192842f5d3e129457b62db9e3, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/9f/d738e8f7967c078dceed8190330fc8648ee56a, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/a4/a7dce85cf63874e984719f4fdd239f5145052f, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/a7/1586c1dfe8a71c6cbf6c129f404c5642ff31bd, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/a8/233120f6ad708f843d861ce2b7228ec4e3dec6, skipping unable to convert "\xA5" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/b7/4713326bc972cc15751ed504dca6f6f3b91f7a, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/be/3563ae3f795b2b4353bcce3a527ad0a4f7f644, skipping unable to convert "\x9D" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/c4/7800c7266a2be04c571c04d5a6614691ea99bd, skipping unable to convert "\xF1" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/c4/dc1555e4d4fa0e0c9c3fc46734c7c35b3ce90b, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391, skipping unable to convert "\xB3" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/f6/0079018b664e4e79329a7ef9559c8d9e0378d1, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/fa/49b077972391ad58037050f2a75f74e3671e92, skipping unable to convert "\xB3" from ASCII-8BIT to UTF-8 for test/fixtures/testrepo.git/objects/fd/093bff70906175335656e6ce6ae05783708765, skipping unable to convert "\xF0" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/08/8b64704e0d6b8bd061dea879418cb5442a3fbf, skipping unable to convert "\xB2" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/13/a5e939bca25940c069fd2169d993dba328e30b, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/19/bf568e59e3a0b363cafb4106226e62d4a4c41c, skipping unable to convert "\xBF" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/58/1fadd35b4cf320d102a152f918729011604773, skipping unable to convert "\x85" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/5c/87b6791e8b13da658a14d1ef7e09b5dc3bac8c, skipping unable to convert "\x85" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/6f/e5f5398af85fb3de8a6aba0339b6d3bfa26a27, skipping unable to convert "\x95" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/7f/ccd75616ec188b8f1b23d67506a334cc34a49d, skipping unable to convert "\x95" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/80/6999882bf91d24241e4077906b9017605eb1f3, skipping unable to convert "\xB2" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/83/7d176303c5005505ec1e4a30231c40930c0230, skipping unable to convert "\x95" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/a8/595ccca04f40818ae0155c8f9c77a230e597b6, skipping unable to convert "\xF0" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/cf/8f1cf5cce859c438d6cc067284cb5e161206e7, skipping unable to convert "\x85" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/d5/278d05c8607ec420bfee4cf219fbc0eeebfd6a, skipping unable to convert "\xB2" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/f4/e16fb76536591a41454194058d048d8e4dd2e9, skipping unable to convert "\xCA" from ASCII-8BIT to UTF-8 for test/fixtures/unsymlinked.git/objects/f9/e65619d93fdf2673882e0a261c5e93b1a84006, skipping Installing ri documentation for rugged-0.19.0 Installing darkfish documentation for rugged-0.19.0 Gems updated: dandelion rugged

scttnlsn commented 10 years ago

Wow. Not sure what all those "unable to convert" messages are all about. Were you using a forked version of the Gem? There's some test fixtures there that I do not recognize. I would recommend uninstalling and re-installing Dandelion.

serieseight commented 10 years ago

@scttnlsn updated all gems + dandelion no more errors for dandelion but same error on dandelion deploy.. Sigh

serieseight commented 10 years ago

@scttnlsn I am simply typing dandelion deploy

scttnlsn commented 10 years ago

@serieseight You must be running git show outside of your project/Git directory?

One more thing to try: delete your local copy of the project and re-clone from GitHub or wherever you host the repository (make sure everything is committed and pushed first). Could be some sort of file corruption? I'm not sure.

I think this really needs to be step debugged. If you're familiar with Ruby I would recommend cloning the Dandelion code locally and stepping through the deploy process. Alternatively, if you're willing/able to send me the entire project zipped up I can debug it here (obviously remove any credentials from dandelion.yml and elsewhere).

dkouvdis commented 10 years ago

Sorry, @serieseight had a server issue, close please

scttnlsn commented 10 years ago

@dkouvdis @serieseight Out of curiosity, what was the issue? Was the string 784829738c93fac91d89be8d49f8b92ab1b263d3 inside the remote .revision file?

dkouvdis commented 10 years ago

Sorry I cannot confirm, it was already overriden by different repo by accident.