check: set CI=true so make check matches CI system#654
check: set CI=true so make check matches CI system#654grahamwhaley wants to merge 1 commit intocontainers:masterfrom
make check matches CI system#654Conversation
|
This might seem a bit "picky" and we could argue this either way... the change itself is fine. However, I'm actually not sure we want to do this as it sets a potentially dangerous precedent. Certainly for Kata, if The vague idea is that if I'd rather we introduce a variable similar to In summary, I'd prefer we change |
|
I don't mind either way mostly. What I do want though is that a So, we could go and fix all those errors (eek!), or we make the default out of the box What I don't want to have to be doing is setting special env variables or adding |
|
@grahamwhaley well I kind of agree with @jodh-intel on this one. If you put the |
|
So, how to move forwards then? There are a number of not necessarily compatible things here:
Does anybody have an objection if we hard wire the Tell me, coz I'm curious.....:
|
|
Honestly, I currently set I think these are the main requirements:
Since setting
The question comes down to what
I personally don't think it's unreasonable to require a dev to set a variable or two as long as that setup is clearly documented, but I do think we need to discourage developers ever setting |
|
OK, thanks for the input. I understand the 'opposite of what we currently do', but I do disagree that a dev should have to set some magic (even if it is documented magic) in order to build something out of the box. Also, I'm not sure we should just see this as 'a developer' that would be setting env vars - this is really just somebody who wants to build the project (although, sure, in the case of vc, as it is pretty much a go pkg/lib that is never really built on its own, that will almost 100% be developers). Anyway, as you note, if we flip the use of diff --git a/.ci/go-lint.sh b/.ci/go-lint.sh
index cdadaf4..0324ade 100755
--- a/.ci/go-lint.sh
+++ b/.ci/go-lint.sh
@@ -30,7 +30,7 @@ linter_args="--tests --vendor"
# run locally, all linters should be run to allow the developer to review any
# failures (and potentially decide whether we need to explicitly enable a new
# linter in the CI).
-if [ "$CI" = true ]; then
+if [ "$CI" = true ] || [ -z "$FULL_STATIC_CHECKS" ] ; then
linter_args+=" --disable-all"
fiThat then both gives a clean out of the box build and test environment (well, apart from #645 which I may stare at as it bugs me every day at the moment), and also gives devs a way to turn on full linters if they desire. If we agree, I'll add it to the dev docs as well of course. |
|
|
|
@grahamwhaley @jodh-intel yes |
Some linters were turned off for the CI runs, but not for a default `make`. This meant a simple `make` would fail the static checks. Add a new env var `FULL_STATIC_CHECKS`, and only run all the linters if this is non-zero. This lets us run the same set of static checks for a basic `make`, but allows developers to easily over-ride and run all the static checks if they need. Fixes: containers#646 Signed-off-by: Graham whaley <graham.whaley@intel.com>
925d276 to
fa17b0e
Compare
|
Updated, code and commit message. As per @jodh-intel note, we will need to co-ordinate merges of this #654 and #653 and now maybe #660 which might need to modify the dev docs again. |
|
@grahamwhaley Need to be closed and moved to https://github.com/kata-containers/runtime/virtcontainers |
The CI system sets
CI=truewhen runninggo-lint.sh, butthe Makefile does not, which results in many more linters
running from the Makefile, and failing.
Add a
CI=truewhen running themake check(or moreaccurately,
make check-go-static, so we actually runthe same tests that the CI runs (and thus, they pass with
the current codebase)
Fixes: #646
Signed-off-by: Graham whaley graham.whaley@intel.com