Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

CI: Use specific version of xurls utility#856

Merged
jodh-intel merged 10 commits into
kata-containers:masterfrom
jodh-intel:ci-build-versioned-xurls
Oct 26, 2018
Merged

CI: Use specific version of xurls utility#856
jodh-intel merged 10 commits into
kata-containers:masterfrom
jodh-intel:ci-build-versioned-xurls

Conversation

@jodh-intel
Copy link
Copy Markdown

Build the version of xurls specified in the runtimes versions
database to avoid problems; the latest version of xurls requires
golang 1.10.3 but that is not available in the stable branches.

Includes rework to the .ci/lib.sh functions to support building a particular version of a package.

Fixes #855.

Signed-off-by: James O. D. Hunt james.o.hunt@intel.com

@jodh-intel
Copy link
Copy Markdown
Author

Blocked on kata-containers/runtime#855.

Copy link
Copy Markdown
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

Well, that was slightly more convoluted than I expected ;-)
lgtm

@jodh-intel
Copy link
Copy Markdown
Author

@chavafg - branch updated with the changes from kata-containers/runtime#855.

@jodh-intel
Copy link
Copy Markdown
Author

No longer blocked on kata-containers/runtime#855 as this PR now contains those changes.

Copy link
Copy Markdown
Contributor

@chavafg chavafg left a comment

Choose a reason for hiding this comment

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

lgtm

Comment thread .ci/lib.sh Outdated

[ ! -f "$versions_file" ] && die "cannot find $versions_file"

# This is needed in order to retrieve the version for qemu-lite
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this comment can now be removed...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Zapped! 😄

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Oct 25, 2018

and travis now failing on ppc64

@jodh-intel jodh-intel force-pushed the ci-build-versioned-xurls branch from be0a0f7 to cb7a9d3 Compare October 25, 2018 13:55
@jodh-intel
Copy link
Copy Markdown
Author

@nitkon - any ideas? I don't think I've changed anything architecture dependent on this PR, but from the Travis ppc64 logs...

INFO: Installing xurls utility
/home/travis/gopath/bin/yq: line 1: Not: command not found
/home/travis/gopath/bin/yq: line 1: Not: command not found
ERROR: need version to build

@grahamwhaley
Copy link
Copy Markdown
Contributor

@jodh-intel - did you drop an install_yq, which although it said it was needed for qemu, was maybe also needed elsewhere?

@jodh-intel
Copy link
Copy Markdown
Author

@grahamwhaley - not that I can see, no.

It appears that install_yq() doesn't actually support ppc64le yet:

... although yq is available fwics:

The question is, how was this working before on Travis?!?

@grahamwhaley
Copy link
Copy Markdown
Contributor

:-) OK @jodh-intel - we'll wait to see what @nitkon thinks.
What I saw in the changed files was:

function get_version(){
	dependency="$1"
	GOPATH=${GOPATH:-${HOME}/go}
-	# This is needed in order to retrieve the version for qemu-lite
-	install_yq >&2
``

@jodh-intel
Copy link
Copy Markdown
Author

@grahamwhaley - ah - you've only got part of the context I think:

$  git diff master | grep install_yq
@@ -100,20 +123,43 @@ function install_yq() {
+       install_yq >&2
-       install_yq >&2

@grahamwhaley
Copy link
Copy Markdown
Contributor

Ah, I see it - not obvious on the github view as the addition was somewhat above. OK, np

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Oct 25, 2018

seems like failing here, we haven't added the ppc64le support:

tests/.ci/lib.sh

Lines 93 to 106 in cb7a9d3

case "${sysInfo[1]}" in
"aarch64")
goarch=arm64
;;
"x86_64")
goarch=amd64
;;
"s390x")
goarch=s390x
;;
"*")
die "Arch ${sysInfo[1]} not supported"
;;
esac

@jodh-intel
Copy link
Copy Markdown
Author

@chavafg - #859 raised to resolve that. Do we want to fix that first, or just land this since?

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Oct 25, 2018

I'll prefer to fix #859 first, since travis will start failing on every other PR.
Opened #860 to address the issue.

@jodh-intel jodh-intel force-pushed the ci-build-versioned-xurls branch 2 times, most recently from 2a3fb1d to 8e7873f Compare October 25, 2018 16:21
@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Oct 25, 2018

/test

@GabyCT
Copy link
Copy Markdown
Contributor

GabyCT commented Oct 25, 2018

lgtm

Approved with PullApprove

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Oct 25, 2018

See failures in the CI:

11:45:38 INFO: Building github.com/kata-containers/agent
11:45:38 make: *** empty string invalid as file name.  Stop.
11:45:38 Build step 'Execute shell' marked build as failure

James O. D. Hunt added 3 commits October 26, 2018 09:23
Sort the entries in the tests versions database.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Stop `yamllint` bleating.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add a description to the tests versions database.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
James O. D. Hunt added 7 commits October 26, 2018 09:23
Add the [`xurls`](https://mvdan.cc/xurls/cmd/xurls) utility to the
versions database. This tool is used by the CI scripts in the `tests`
repo to check URLs for validity. However, the latest version of `xurls`
requires golang 1.10.3+, but we don't need to use the latest version and
doing so is causing us problems (see
kata-containers/kata-containers#32).

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Fix `build()` to use the provided make target variable.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Update `build()` to only run the `autogen.sh` script if it exists.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Change `build()` to use `go get -d` and an explicit `go install` rather
than a `go get` to support a future change that will allow a specific
version of a go project to be built.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Rework `build()` into `build_version()` and add a new version of
`build()` that will build the latest package version by default.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Refactor `get_version()` into `get_dep_from_yaml_db()` and provide a new
`get_test_version()` to allow querying the versions database in the tests repo
rather than the runtime one.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Build the version of `xurls` specified in the runtimes versions
database to avoid problems; the latest version of `xurls` requires
golang 1.10.3 but that is not available in the stable branches.

Fixes kata-containers#855.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@jodh-intel jodh-intel force-pushed the ci-build-versioned-xurls branch from 8e7873f to 3d61716 Compare October 26, 2018 08:27
@jodh-intel
Copy link
Copy Markdown
Author

/test

@jodh-intel jodh-intel merged commit d0ef722 into kata-containers:master Oct 26, 2018
@marcov marcov mentioned this pull request Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants