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

[bug]: roolback the code about CRI of version v1alpha1 #1755

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

starnop
Copy link
Contributor

@starnop starnop commented Jul 20, 2018

Signed-off-by: Starnop starnop@163.com

Ⅰ. Describe what this PR did

For CRI expansion requirements,the code about CRI of version v1alpha1 fail the test. Meanwhile,we only need to expand v1alpha2. So we roolback the code about CRI of version v1alpha1.

Ⅱ. Does this pull request fix one issue?

none

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@pouchrobot pouchrobot added kind/bug This is bug report for project size/XXL labels Jul 20, 2018
@codecov-io
Copy link

codecov-io commented Jul 20, 2018

Codecov Report

Merging #1755 into master will increase coverage by 5.8%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1755     +/-   ##
========================================
+ Coverage    56.3%   62.1%   +5.8%     
========================================
  Files         200     200             
  Lines       15657   15565     -92     
========================================
+ Hits         8816    9667    +851     
+ Misses       5745    4651   -1094     
- Partials     1096    1247    +151
Flag Coverage Δ
#critest ?
#criv1alpha1test 33.2% <14.28%> (?)
#criv1alpha2test 33.73% <0%> (?)
#integrationtest 37.86% <0%> (+0.2%) ⬆️
#unittest 19.82% <85.71%> (-0.51%) ⬇️
Impacted Files Coverage Δ
cri/v1alpha1/server.go 79.84% <ø> (+79.84%) ⬆️
cri/v1alpha1/service/cri.go 73.33% <ø> (+73.33%) ⬆️
cri/v1alpha1/cri_wrapper.go 55.8% <ø> (+55.8%) ⬆️
daemon/containerio/cri_log_file.go 84.31% <ø> (ø) ⬆️
cri/v1alpha1/cri_network.go 52.38% <ø> (+52.38%) ⬆️
cri/v1alpha1/cri_types.go 100% <ø> (+100%) ⬆️
cri/v1alpha1/cri_utils.go 73.72% <100%> (+38.8%) ⬆️
cri/v1alpha1/cri.go 65.22% <100%> (+65.22%) ⬆️
ctrd/watch.go 71.87% <0%> (-3.13%) ⬇️
daemon/daemon.go 56.42% <0%> (-1.68%) ⬇️
... and 15 more

@starnop starnop force-pushed the cri-roolback-v1alpha1 branch 7 times, most recently from 83cbdbf to 03a5701 Compare July 20, 2018 06:10
@fuweid
Copy link
Contributor

fuweid commented Jul 20, 2018

it seems that you forgot to change the Makefile and .travis.yml. We need four jobs here.

@fuweid fuweid self-assigned this Jul 20, 2018
Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

Please change Makefile to support v1aphla1 CI

CRITEST_VERSION="1.0.0-alpha.0"
else
CRITEST_VERSION="1.0.0-beta.0"
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

please add the blank line.

if [[ "${cri_runtime}" == "v1alpha1" ]]; then
echo "run v1alpha1 test"
critest --runtime-endpoint=${POUCH_SOCK} \
--focus="${CRI_FOCUS}" --ginkgo-flags="--skip=\"${CRI_SKIP}\"" validation
Copy link
Contributor

Choose a reason for hiding this comment

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

please add indent....

--focus="${CRI_FOCUS}" --ginkgo-flags="--skip=\"${CRI_SKIP}\"" validation
else
echo "run v1alpha2 test"
critest --runtime-endpoint=${POUCH_SOCK} \
--ginkgo.focus="${CRI_FOCUS}" --ginkgo.skip="${CRI_SKIP}"
Copy link
Contributor

Choose a reason for hiding this comment

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

please add indent...

local cmd flags
integration::run_cri_test(){
local cri_runtime cmd flags
cri_runtime=$1
cmd="pouchd-integration"
flags=" -test.coverprofile=${coverage_profile} DEVEL"
Copy link
Contributor

Choose a reason for hiding this comment

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

we should use different coverage-profile for alpha1 otherwise the alpha2 will override the result.


main() {
integration::install_cni
cri_runtime="v1alpha1"
Copy link
Contributor

Choose a reason for hiding this comment

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

please run integration::run_cri_test "${cri_runtime}" don't use global cri_runtime. If you have to, please use local to consume the cri_runtime to avoid the global variable pollution

{
"checksumSHA1": "oRQMrak6qTTdEUnRUMtVpzO9T/A=",
"path": "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime",
"revision": "18758f502c4a249bf999f34e4a115ec9881cd9f2",
Copy link
Contributor

Choose a reason for hiding this comment

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

@YaoZengzeng it's correct about the revision?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it's correct.

@starnop starnop force-pushed the cri-roolback-v1alpha1 branch 5 times, most recently from 92de646 to 321a6fb Compare July 23, 2018 06:56
Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

basically, the change is ok to me. @YaoZengzeng Please help to check again. Thanks


# daemon cri integration coverage profile
coverage_profile="${REPO_BASE}/coverage/integration_daemon_cri_${cri_runtime}_profile.out"
echo "${coverage_profile}"
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this line. we can use bash -x to check the value~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@starnop starnop force-pushed the cri-roolback-v1alpha1 branch 4 times, most recently from 999afc8 to 797aa95 Compare July 23, 2018 10:55
@YaoZengzeng
Copy link
Contributor

LGTM.

Makefile Outdated
cri-v1alpha2-test: ## run v1 alpha2 cri-test
@echo $@
@mkdir -p coverage
./hack/testing/run_daemon_cri_integration.sh v1alpha2

.PHONY: test
test: unit-test integration-test cri-test ## run the unit-test, integration-test and cri-test
Copy link
Contributor

Choose a reason for hiding this comment

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

cri-test should be changed

critest --runtime-endpoint=${POUCH_SOCK} \
--ginkgo.focus="${CRI_FOCUS}" --ginkgo.skip="${CRI_SKIP}"
if [[ "${cri_runtime}" == "v1alpha1" ]]; then
echo "run v1alpha1 test"
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this line.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can use the above line start pouch daemon cri integration test... to show the version, like

start pouch daemon cri-${version} integration test.... Does it make senses to you?

critest --runtime-endpoint=${POUCH_SOCK} \
--focus="${CRI_FOCUS}" --ginkgo-flags="--skip=\"${CRI_SKIP}\"" validation
else
echo "run v1alpha2 test"
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove this line.

@starnop starnop force-pushed the cri-roolback-v1alpha1 branch from 797aa95 to ea78a5d Compare July 24, 2018 01:49
Signed-off-by: Starnop <starnop@163.com>
@starnop starnop force-pushed the cri-roolback-v1alpha1 branch from ea78a5d to 10bbe90 Compare July 24, 2018 02:16
Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid merged commit 44a5af1 into AliyunContainerService:master Jul 24, 2018
@starnop starnop deleted the cri-roolback-v1alpha1 branch July 25, 2018 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants