-
Notifications
You must be signed in to change notification settings - Fork 379
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
.gitignore,vendor.conf,Makefile: use vndr to manage dependencies for testing. #240
Conversation
Makefile
Outdated
go get -u github.com/LK4D4/vndr | ||
vndr | ||
|
||
test: vndr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment I don't think we have enough (read: any) integration tests for me to say we should drop the only proper integration tests we have. In the future we should drop it IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original goal of test-skopeo
was to stop us from constantly breaking test-skopeo
with API changes, without even realizing that we broke it; I think that still very much applies.
(In principle, we could instead have some kind of public API list and just fail tests every time we break the API. But at least the two of us would end up using that test failure to update skopeo, so for us it amounts to the same thing; not sure about other contributors.)
I didn't want to jump the gun on that, but would if you wanted.
…On Tue, Feb 21, 2017 at 2:32 AM, Antonio Murdaca ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Makefile
<#240 (comment)>:
> @@ -15,8 +15,12 @@ deps:
go get -u $(BUILDFLAGS) github.com/golang/lint/golint
go get $(BUILDFLAGS) github.com/vbatts/git-validation
-test:
- @go test $(BUILDFLAGS) -cover ./...
+vndr:
+ go get -u github.com/LK4D4/vndr
+ vndr
+
+test: vndr
we might want to remove test-skopeo? @mtrmac <https://github.com/mtrmac>
@cyphar <https://github.com/cyphar> wdyt?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#240 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABJ6418mQArBnRLxzGJWRKT1a1ZbSQZks5rer1MgaJpZM4MHIC5>
.
|
6e4c0ff
to
702d3ce
Compare
figures; gopkg.in is busted right now. |
76f7420
to
e5d6ea9
Compare
blocked by containers/skopeo#312 -- @runcom can you help me with this one? |
This primarily seems blocked by the When (Being dragged kicking and screaming towards containers/image vendoring anything at all, I would still like it if it were very easy to run tests against the current or latest versions, i.e. using a separate non-default directory and an explicit |
Makefile
Outdated
go get -u github.com/LK4D4/vndr | ||
vndr | ||
|
||
test: deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this strictly necessary? Slowing down the edit-test cycle is not all that attractive, and I currently tend to use go build ./... && make .gitvalidation test validate
instead of make all
to avoid the deps
step.
make all
will run deps
anyway.
At the very least, the vndr
target should be able to use a timestamp so that vndr
gets rerun only when vendor.conf
is updated.
Makefile
Outdated
@out="$$(golint ./...)"; \ | ||
if [ -n "$$(golint ./...)" ]; then \ | ||
@out="$$(golint $(PACKAGES))"; \ | ||
if [ -n "$$(golint $(PACKAGES))" ]; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, we are running golint twice here? Please replace the second reference with $$out
, perhaps as a separate commit.
here's a solution to the multi-vendor problem which I think also resolves your concerns about wanting to move away from the vendor directory when you need to. If the vendor directory is populated at all in the repo, the Work for you? I also resolved the golint issues. |
Thanks, this does work for me. Perhaps it would be possible to do vendor: vendor.conf
go get -u github.com/LK4D4/vndr && vndr (or perhaps there would have to be a separate timestamp file, in case I guess containers/skopeo#304 would end up with decisions how to manage the dependency list, no need to rehash that here. As for the current test failure:
|
we need this in order to bump image-spec to RC5 and adapt the code for the new |
Makefile
Outdated
|
||
# This is not run as part of (make all), but Travis CI does run this. | ||
# Demonstarting a working version of skopeo (possibly with modified SKOPEO_REPO/SKOPEO_BRANCH, e.g. | ||
# make test-skopeo SKOPEO_REPO=runcom/skopeo-1 SKOPEO_BRANCH=oci-3 SUDO=sudo | ||
# ) is a requirement before merging; note that Travis will only test | ||
# the master branch of the upstream repo. | ||
test-skopeo: | ||
test-skopeo: clean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is extremely non-obvious why the clean
here matters, and it is unintuitive that make test-something
modifies the vendored libraries in the current directory.
At the very least this needs a detailed comment explaining why the “clean” here is essential and shouldn’t be removed; but I’d much prefer dropping this dependency, and doing rm -rf $${vendor_path} && cp -r . $${vendor_path}
&& rm -rf $${vendor_path}/vendor
below.
that's going to completely destroy vendor every time the tests are run, we
want to keep vndr out of the way between runs right?
…On Thu, Feb 23, 2017 at 6:48 AM, Miloslav Trmač ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In Makefile
<#240 (comment)>:
>
# This is not run as part of (make all), but Travis CI does run this.
# Demonstarting a working version of skopeo (possibly with modified SKOPEO_REPO/SKOPEO_BRANCH, e.g.
# make test-skopeo SKOPEO_REPO=runcom/skopeo-1 SKOPEO_BRANCH=oci-3 SUDO=sudo
# ) is a requirement before merging; note that Travis will only test
# the master branch of the upstream repo.
-test-skopeo:
+test-skopeo: clean
It is *extremely* non-obvious why the clean here matters, and it is
unintuitive that make test-something modifies the vendored libraries in
the current directory.
At the very least this needs a detailed comment explaining why the “clean”
here is essential and shouldn’t be removed; but I’d much prefer dropping
this dependency, and doing rm -rf $${vendor_path} && cp -r .
$${vendor_path}*&& rm -rf $${vendor_path}/vendor* below.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#240 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABJ65nCh1OYDPKza_sl4nBr6SI2NXNkks5rfZwsgaJpZM4MHIC5>
.
|
ah misunderstood. I'll look into it, not sure why the copy is necessary
though.
…On Thu, Feb 23, 2017 at 10:41 AM, Erik Hollensbe ***@***.***> wrote:
that's going to completely destroy vendor every time the tests are run, we
want to keep vndr out of the way between runs right?
On Thu, Feb 23, 2017 at 6:48 AM, Miloslav Trmač ***@***.***>
wrote:
> ***@***.**** requested changes on this pull request.
> ------------------------------
>
> In Makefile
> <#240 (comment)>:
>
> >
> # This is not run as part of (make all), but Travis CI does run this.
> # Demonstarting a working version of skopeo (possibly with modified SKOPEO_REPO/SKOPEO_BRANCH, e.g.
> # make test-skopeo SKOPEO_REPO=runcom/skopeo-1 SKOPEO_BRANCH=oci-3 SUDO=sudo
> # ) is a requirement before merging; note that Travis will only test
> # the master branch of the upstream repo.
> -test-skopeo:
> +test-skopeo: clean
>
> It is *extremely* non-obvious why the clean here matters, and it is
> unintuitive that make test-something modifies the vendored libraries in
> the current directory.
>
> At the very least this needs a detailed comment explaining why the
> “clean” here is essential and shouldn’t be removed; but I’d much prefer
> dropping this dependency, and doing rm -rf $${vendor_path} && cp -r .
> $${vendor_path}*&& rm -rf $${vendor_path}/vendor* below.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#240 (review)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABJ65nCh1OYDPKza_sl4nBr6SI2NXNkks5rfZwsgaJpZM4MHIC5>
> .
>
|
ok. This should be passing now.
…On Thu, Feb 23, 2017 at 10:42 AM, Erik Hollensbe ***@***.***> wrote:
ah misunderstood. I'll look into it, not sure why the copy is necessary
though.
On Thu, Feb 23, 2017 at 10:41 AM, Erik Hollensbe ***@***.***>
wrote:
> that's going to completely destroy vendor every time the tests are run,
> we want to keep vndr out of the way between runs right?
>
> On Thu, Feb 23, 2017 at 6:48 AM, Miloslav Trmač ***@***.***
> > wrote:
>
>> ***@***.**** requested changes on this pull request.
>> ------------------------------
>>
>> In Makefile
>> <#240 (comment)>:
>>
>> >
>> # This is not run as part of (make all), but Travis CI does run this.
>> # Demonstarting a working version of skopeo (possibly with modified SKOPEO_REPO/SKOPEO_BRANCH, e.g.
>> # make test-skopeo SKOPEO_REPO=runcom/skopeo-1 SKOPEO_BRANCH=oci-3 SUDO=sudo
>> # ) is a requirement before merging; note that Travis will only test
>> # the master branch of the upstream repo.
>> -test-skopeo:
>> +test-skopeo: clean
>>
>> It is *extremely* non-obvious why the clean here matters, and it is
>> unintuitive that make test-something modifies the vendored libraries in
>> the current directory.
>>
>> At the very least this needs a detailed comment explaining why the
>> “clean” here is essential and shouldn’t be removed; but I’d much prefer
>> dropping this dependency, and doing rm -rf $${vendor_path} && cp -r .
>> $${vendor_path}*&& rm -rf $${vendor_path}/vendor* below.
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#240 (review)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AABJ65nCh1OYDPKza_sl4nBr6SI2NXNkks5rfZwsgaJpZM4MHIC5>
>> .
>>
>
>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Needs one last rebase |
…testing. Signed-off-by: Erik Hollensbe <[email protected]>
Signed-off-by: Erik Hollensbe <[email protected]>
Signed-off-by: Erik Hollensbe <[email protected]>
Signed-off-by: Erik Hollensbe <[email protected]>
Signed-off-by: Erik Hollensbe <[email protected]>
it is done |
(This has somehow disappeared? Anyway, being dealt with in #242; I am just mildly curious what has happened.) |
I'm confused too :) |
This PR allows us to test against known versions in a
vendor.conf
provided byhttps://github.com/LK4D4/vndr, which is incorporated into the Makefile for
installation and use.
The goal of this PR is to allow us to both test against a specific set of
controllable versions and also refer to this set of versions as a canonical
"this is what we support", without actually forcing the libraries on anyone who
might want to import this package.