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

Make sh2ju use awk instead of bc. #60695

Merged
merged 1 commit into from
Mar 24, 2018
Merged

Conversation

rmmh
Copy link
Contributor

@rmmh rmmh commented Mar 2, 2018

awk is available in all of our test runners (as part of busybox or debian base packages), bc is not.

This will fix spurious errors in the typecheck job.

Release note:

NONE

@rmmh rmmh added this to the v1.10 milestone Mar 2, 2018
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 2, 2018
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2018
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2018
awk is available in all of our test runners (as part of busybox or debian base packages), bc is not.
@cblecker
Copy link
Member

cblecker commented Mar 2, 2018

/lgtm
/approve
/kind bug
/sig testing
/priority important-soon

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. kind/bug Categorizes issue or PR as related to a bug. sig/testing Categorizes an issue or PR as relevant to SIG Testing. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Mar 2, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cblecker, rmmh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 2, 2018
@cblecker
Copy link
Member

cblecker commented Mar 2, 2018

/assign @krzyzacy
Mind reviewing/approving for milestone as a testing fix?

@BenTheElder
Copy link
Member

Note that I tossed bc in kubekins-e2e for now, I still don't see Junit https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/60695/pull-kubernetes-typecheck/237/?log#log

@krzyzacy
Copy link
Member

krzyzacy commented Mar 2, 2018

@rmmh: @BenTheElder added bc to kubekins last night, do we still need this?

@krzyzacy
Copy link
Member

krzyzacy commented Mar 2, 2018

ref kubernetes/test-infra#7095

@cblecker
Copy link
Member

cblecker commented Mar 2, 2018

@BenTheElder Is the artifacts dir being created, and the variable set right? I don't see any artifacts being exported

@BenTheElder
Copy link
Member

@cblecker not sure. Though I also think not needing to install yet another thing is preferable either way, we can fix the job configuration independent of this PR, just noting that there's something else missing to actually get JUnit results.

@krzyzacy
Copy link
Member

krzyzacy commented Mar 2, 2018

do you need something like

export KUBE_JUNIT_REPORT_DIR=${WORKSPACE}/artifacts
export ARTIFACTS_DIR=${WORKSPACE}/artifacts

like in https://github.com/kubernetes/kubernetes/blob/master/hack/jenkins/test-dockerized.sh?

@cblecker
Copy link
Member

cblecker commented Mar 2, 2018

@krzyzacy Oh, yes! We have those in verify-dockerized:

# Produce a JUnit-style XML test report
export KUBE_JUNIT_REPORT_DIR=${WORKSPACE}/artifacts
# Set artifacts directory
export ARTIFACTS_DIR=${WORKSPACE}/artifacts

Which I think is the target for the pull-kubernetes-verify job

@krzyzacy
Copy link
Member

krzyzacy commented Mar 2, 2018

image

@BenTheElder
Copy link
Member

we should export those env on the pod, but please, please don't make anything else look like pull-kubernetes-verify, xref: kubernetes/test-infra#5708

@thockin
Copy link
Member

thockin commented Mar 5, 2018

This change is Reviewable

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@@ -130,8 +130,8 @@ function juLog() {
# calculate vars
asserts=$(($asserts+1))
errors=$(($errors+$err))
time=`echo "${end} - ${ini}" | bc -l`
total=`echo "${total} + ${time}" | bc -l`
time=`echo "${end} ${ini}" | awk '{print $1 - $2}'`
Copy link
Member

Choose a reason for hiding this comment

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

couldn't we also just use bash arithmetic?

echo $((${end} - ${ini}))
echo $((${total} + ${time}))

I checked in the busybox image and this seems to work and is more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, since the times are floating points. Bash doesn't have floating point arithmetic.

@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Removed From Pull Request

@BenTheElder @cblecker @krzyzacy @rmmh @kubernetes/sig-testing-misc

Important: This pull request was missing the status/approved-for-milestone label for more than 7 days.

Help

@k8s-github-robot k8s-github-robot removed this from the v1.10 milestone Mar 10, 2018
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@krzyzacy
Copy link
Member

/retest

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

/test all

Tests are more than 96 hours old. Re-running tests.

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 7ba67b3 into kubernetes:master Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants