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

Can't specify a pull request ref in Puppetfile #309

Open
EslamElHusseiny opened this issue Jun 17, 2015 · 3 comments
Open

Can't specify a pull request ref in Puppetfile #309

EslamElHusseiny opened this issue Jun 17, 2015 · 3 comments

Comments

@EslamElHusseiny
Copy link

I'm trying to specify a certain pull request revision in my Puppetfile as following :

mod "java",
:git => "https://github.com/EslamElHusseiny/puppet-java.git",
:ref => "a275d6aa7329868f0d7c6c770a95d6db514e0602

but actually the output of librarian-puppet install is :

Could not checkout https://github.com/EslamElHusseiny/puppet-java.git: fatal: ambiguous argument 'a275d6aa7329868f0d7c6c770a95d6db514e0602^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

However I've checked that this revision exists as following :

git rev-parse a275d6aa7329868f0d7c6c770a95d6db514e0602^{commit}
a275d6aa7329868f0d7c6c770a95d6db514e0602

also as following :

git show-ref | grep a275d6aa7329868f0d7c6c770a95d6db514e0602
a275d6aa7329868f0d7c6c770a95d6db514e0602 refs/remotes/origin/pr/23/merge

I'm using ruby version :

ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

and the distribution is :

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty

and

librarian-puppet install --verbose
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 1.8.23
[Librarian] Librarian Version: 0.6.3
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 2.2.0
[Librarian] Project: /home/vagrant/workspace/PuppetLint/kitchenci
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.9.1
[Librarian] Git Environment Variables:
Librarian
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "https://forgeapi.puppetlabs.com", {}]
[Librarian] [:git, "https://github.com/EslamElHusseiny/puppet-java.git", {:ref=>"a275d6aa7329868f0d7c6c770a95d6db514e0602"}]
[Librarian] Resolving maestrodev-wget (>= 1.3.2) https://forgeapi.puppetlabs.com
[Librarian] Checking manifests
[Librarian] Module maestrodev-wget found versions: 1.7.0, 1.6.0, 1.5.7, 1.5.6, 1.5.5, 1.5.4, 1.5.3, 1.5.2, 1.5.1, 1.5.0, 1.4.5, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.2, 1.3.1, 1.3.0, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.0, 1.0.0, 0.0.1
[Librarian] Checking maestrodev-wget/1.7.0 https://forgeapi.puppetlabs.com
[Librarian] Resolved maestrodev-wget (>= 1.3.2) https://forgeapi.puppetlabs.com at maestrodev-wget/1.7.0 https://forgeapi.puppetlabs.com
[Librarian] Resolved maestrodev-wget (>= 1.3.2) https://forgeapi.puppetlabs.com
[Librarian] Resolving java (>= 0) https://github.com/EslamElHusseiny/puppet-java.git#a275d6aa7329868f0d7c6c770a95d6db514e0602
[Librarian] Checking manifests
[Librarian] --- No output
[Librarian] --- No output
[Librarian] --- No output
[Librarian] --- No output
[Librarian] --> origin
[Librarian] --> origin/HEAD -> origin/master
[Librarian] --> origin/master
[Librarian] --- Exited with pid 24984 exit 128
[Librarian] --> fatal: ambiguous argument 'a275d6aa7329868f0d7c6c770a95d6db514e0602^{commit}': unknown revision or path not in the working tree.
[Librarian] --> Use '--' to separate paths from revisions, like this:
[Librarian] --> 'git [...] -- [...]'
Could not checkout https://github.com/EslamElHusseiny/puppet-java.git: fatal: ambiguous argument 'a275d6aa7329868f0d7c6c770a95d6db514e0602^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
/var/lib/gems/1.9.1/gems/librarian-puppet-2.2.0/lib/librarian/puppet/source/git.rb:37:in rescue in cache!' /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.0/lib/librarian/puppet/source/git.rb:34:incache!'
/var/lib/gems/1.9.1/gems/librarian-puppet-2.2.0/lib/librarian/puppet/source/local.rb:32:in fetch_version' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/manifest.rb:93:infetch_version!'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/manifest.rb:85:in fetched_version' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/manifest.rb:24:inversion'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/manifest.rb:20:in to_s' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:191:inblock in scope_checking_manifest'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:236:in block in debug' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/logger.rb:37:inblock in debug'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/ui.rb:32:in debug' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/logger.rb:37:indebug'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:236:in debug' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:191:inscope_checking_manifest'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:160:in block (2 levels) in resolving_dependency_map_find_manifests' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:218:inblock in map_find'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:217:in each' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:217:inmap_find'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:159:in block in resolving_dependency_map_find_manifests' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:172:inblock (2 levels) in scope_resolving_dependency'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:186:in block in scope_checking_manifests' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:230:inscope'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:185:in scope_checking_manifests' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:171:inblock in scope_resolving_dependency'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:230:in scope' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:170:inscope_resolving_dependency'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:158:in resolving_dependency_map_find_manifests' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:65:indo_resolve'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver/implementation.rb:50:in resolve' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/resolver.rb:23:inresolve'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/action/resolve.rb:31:in run' /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.0/lib/librarian/puppet/action/resolve.rb:10:inrun'
/var/lib/gems/1.9.1/gems/librarian-puppet-2.2.0/lib/librarian/puppet/cli.rb:104:in resolve!' /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.0/lib/librarian/puppet/cli.rb:68:ininstall'
/var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in run' /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command'
/var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:instart'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:26:in block (2 levels) in bin!' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:31:inreturning_status'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:26:in block in bin!' /var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:47:inwith_environment'
/var/lib/gems/1.9.1/gems/librarianp-0.6.3/lib/librarian/cli.rb:26:in bin!' /var/lib/gems/1.9.1/gems/librarian-puppet-2.2.0/bin/librarian-puppet:7:in<top (required)>'
/usr/local/bin/librarian-puppet:23:in load' /usr/local/bin/librarian-puppet:23:in

'

and the Puppetfile content is :

!/usr/bin/env ruby

^syntax detection

forge "https://forgeapi.puppetlabs.com"
modulefile
mod "java",
:git => "https://github.com/EslamElHusseiny/puppet-java.git",
:ref => "a275d6aa7329868f0d7c6c770a95d6db514e0602"

and the Modulefile content also is :

name 'puppet-java'
version '0.0.6'
source 'git@github.com:EslamElHusseiny/puppet-java.git'
author 'Cake Team'
license 'MIT License'
summary 'Java Puppet Module'
description 'Java Puppet Module'
project_page 'https://github.com/EslamElHusseiny/puppet-java'
dependency 'maestrodev/wget', '>= 1.3.2'

@EslamElHusseiny EslamElHusseiny changed the title Can't specify a pull request revision in Puppetfile Can't specify a pull request ref in Puppetfile Jun 17, 2015
@carlossg
Copy link
Collaborator

That commit does't exist, have you deleted it from the remote repo?

$ git clone https://github.com/EslamElHusseiny/puppet-java.git && cd puppet-java && git rev-parse a275d6aa7329868f0d7c6c770a95d6db514e0602^{commit}
Cloning into 'puppet-java'...
remote: Counting objects: 145, done.
remote: Total 145 (delta 0), reused 0 (delta 0), pack-reused 145
Receiving objects: 100% (145/145), 18.61 KiB | 0 bytes/s, done.
Resolving deltas: 100% (46/46), done.
Checking connectivity... done.
a275d6aa7329868f0d7c6c770a95d6db514e0602^{commit}
fatal: ambiguous argument 'a275d6aa7329868f0d7c6c770a95d6db514e0602^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
$ git show-ref | grep a275d6aa7329868f0d7c6c770a95d6db514e0602
$

@EslamElHusseiny
Copy link
Author

well, actually I've tried to clone the repository in another place and I got the same issue you got, but it seems I've to clone with --mirror option to get all pull requests refs !

I'm not sure how to ask librarian-puppet to do that, do you ?

@carlossg
Copy link
Collaborator

You can just create a branch from the PR and use that, or implement the clone --mirror

I don't know if adding --mirror by default to all clone operations may make them too heavy, probably better to have some add and option to set git clone parameters in the mod declaration

There are a some of places to touch

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