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

change import paths to kubernetes-sigs #2652

Merged
merged 1 commit into from Jun 5, 2019

Conversation

@jberkhahn
Copy link
Contributor

commented Jun 4, 2019

per #2650

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jberkhahn

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jberkhahn jberkhahn force-pushed the jberkhahn:change_imports branch 5 times, most recently from 855acc3 to 086eb18 Jun 4, 2019
@jberkhahn jberkhahn requested a review from mszostok Jun 5, 2019
Copy link
Member

left a comment

Minor things that need to be addressed:

@jberkhahn jberkhahn force-pushed the jberkhahn:change_imports branch from 086eb18 to 6dc52d3 Jun 5, 2019
@mszostok

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

one thing is quite strange

When you click the Details button for pull-service-catalog-integration then the URL is:
https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_service-catalog/2652/pull-service-catalog-xbuild/1136353016471883777/

and proper link should be:
https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_service-catalog/2652/pull-service-catalog-xbuild/1136353016471883777/

Same situation for the pull-service-catalog-xbuild job. Only the pull-service-catalog-unit has the correct URL

I've check also the TEST PR and there is the same situation, so changes introduced in that PR didn't break that. Maybe sth is incorrect in test-infra repo config?

@mszostok

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

ok found it! after a 2h of debugging...

the problem is that we are using the old approach for pushing the logs. Service Catalog jobs are using the boostrap.py script. This script checkouts the repo and after all also pushes the logs into GCS. But link to job logs are set by the plank which has the job_url_template variable: https://github.com/kubernetes/test-infra/blob/master/prow/config.yaml#L2

If you will check that tmpl in details you will find such if statements:

{{if .Spec.Refs}}
    {{if ne .Spec.Refs.Org ""}}
        {{if ne .Spec.Refs.Org "kubernetes"}}/
            {{if and (eq .Spec.Refs.Org "kubernetes-sigs") (ne .Spec.Refs.Repo "poseidon")}}
				sigs.k8s.io
            {{else}}
				{{.Spec.Refs.Org}}
            {{end}}
        _{{.Spec.Refs.Repo}}
        {{else if ne .Spec.Refs.Repo "kubernetes"}}
			/{{.Spec.Refs.Repo}}
		{{end}}
    {{end}}
{{end}}

so unfortunately in templeate, we are entering in such if statement
{{if and (eq .Spec.Refs.Org "kubernetes-sigs") (ne .Spec.Refs.Repo "poseidon")}}
and the sigs.k8s.io suffix is added instead of {{.Spec.Refs.Org}}, where the logs are actually pushed by the boostrap.py script.

The problem is that the logic is decoupled, one tool is pushing the logs, other is setting the logs URL in ProwJob status and the logic is not the same.

The boostrap.py script is already deprecated. To solve that problem we should use the decorator pattern, same as we have for the pull-service-catalog-unit job. Thanks to that decorator will take care both for pushing the logs and setting proper URL in ProwJob status.

Here is more info about deprecated boostrap.py

Here is the PR to fix that: kubernetes/test-infra#12911


so your PR LGTM

@jberkhahn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

yeah, i had just about figured that out myself. could you actually mark this as LGTM so it gets merged?

@mszostok

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

/lgtm

@jberkhahn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

huh, the travis tests aren't reporting back for some reason.

/retest

@jberkhahn jberkhahn force-pushed the jberkhahn:change_imports branch from 6dc52d3 to a9c05c7 Jun 5, 2019
@k8s-ci-robot k8s-ci-robot removed the lgtm label Jun 5, 2019
@jberkhahn jberkhahn force-pushed the jberkhahn:change_imports branch from a9c05c7 to 255f6bf Jun 5, 2019
@jberkhahn

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

had to rejigger things to get it to run the tests again, so it knocked your LGTM off

@mszostok

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Jun 5, 2019
@k8s-ci-robot k8s-ci-robot merged commit 492c017 into kubernetes-sigs:master Jun 5, 2019
7 checks passed
7 checks passed
cla/linuxfoundation jberkhahn authorized
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
pull-service-catalog-integration Job succeeded.
Details
pull-service-catalog-unit Job succeeded.
Details
pull-service-catalog-xbuild Job succeeded.
Details
tide In merge pool.
Details
@MHBauer

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

amazing

viviyww added a commit to viviyww/service-catalog that referenced this pull request Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.