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

move git and related functions from openshift.go into a separate file #651

Merged
merged 1 commit into from Aug 12, 2017

Conversation

procrypt
Copy link
Contributor

Fixes #640 and we can use the same functions in #518
cc: @kadel @surajssd

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 19, 2017
@surajnarwade
Copy link
Contributor

#655 will unblock this PR

@procrypt
Copy link
Contributor Author

procrypt commented Jun 20, 2017

@surajnarwade Yes it will unblock this PR.

@cdrage
Copy link
Member

cdrage commented Jun 20, 2017

@procrypt @surajnarwade

Actually... there's a lot of things weird going on in this PR, weird indenting, changing of code to buildconfig. This all should just be a quick move and function name change, shouldn't it?


// sort all object so all services are first
o.SortServicesFirst(&allobjects)
}
Copy link
Member

Choose a reason for hiding this comment

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

move weird changes

// sort all object so all services are first
o.SortServicesFirst(&allobjects)
// If docker-compose has a volumes_from directive it will be handled here
o.VolumesFrom(&allobjects, komposeObject)
Copy link
Member

Choose a reason for hiding this comment

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

weird changes

}
} else {
svc := o.CreateHeadlessService(name, service, objects)
objects = append(objects, svc)
Copy link
Member

Choose a reason for hiding this comment

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

again, changes to unrelated code

// If ports not provided in configuration we will not make service
if o.PortsExist(name, service) {
svc := o.CreateService(name, service, objects)
objects = append(objects, svc)
Copy link
Member

Choose a reason for hiding this comment

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

weird indenting?

if err != nil {
return nil, errors.Wrap(err, "Buildconfig cannot be created because current git branch couldn't be detected.")
}
}
Copy link
Member

Choose a reason for hiding this comment

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

weird indenting again, you indented all of this code.

@surajnarwade
Copy link
Contributor

@procrypt run gofmt

@surajnarwade
Copy link
Contributor

@procrypt @cdrage , I think as git related functions are only required by openshift, git.go should be in pkg/transformer/openshift/git.go,
thoughts ?

@cdrage
Copy link
Member

cdrage commented Jun 20, 2017

@surajnarwade makes sense to put in different folder even though only OpenShift uses it.. we may use it for Kubernetes in the future?

@procrypt
Copy link
Contributor Author

@surajnarwade we will be using it for Functional Tests also.

@cdrage
Copy link
Member

cdrage commented Jun 20, 2017

LGTM

@procrypt
Copy link
Contributor Author

Ping @kadel Please review.

@kadel
Copy link
Member

kadel commented Jun 22, 2017

Should those functions be used in openshift code for buildconfig stuff etc...?

@surajnarwade
Copy link
Contributor

@kadel , yeah buildconfig stuff

@cdrage
Copy link
Member

cdrage commented Jul 18, 2017

@procrypt Mind fixing the conflicting file and then we can do another review / possible merge?

@surajnarwade
Copy link
Contributor

@cdrage @kadel , I have updated @procrypt PR, good to go now :)

Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

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

@surajnarwade the PR says that code is being moved, but I don't see code being removed from somewhere else, it's just code addition? can you please elaborate what is happening?

@surajnarwade surajnarwade changed the title move git functions from openshift.go into a separate git package move git and related functions from openshift.go into a separate file Aug 11, 2017
@surajnarwade
Copy link
Contributor

@cdrage @surajssd @kadel needs your review here

@cdrage
Copy link
Member

cdrage commented Aug 11, 2017

This LGTM.

@cdrage
Copy link
Member

cdrage commented Aug 11, 2017

@surajssd ?

Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

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

Now this LGTM

@surajssd surajssd merged commit 8126841 into kubernetes:master Aug 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants