-
Notifications
You must be signed in to change notification settings - Fork 929
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
Check lxd-agent
imports
#13219
Check lxd-agent
imports
#13219
Conversation
test/lint/lxd-agent-imports.sh
Outdated
|
||
echo "Checking for imports that have been added to the lxd-agent..." | ||
|
||
OUT=$(go list -f '{{ join .Imports "\n" }}' ./lxd-agent | grep -F . | sort -u | diff -u test/lxd-agent-godeps.list - || true) |
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.
@tomponline is it enough to check ./lxd-agent
alone here?
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.
This seems to only track the packages explicitly imported, and not any additional chained dependencies (which was the problem we saw before).
It looks like we can do go list -f '{{ join .Deps "\n" }}' ./lxd-agent
to get the full list.
And I wonder if we shouldn't also be doing that for ./client
and ./lxc
separately (rather than combined as it is now). Then we wouldn't need to also check ./lxc/config
as well.
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.
Good idea. Would you like me to put them all in a single script each comparing against a godeps.list
file? Or you'd prefer 3 scripts (client
, lxc
& lxd-agent
)?
In any case, I'm not sure what to do of ./shared/api
if you want me to rework client-imports.sh
.
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.
I don't mind how many scripts - but I think we should have a godeps.list file for each (client, lxc, lxd-agent and shared/api).
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
891bda2
to
8b89bba
Compare
@tomponline in the
Aside from this partial and inaccurate list, I noticed the following oddities:
So 2 duplicated |
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
8b89bba
to
733890c
Compare
@simondeziel im sure there are lots of improvements that can be made - please can you open an issue for that. Some will not be possible to fix because of indirect dependencies though. |
@simondeziel please can we use the same .Deps list for |
No description provided.