Coder Social home page Coder Social logo

chef's People

Contributors

bdwyertech avatar bigkraig avatar bradbeam avatar drewhammond avatar grobie avatar hynd avatar jasonwbarnett avatar jenkins-nuglif avatar jjhuff avatar jvrplmlmn avatar kalroy avatar limitusus avatar marcparadise avatar markgibbons avatar meson10 avatar misantron avatar mpolden avatar mudash avatar radeksimko avatar rvrangel avatar sanghinitin avatar satyanash avatar sonali523 avatar sorcix avatar spheromak avatar srenatus avatar svagner avatar theckman avatar tyler-ball avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chef's Issues

ClientService

Node information can be viewed and managed, but the corresponding clients cannot. Can support for this be added?

Add porcelain package

Most of the services are implemented as a veneer over the Server API. Some services have higher level methods. I think we should maybe move these into a specific porcelain package. Open for input on this as well.

Add Sandbox Service

Need Sandbox service for proper object upload. Need to ensure the SignHeader / Auth stuff will work for sandbox.. might be another issue/test.

Model Role

Lets get the Role Struct / Object worked out

Validate BaseUrl for orgs

When invalid org is sent to chef-server bad things happen. We should just validate the BaseUrl at minimum has a trailing slash.

Bust out services into packages

Would be good to break out the client bits of http.go then each service into their own packages. The model with the service struct embedding a client should serve this right I think. where each service will require client, and that would require auth and http. dunno probably needs some exploration / spike time. Also up for whatever ideas people may have on this one.

Crash in Go 1.12.1 when querying nodes

I made a simple test that runs a search on available nodes in my chef server, and I noticed that the code crashes when I call chefClient.Search.Exec("node", "*.*). I am running on the latest stable version of Go

	key, err := ioutil.ReadFile(chefKeyPath)
	if err != nil {
		log.Fatalf("Couldn't read chef key: %s", err.Error())
		return
	}
	chefClient, err := chef.NewClient(&chef.Config{
		Name:    "mychefservername",
		Key:     string(key),
		BaseURL: chefServerAddress,
	})
	if err != nil {
		log.Fatalf("Couldn't connect to chef server: %s", err.Error())
		return
	}

	resp, err := chefClient.Search.Exec("node", "*:*")
	if err != nil {
		log.Fatalf("Error executing query %s", err.Error())
		return
	}

Here is the crash dump:

image

implement the role delete function in the code

Enhancement:
current role.go code has a placeholder for role delete functionality but was not implemented. I"ve the code ready. I'll write the test code as well and submit a pull request.

Tests fail intermittently

Hi!

The Debian build of go-chef/chef runs the test suite, and it has been found that it randomly fails.

=== RUN   TestClientsService_List
--- FAIL: TestClientsService_List (0.01s)
	client_test.go:47: Clients.List returned:
		client1 => http://localhost/clients/client1
		client2 => http://localhost/clients/client2
		
		want:
		client1 => http://localhost/clients/client1
		client2 => http://localhost/clients/client2

or

=== RUN   TestDataBagsService_DataBagListResultString
--- FAIL: TestDataBagsService_DataBagListResultString (0.00s)
	databag_test.go:162: DataBagListResult.String returned:
		bag1 => http://localhost/data/bag1
		bag2 => http://localhost/data/bag2
		
		want:
		bag1 => http://localhost/data/bag1
		bag2 => http://localhost/data/bag2

I can provide more info on request.

Content Type Ecoding

http hardcodes content-type header to json. This is problematic if you want to call a chef.Do for sandbox file uploads (even tho they aren't always on a chef-server).

Error Types

Adding richer errors and error types for all the services where it makes sense. Internally in http possibly as well.

Mark is Awesome

@MarkGibbons Just want to say thanks. I've not been able to put much time at all into this the last couple years, and glad you have taken it up with gusto.

Closing res.Body

From documentation

274 // Caller should close resp.Body when done reading from it.

Whereas the code here:

chef/http.go

Line 220 in 3abaf6b

// Do is used either internally via our magic request shite or a user may use it
doesn't close the response.

This leads to the host system Maxing out on Open File Descriptors if the ulimit is fairly low. In my case it was 256.

I can do a PR, but that would require a substantial amount of change, and If you guys don't have this on your priority list, I can take it up.

Support v1.3 authentication protocol

We recently went back to privateDecrypt (and using the other side from Goiardi) which is as I understand it, authentication protocol 1.0, and 1.1 (?).

We should support v1.2 explicitly, hopefully with rsa.Sign/Verify fucntions, with half from Goiardi (for tests) and prefer it where possible.

Fix the circleci build.

The current tester job works for my repository, doesn't work for go-test/chef. It's failing in the gofmt checks. See if the circleci jobs are set up differently.

Cookbook download feature!

Originated from chef/chef-analyze#20

Feature Request

As a go-chef user,
I would like to have the ability to download cookbooks from a Chef Server,
So I can have cookbooks locally on disk to read and/or to implement this
functionality internally on other Go programs/libraries.

Acceptance Criteria

  • Expose a function that can download a cookbook to the current directory on disk.
  • Expose a function that can download a cookbook at a specific path/directory.

using EnvironmentResult

I'm hoping to use Environments.List to simply list all of the environments.
It appears that the EnvironmentsResult object is of the type map[string]string
However when I attempt to access it via:

environments, err := client.Environments.List()
fmt.Println(environments["foo"])

I get this error
"invalid operation: environments["foo"] (type *chef.EnvironmentResult does not support indexing)"

I am new to go so maybe I am not using correctly.
Is EnvironmentsResult not a map?

Integration Testing

We should setup some test scenarios using chef-platform and a go-chef org or something like this. Would be really good to get some code running through all of that.

chef-request interface

idea to get rid of the magicRequest * is to maybe build up an interface thats a chef-request ? not sure if thats the best way to do it or not.

Tag a new release

The new dep uses the latest semver tag by default. This means it downloads a very old version of github.com/go-chef/chef. It's possible to make dep use the master branch, but it would be easier you'd release versions more frequently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.