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

oc new-app should not time out while using a proxy #16187

Merged
merged 1 commit into from
Sep 12, 2017
Merged

oc new-app should not time out while using a proxy #16187

merged 1 commit into from
Sep 12, 2017

Conversation

coreydaley
Copy link
Member

@coreydaley coreydaley commented Sep 6, 2017

the oc new-app command should not time out while
checking if the supplied source repository requires
authentication.

Bugzilla: link

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 6, 2017
"time"
)

func GetConfigValues(jsonPaths []string, useGlobalConfig bool, dir string, env []string) (map[string]string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be using the command abstraction for testing.

@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 7, 2017
@coreydaley coreydaley changed the title WIP: oc new-app should copy users http[s].proxy settings to temp .gitconfig WIP: oc new-app should not time out while using a proxy Sep 7, 2017
@coreydaley
Copy link
Member Author

/retest

@coreydaley coreydaley changed the title WIP: oc new-app should not time out while using a proxy oc new-app should not time out while using a proxy Sep 7, 2017
@coreydaley
Copy link
Member Author

@openshift/devex ptal

@coreydaley
Copy link
Member Author

/retest

1 similar comment
@coreydaley
Copy link
Member Author

/retest

@bparees
Copy link
Contributor

bparees commented Sep 7, 2017

/unassign @smarterclayton
/unassign @mfojtik
/assign @csrwng

gitRepo := git.NewRepositoryWithEnv(env)
_, err = CloneAndCheckoutSources(gitRepo, url.StringNoFragment(), url.URL.Fragment, tempSrc, "")
glog.V(4).Infof("Checking if %v requires authentication", url.StringNoFragment())
_, _, err = gitRepo.TimedListRemote(10*time.Second, url.StringNoFragment(), "")
Copy link
Contributor

Choose a reason for hiding this comment

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

so this will respect HTTP_PROXY/etc env variables, presumably. does it also respect proxy configuration supplied in a .gitconfig, assuming that's a thing that can be done?

Copy link
Contributor

Choose a reason for hiding this comment

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

@bparees it won't and I don't know that we want to go through the trouble of understanding your git environment. There's a few ways you can specify the proxy... you can use env vars, a global http.proxy setting, or a per-domain setting like: http.[my-domain].proxy. I discussed this with @coreydaley yesterday and it didn't seem worth the work just to decide whether we should display a warning about possibly requiring secrets for your build config.

Copy link
Contributor

Choose a reason for hiding this comment

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

We agreed that a better experience is simply to have it fail fast and if it didn't work, then the warning can be safely ignored.

Copy link
Contributor

Choose a reason for hiding this comment

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

@csrwng fair enough, especially since we're timing this command out after 10s now, so it won't hang for a long time.

the oc new-app command should not time out while
checking if the supplied source repository requires
authentication.
@coreydaley
Copy link
Member Author

@bparees @csrwng ptal, all tests are passing

@bparees
Copy link
Contributor

bparees commented Sep 12, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 12, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, coreydaley

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 12, 2017
@coreydaley
Copy link
Member Author

/retest

2 similar comments
@coreydaley
Copy link
Member Author

/retest

@coreydaley
Copy link
Member Author

/retest

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue

@openshift-merge-robot openshift-merge-robot merged commit 7ddd016 into openshift:master Sep 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants