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

hack/verify-godep-licenses.sh fails on Jenkins #22843

Closed
ixdy opened this issue Mar 11, 2016 · 6 comments
Closed

hack/verify-godep-licenses.sh fails on Jenkins #22843

ixdy opened this issue Mar 11, 2016 · 6 comments
Assignees

Comments

@ixdy
Copy link
Member

ixdy commented Mar 11, 2016

I don't understand what's going on. This check works fine locally, but fails on Jenkins with:

Verifying ./hack/../hack/verify-godep-licenses.sh
Created workspace: /go/src/k8s.io/kubernetes/kube-godep-licenses.Qtc34D
Your godep licenses file is out of date. Run hack/update-godep-licenses.sh and commit the results.
--- /go/src/k8s.io/kubernetes/Godeps/LICENSES   2016-03-10 22:31:58.786821838 -0800
+++ /go/src/k8s.io/kubernetes/kube-godep-licenses.Qtc34D/Godeps/LICENSES    2016-03-10 22:40:58.147129743 -0800
@@ -30113,10 +30113,21 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
    See the License for the specific language governing permissions and
    limitations under the License.

-## Copyright and license
+Copyright 2012-2015 Docker, Inc.

-Code and documentation copyright 2014 Docker, inc. Code released under the Apache 2.0 license.
-Docs released under Creative commons.
+This product includes software developed at Docker, Inc. (http://www.docker.com).
+
+The following is courtesy of our legal counsel:
+
+
+Use and transfer of Docker may be subject to certain restrictions by the
+United States and other governments.  
+It is your responsibility to ensure that your use and/or transfer does not
+violate applicable laws. 
+
+For more information, please see http://www.bis.doc.gov
+
+See also http://www.apache.org/dev/crypto.html and/or seek legal counsel.

 ================================================================================
 = Godeps/_workspace/src/github.com/pborman/uuid licensed under: =
Removing workspace: /go/src/k8s.io/kubernetes/kube-godep-licenses.Qtc34D
FAILED   ./hack/../hack/verify-godep-licenses.sh    11s

This appears to be the contents of https://github.com/opencontainers/runc/blob/902c012e85cdae6bb68d8c7a0df69a42f818ce96/NOTICE, which indeed is missing from our checked-in copy of Godeps/LICENSES, yet running hack/update-godep-licenses.sh doesn't add it.

Interestingly, if I run hack/update-godep-licenses.sh --create-missing locally, I get a different diff:

@@ -4270,6 +4270,27 @@ Copyright 2014-2015 Stripe, Inc.

 Copyright (C) 2013 Blake Mizerany

+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Copyright (C) 2013 Blake Mizerany
+
 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

We probably want to disable this check until we figure out what's broken.

cc @david-mcmahon @karlkfi @eparis @wojtek-t

@david-mcmahon
Copy link
Contributor

A recent change to verify-godep-licenses.sh makes it return cleanly when Godeps/LICENSES is actually out of date:

djmm-kubernetes (master)$ hack/verify-godep-licenses.sh 
Checking for 'Godeps/' changes against 'origin/master'
No 'Godeps/' changes detected.
djmm-kubernetes (master)$ hack/update-godep-licenses.sh 
git diff |wc -l
djmm-kubernetes (master)$ git diff |wc -l
1878

@ixdy
Copy link
Member Author

ixdy commented Mar 12, 2016

@david-mcmahon verify-godep-licenses.sh only runs when there are Godeps changes relative to upstream master. This has been the case since the check has existed, I believe - the recent changes just make it clearer it's skipping because of this.

@ixdy
Copy link
Member Author

ixdy commented Mar 12, 2016

I'm able to reproduce the failure on Jenkins locally if I use the kubekins-test image, though running verify-godep-licenses.sh directly still passes. So something about the environment in the kubekins-test image seems to make update-godep-licenses.sh behave differently.

@karlkfi
Copy link
Contributor

karlkfi commented Mar 14, 2016

@ixdy kube-godep-licenses.Qtc34D/Godeps/LICENSES is generated and then diffed against Godeps/LICENSES. See https://github.com/kubernetes/kubernetes/blob/master/hack/verify-godep-licenses.sh#L47

The exit trap should be nuking that temp dir: https://github.com/kubernetes/kubernetes/blob/master/hack/verify-godep-licenses.sh#L36

It's possible that something else is negating the exit trap, but I'm not sure what would be deleting Godeps/LICENSES.

@ixdy
Copy link
Member Author

ixdy commented Mar 14, 2016

@karlkfi I figured out what the problem was, and fixed it in #22892: the locale in the kubekins-test image was apparently different from my (and others') locale, so one of the sort calls was sorting things in a different order. Explicitly setting the locale made it deterministic.

@eparis
Copy link
Contributor

eparis commented Mar 14, 2016

general rule: If your script has sort it should have LC_ALL=C sort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants