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

Split and remove pkg/gitutils and pkg/httputils #33477

Merged
merged 5 commits into from
Jun 3, 2017

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Jun 1, 2017

See #32989

Moves pkg/gitutils to builder/remotecontext/git where it is used.
Split up pkg/httputils. Remove unused functions, move the rest to the single consumer. There is one function left Download(), which is very small. It can be duplicated when components are split out.

@vieux
Copy link
Contributor

vieux commented Jun 2, 2017

LGTM ping @cpuguy83

@vieux
Copy link
Contributor

vieux commented Jun 2, 2017

ping @aaronlehmann

@dnephin dnephin requested a review from tonistiigi June 2, 2017 19:05
@cpuguy83
Copy link
Member

cpuguy83 commented Jun 2, 2017

Do we need an httpdownload package?

@cpuguy83
Copy link
Member

cpuguy83 commented Jun 2, 2017

Actually definitely no, httpdownload.Download is pretty worthless.

@dnephin
Copy link
Member Author

dnephin commented Jun 2, 2017

Right. It's a minor piece of code. When we split components into new repos we can just duplicate it. I don't see any value in duplicating it now.

@cpuguy83
Copy link
Member

cpuguy83 commented Jun 2, 2017

@dnephin Value is not creating a new package, and there's nothing really to copy.

@cpuguy83
Copy link
Member

cpuguy83 commented Jun 2, 2017

By "there's nothing really to copy" I mean... the function is really that worthless. It's http.Get with an error check that masks the real error.

@dnephin
Copy link
Member Author

dnephin commented Jun 2, 2017

Ya, it probably should have included the response body instead of just the status code. But a 4xx or 5xx resposne is not an error from http.Get

"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/gitutils"
Copy link
Member

Choose a reason for hiding this comment

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

I know this package is used in several projects outside (like libcompose, …).

Copy link
Member Author

Choose a reason for hiding this comment

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

They will have to change their import paths to build/remotecontext/git.

dnephin added 5 commits June 2, 2017 16:10
…ction.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
@dnephin
Copy link
Member Author

dnephin commented Jun 2, 2017

I removed pkg/httpdownload, and I fixed the function to do what it should have been doing.

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@vieux
Copy link
Contributor

vieux commented Jun 3, 2017

LGTM

@vieux vieux merged commit b28cbed into moby:master Jun 3, 2017
@GordonTheTurtle GordonTheTurtle added this to the 17.06.0 milestone Jun 3, 2017
@dnephin dnephin deleted the move-builder-pkgs branch June 3, 2017 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants