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

Use the Berkshelf API Server in the resolver #693

Merged
merged 69 commits into from
Jul 12, 2013
Merged

Use the Berkshelf API Server in the resolver #693

merged 69 commits into from
Jul 12, 2013

Conversation

reset
Copy link
Contributor

@reset reset commented Jun 22, 2013

changes

  • Deprecate all "default locations" in favor of the source keyword which points to a Berkshelf API endpoint
  • Add the Berkshelf::APIClient for communicating with a Berkshelf API endpoint
  • Remove --skip-dependencies flag on install/upload. This was introduced as a temporary workaround for our slow resolver/uploader.
  • Remove --path option for berks install. This command + flag combination should be replaced with the more appropriately named berks vendor.
  • Temporary disable berks outdated. This was a BETA feature that can now be properly implemented now that we have an entire view of the universe (see Properly implement berks outdated #731).

refactors

  • Locations now inherit from Berkshelf::Location::Base
  • Gutted or removed many of the Berkshelf locations. Locations still contain location specific logic on how to download and activate the dependency.
  • Move all installation logic into Berkshelf::Installer
  • Gutted Berkshelf::Downloader. It now downloads dependencies and attempts to download them from any API endpoints specified with the source keyword in the order they appear in the Berksfile.

follow-up tickets

All of these tickets need to be completed after this branch has been merged

reset added 25 commits July 10, 2013 10:33
an API server will now start and run with no builders started during the test suite
you can add to the cache with the helper methods included by Berkshelf::Rspec::BerksAPIServer
Berksfile#install will instantiate an installer and run it
Initial pass for installing scm based dependencies
Initial pass for installing dependencies defined by the Berks API in a Chef Server or on the Community site
this is now replaced by a source that contains a chef server cache builder
dependencies either have an explicit location or they have none
@reset
Copy link
Contributor Author

reset commented Jul 11, 2013

@sethvargo I'll implement the unit tests where they make sense. I've looked over your suggestions/comments and made changes. Take a peek and re-review.

@sethvargo
Copy link
Contributor

@reset the only thing left is what we talked about in review today - using successfully and removing exit status checks

invalid = (options.keys & [:site, :path, :git]).map { |opt| "'#{opt}" }
raise InternalError, "Cannot specify #{invalid.join(' and ')} for a Cookbook Source!"
if (options.keys & [:path, :git]).size > 1
invalid = (options.keys & [:path, :git]).map { |opt| "'#{opt}" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we missing a ' after opt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we catch :github here too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. THAT'S and impressive catch 👍

@ivey
Copy link
Contributor

ivey commented Jul 12, 2013

Couple notes inline, but in general I'm close to ready to merge.

I think coping gracefully with "site :opscode" as a special case until 4.0 is worth doing.
The mute on show may also be important.

Once we have those covered and the cukes fixed, I could be shaved-ice ready.

@reset
Copy link
Contributor Author

reset commented Jul 12, 2013

@ivey @sethvargo pretty sure all of your comments are addressed. Take a peek.

@ivey
Copy link
Contributor

ivey commented Jul 12, 2013

🍧 I say let's do it.

@sethvargo
Copy link
Contributor

:shipit:

reset added a commit that referenced this pull request Jul 12, 2013
Use the Berkshelf API Server in the resolver
@reset reset merged commit d701fb3 into master Jul 12, 2013
@reset reset deleted the berks-api branch July 12, 2013 22:14
@sethvargo
Copy link
Contributor

🎈

@berkshelf berkshelf locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants